This commit is contained in:
2024-06-04 06:57:54 +00:00
parent 015e813bc4
commit 16fab643ea
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Svelte + TS</title>
<title>Live Caputre Mode</title>
</head>
<body>
<div id="app"></div>
+2 -2
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from "svelte";
import type { IGalleryDb, IGalleryImage } from "./app";
import { intervalInSeconds, type IGalleryDb, type IGalleryImage } from "./app";
import CompGalleryImage from "./CompGalleryImage.svelte";
import CompDialogImage from "./CompDialogImage.svelte";
@@ -47,7 +47,7 @@ onMount(() => {
});
await queryPage.refresh();
}, 5000);
}, intervalInSeconds * 1000);
cleanup.push(() => {
clearInterval(intervalId);
+7
View File
@@ -2,6 +2,13 @@ import { openDB, type IDBPDatabase } from "idb";
import type { Readable } from "svelte/motion";
import { readable, writable } from "svelte/store";
// #####################
// ###
export const intervalInSeconds = 15 * 60;
// ###
// #####################
export interface IGalleryImage {
id: IDBValidKey;
when: Date;