diff --git a/src/routes/download/+page.svelte b/src/routes/download/+page.svelte index 68d1bf9..3c85055 100644 --- a/src/routes/download/+page.svelte +++ b/src/routes/download/+page.svelte @@ -9,8 +9,9 @@ onMount(() => { const w: any = window; (w.adsbygoogle = w.adsbygoogle || []).push({}); + (w.adsbygoogle = w.adsbygoogle || []).push({}); - setInterval(() => { + const interval = setInterval(() => { timer--; if (timer == 0) { @@ -18,6 +19,8 @@ goto("/api/download?devBuild=latest"); else goto("/api/download"); + + clearInterval(interval); } }, 1000); }); @@ -27,31 +30,43 @@ -{#if browser} - - -{/if} - -
Download will start in {timer} seconds
- -{#if browser} - - -{/if} +Download will start in {timer} seconds
+ {:else if timer > 0} +Download will start in 1 second
+ {:else} +Download started
+ {/if} + + {#if browser} + + + {/if} +