[ui] mark each visited entity with a LAST_VISITED timestamp
parent
d5337bd784
commit
6bb3fe1788
|
@ -4,7 +4,7 @@
|
|||
import UpObject from "./display/UpObject.svelte";
|
||||
import { UpType } from "../lib/types";
|
||||
import BlobPreview from "./display/BlobPreview.svelte";
|
||||
import { setContext } from "svelte";
|
||||
import { onMount, setContext } from "svelte";
|
||||
import { writable } from "svelte/store";
|
||||
import type { UpEntry } from "upend";
|
||||
import Spinner from "./utils/Spinner.svelte";
|
||||
|
@ -86,7 +86,7 @@
|
|||
}
|
||||
|
||||
$: filteredUntypedAttributes = untypedAttributes.filter(
|
||||
(entry) => !["IS", "LBL", "NOTE"].includes(entry.attribute)
|
||||
(entry) => !["IS", "LBL", "NOTE", "LAST_VISITED"].includes(entry.attribute)
|
||||
);
|
||||
|
||||
$: currentUntypedAttributes = editable
|
||||
|
@ -161,6 +161,14 @@
|
|||
await fetch(`/api/obj/${address}`, { method: "DELETE" });
|
||||
revalidate();
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
fetch(`/api/obj/${address}/LAST_VISITED`, {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ t: "Number", c: new Date().getTime() }),
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="inspect">
|
||||
|
|
Loading…
Reference in New Issue