snapshot
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + Svelte + TS</title>
|
<title>Live Caputre Mode</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import type { IGalleryDb, IGalleryImage } from "./app";
|
import { intervalInSeconds, type IGalleryDb, type IGalleryImage } from "./app";
|
||||||
import CompGalleryImage from "./CompGalleryImage.svelte";
|
import CompGalleryImage from "./CompGalleryImage.svelte";
|
||||||
import CompDialogImage from "./CompDialogImage.svelte";
|
import CompDialogImage from "./CompDialogImage.svelte";
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ onMount(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await queryPage.refresh();
|
await queryPage.refresh();
|
||||||
}, 5000);
|
}, intervalInSeconds * 1000);
|
||||||
|
|
||||||
cleanup.push(() => {
|
cleanup.push(() => {
|
||||||
clearInterval(intervalId);
|
clearInterval(intervalId);
|
||||||
|
|||||||
@@ -2,6 +2,13 @@ import { openDB, type IDBPDatabase } from "idb";
|
|||||||
import type { Readable } from "svelte/motion";
|
import type { Readable } from "svelte/motion";
|
||||||
import { readable, writable } from "svelte/store";
|
import { readable, writable } from "svelte/store";
|
||||||
|
|
||||||
|
// #####################
|
||||||
|
// ###
|
||||||
|
export const intervalInSeconds = 15 * 60;
|
||||||
|
// ###
|
||||||
|
// #####################
|
||||||
|
|
||||||
|
|
||||||
export interface IGalleryImage {
|
export interface IGalleryImage {
|
||||||
id: IDBValidKey;
|
id: IDBValidKey;
|
||||||
when: Date;
|
when: Date;
|
||||||
|
|||||||
Reference in New Issue
Block a user