mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
optional auto update
This commit is contained in:
parent
c38f300796
commit
3e2ef80ad3
@ -20,6 +20,7 @@
|
||||
y: number;
|
||||
w: number;
|
||||
h: number;
|
||||
u: boolean;
|
||||
}
|
||||
|
||||
let imageURL: string | null;
|
||||
@ -109,7 +110,8 @@
|
||||
x: parseInt(fdata.get('x')?.toString() ?? '0'),
|
||||
y: parseInt(fdata.get('y')?.toString() ?? '0'),
|
||||
w: parseInt(fdata.get('w')?.toString() ?? matrix.width.toString()),
|
||||
h: parseInt(fdata.get('h')?.toString() ?? matrix.height.toString())
|
||||
h: parseInt(fdata.get('h')?.toString() ?? matrix.height.toString()),
|
||||
u: fdata.get('update') ? true : false
|
||||
};
|
||||
|
||||
// Time upload by saving date
|
||||
@ -211,6 +213,14 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2">
|
||||
<label class="border-2 border-black border-r-0 border-b-0 pl-1" for="update">Auto update:</label
|
||||
>
|
||||
<div class="border-2 border-black border-b-0 pl-1 bg-gray-100 w-full">
|
||||
<input class="w-full" type="checkbox" name="update" id="update" checked />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input
|
||||
class="border-2 border-black hover:bg-gray-200 cursor-pointer"
|
||||
type="submit"
|
||||
@ -234,6 +244,7 @@
|
||||
<p>Placing image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
{#if submitData.u}
|
||||
{#await updateMatrix()}
|
||||
<p>Updating matrix . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
@ -241,6 +252,15 @@
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{/await}
|
||||
{:else}
|
||||
<p>Done!</p>
|
||||
<p>
|
||||
{(() => {
|
||||
clearInterval(uploadData.interval);
|
||||
return uploadData.elapsed;
|
||||
})()} seconds elapsed.
|
||||
</p>
|
||||
{/if}
|
||||
{/await}
|
||||
{/await}
|
||||
{/await}
|
||||
|
Loading…
Reference in New Issue
Block a user