This commit is contained in:
Miki 2024-01-12 15:46:27 +01:00
parent 3480ba9d8b
commit fca2c7e2d1
3 changed files with 9 additions and 7 deletions

View file

@ -15,10 +15,11 @@
return false;
};
LoadPriority();
onMount(async () => {
if (!dev) {
const sse = StartSSE();
LoadPriority();
return sse;
}
});

View file

@ -17,6 +17,8 @@
let header_height = 8;
$: setup_height = (100 - header_height) / $surfersCount - 12 / $surfersCount;
LoadPriority();
// $: if ($surfers || $surfersCount || $round) {
// SaveSession();
// }
@ -76,8 +78,6 @@
$surfersCount = JSON.parse(window.sessionStorage.getItem('surfers'));
$round = JSON.parse(window.sessionStorage.getItem('round'));
console.log(`loaded: ${JSON.stringify($surfers)}`);
} else {
LoadPriority();
}
return sse;
}

View file

@ -76,6 +76,7 @@
}
ResetPriority();
start = true;
SendPriority();
}
function StopHeat() {
@ -97,7 +98,7 @@
}
}
function ResetSurfer() {
function ResetLocalCache() {
window.sessionStorage.clear();
location.reload();
}
@ -243,14 +244,14 @@
</div>
<button class="button" on:click={StartHeat}>START</button>
<div class="command">
<button class="button" on:click={ResetSurfer}>Reset</button>
<button class="button" on:click={ResetLocalCache}>Reset</button>
</div>
</div>
{/if}
<style>
:global(body) {
overflow-y: hidden;
/* overflow-y: hidden; */
overflow-x: hidden;
margin: 0.2vmin;
align-content: center;