Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Use relative time with absolute hover on release page
Daniel Norman committed 7 days ago
commit be27955f9072fbf4762c50ba50e4f4eff200b3d6
parent 973bd014910605c7807c1d2f0150bb533d98a719
1 file changed +9 -6
modified src/views/repo/Release.svelte
@@ -11,7 +11,12 @@
  import { invoke, InvokeError } from "@app/lib/invoke";
  import { isDelegateOrAuthor } from "@app/lib/roles";
  import * as router from "@app/lib/router";
-
  import { authorForNodeId, publicKeyFromDid } from "@app/lib/utils";
+
  import {
+
    absoluteTimestamp,
+
    authorForNodeId,
+
    formatTimestamp,
+
    publicKeyFromDid,
+
  } from "@app/lib/utils";

  import Icon from "@app/components/Icon.svelte";
  import Id from "@app/components/Id.svelte";
@@ -354,10 +359,6 @@
    }
  }

-
  function formatTimestamp(ts: number): string {
-
    return new Date(ts * 1000).toLocaleString();
-
  }
-

  function progressText(cid: string): string {
    const p = progress[cid];
    if (!p) return "";
@@ -750,7 +751,9 @@
          {#if release.tagName}
            <span class="pill">{release.tagName}</span>
          {/if}
-
          <span>{formatTimestamp(release.timestamp)}</span>
+
          <span title={absoluteTimestamp(release.timestamp * 1000)}>
+
            {formatTimestamp(release.timestamp * 1000)}
+
          </span>
        </div>
        {#if commit}
          <div class="commit-panel">