[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 UpObject from "./display/UpObject.svelte";
|
||||||
import { UpType } from "../lib/types";
|
import { UpType } from "../lib/types";
|
||||||
import BlobPreview from "./display/BlobPreview.svelte";
|
import BlobPreview from "./display/BlobPreview.svelte";
|
||||||
import { setContext } from "svelte";
|
import { onMount, setContext } from "svelte";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
import type { UpEntry } from "upend";
|
import type { UpEntry } from "upend";
|
||||||
import Spinner from "./utils/Spinner.svelte";
|
import Spinner from "./utils/Spinner.svelte";
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$: filteredUntypedAttributes = untypedAttributes.filter(
|
$: filteredUntypedAttributes = untypedAttributes.filter(
|
||||||
(entry) => !["IS", "LBL", "NOTE"].includes(entry.attribute)
|
(entry) => !["IS", "LBL", "NOTE", "LAST_VISITED"].includes(entry.attribute)
|
||||||
);
|
);
|
||||||
|
|
||||||
$: currentUntypedAttributes = editable
|
$: currentUntypedAttributes = editable
|
||||||
|
@ -161,6 +161,14 @@
|
||||||
await fetch(`/api/obj/${address}`, { method: "DELETE" });
|
await fetch(`/api/obj/${address}`, { method: "DELETE" });
|
||||||
revalidate();
|
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>
|
</script>
|
||||||
|
|
||||||
<div class="inspect">
|
<div class="inspect">
|
||||||
|
|
Loading…
Reference in New Issue