Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Make timestamp optional in Comment component
Thomas Scholtes committed 10 months ago
commit e5f2071aeab8073ee92066b38e2e4ea9b663dd13
parent 430a5b931c8dcb7bb8192b8de1e3be4297734506
1 file changed +6 -4
modified src/components/Comment.svelte
@@ -28,7 +28,7 @@
    reactions?: Reaction[];
    embeds?: Map<string, Embed>;
    caption?: string;
-
    timestamp: number;
+
    timestamp?: number;
    lastEdit?: Edit;
    disallowEmptyBody?: boolean;
    emptyBodyTooltip?: string;
@@ -139,9 +139,11 @@
      {#if beforeTimestamp}
        {@render beforeTimestamp()}
      {/if}
-
      <span class="timestamp" title={utils.absoluteTimestamp(timestamp)}>
-
        {utils.formatTimestamp(timestamp)}
-
      </span>
+
      {#if timestamp}
+
        <span class="timestamp" title={utils.absoluteTimestamp(timestamp)}>
+
          {utils.formatTimestamp(timestamp)}
+
        </span>
+
      {/if}
      {#if lastEdit}
        <div
          class="card-metadata"