mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-25 11:31:46 +00:00
upload start flag
This commit is contained in:
parent
9ab5ceaa88
commit
5248c09267
@ -17,6 +17,7 @@
|
||||
|
||||
let imageURL: string | null, lastImage: File;
|
||||
let uploadData: UploadData, matrix: Matrix;
|
||||
let uploadStarted = false;
|
||||
|
||||
async function updateMatrix() {
|
||||
await fetch('/api/redirect?endpoint=update');
|
||||
@ -117,26 +118,28 @@
|
||||
<input type="file" name="image" accept="image/*" on:change={uploadImage} />
|
||||
{#if imageURL}
|
||||
<img src={imageURL} alt="User uploaded" />
|
||||
{#await fileAsDataURL(lastImage, matrix.width, matrix.height)}
|
||||
<p>Loading image data . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then dataUrl}
|
||||
{#await sendImage(dataUrl)}
|
||||
<p>Sending image . . .</p>
|
||||
{#if uploadStarted}
|
||||
{#await fileAsDataURL(lastImage, matrix.width, matrix.height)}
|
||||
<p>Loading image data . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
{#await placeImage()}
|
||||
<p>Placing image . . .</p>
|
||||
{:then dataUrl}
|
||||
{#await sendImage(dataUrl)}
|
||||
<p>Sending image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
{#await updateMatrix()}
|
||||
<p>Updating matrix . . .</p>
|
||||
{#await placeImage()}
|
||||
<p>Placing image . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{#await updateMatrix()}
|
||||
<p>Updating matrix . . .</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{:then}
|
||||
<p>Done!</p>
|
||||
<p>{uploadData.elapsed} seconds elapsed.</p>
|
||||
{/await}
|
||||
{/await}
|
||||
{/await}
|
||||
{/await}
|
||||
{/await}
|
||||
{/if}
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user