[ui] LAST_VISITED into BrowseColumn, store in seconds
parent
a9e60d4722
commit
52b18a4916
|
@ -15,6 +15,12 @@
|
||||||
function visit() {
|
function visit() {
|
||||||
window.open(normUrl(`/browse/${address}`), "_blank");
|
window.open(normUrl(`/browse/${address}`), "_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: fetch(`api/obj/${address}/LAST_VISITED`, {
|
||||||
|
method: "PUT",
|
||||||
|
headers: { "Content-Type": "application/json" },
|
||||||
|
body: JSON.stringify({ t: "Number", c: new Date().getTime() / 1000 }),
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="view" class:editable>
|
<div class="view" class:editable>
|
||||||
|
|
|
@ -160,12 +160,6 @@
|
||||||
await fetch(`api/obj/${address}`, { method: "DELETE" });
|
await fetch(`api/obj/${address}`, { method: "DELETE" });
|
||||||
revalidate();
|
revalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
$: fetch(`api/obj/${address}/LAST_VISITED`, {
|
|
||||||
method: "PUT",
|
|
||||||
headers: { "Content-Type": "application/json" },
|
|
||||||
body: JSON.stringify({ t: "Number", c: new Date().getTime() }),
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="inspect">
|
<div class="inspect">
|
||||||
|
|
|
@ -68,7 +68,9 @@
|
||||||
<table>
|
<table>
|
||||||
{#each lastVisited as [address, visited]}
|
{#each lastVisited as [address, visited]}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="timestamp">{formatRelative(visited, new Date())}</td>
|
<td class="timestamp"
|
||||||
|
>{formatRelative(visited * 1000, new Date())}</td
|
||||||
|
>
|
||||||
<td class="object"><UpObject link {address} /></td>
|
<td class="object"><UpObject link {address} /></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
Loading…
Reference in New Issue