diff --git a/Webserver/src/routes/image/+page.svelte b/Webserver/src/routes/image/+page.svelte index d93f40d..823be57 100644 --- a/Webserver/src/routes/image/+page.svelte +++ b/Webserver/src/routes/image/+page.svelte @@ -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 @@ /> +
+ +
+ +
+
+ Placing image . . .

{uploadData.elapsed} seconds elapsed.

{:then} - {#await updateMatrix()} -

Updating matrix . . .

-

{uploadData.elapsed} seconds elapsed.

- {:then} + {#if submitData.u} + {#await updateMatrix()} +

Updating matrix . . .

+

{uploadData.elapsed} seconds elapsed.

+ {:then} +

Done!

+

{uploadData.elapsed} seconds elapsed.

+ {/await} + {:else}

Done!

-

{uploadData.elapsed} seconds elapsed.

- {/await} +

+ {(() => { + clearInterval(uploadData.interval); + return uploadData.elapsed; + })()} seconds elapsed. +

+ {/if} {/await} {/await} {/await}