=stopHeat debug
This commit is contained in:
parent
a6fa324295
commit
fab8ea057d
3 changed files with 24 additions and 9 deletions
|
@ -6,12 +6,13 @@
|
|||
export let handleSelect;
|
||||
export let element;
|
||||
export let option_label;
|
||||
export let disabled;
|
||||
|
||||
console.log(`options: ${JSON.stringify(options)}`);
|
||||
</script>
|
||||
|
||||
<label class="label" for={id}>{label}</label>
|
||||
<select name={id} {id} bind:value on:change={handleSelect}>
|
||||
<select name={id} {id} bind:value on:change={handleSelect} {disabled}>
|
||||
{#each options as option}
|
||||
{#if element}
|
||||
{#if option_label}
|
||||
|
|
|
@ -1,9 +1,19 @@
|
|||
import { writable } from 'svelte/store';
|
||||
|
||||
export const priority = writable({
|
||||
function createPriority() {
|
||||
const { subscribe, set, update } = writable({
|
||||
surfers: [],
|
||||
end: false,
|
||||
start: false,
|
||||
min: 0,
|
||||
sec: 0,
|
||||
})
|
||||
return {
|
||||
subscribe,
|
||||
set,
|
||||
update,
|
||||
reset: () => set({ surfers: [], end: false, start: false, min: 0, sec: 0 }),
|
||||
}
|
||||
}
|
||||
|
||||
export const priority = createPriority()
|
|
@ -151,8 +151,11 @@
|
|||
}
|
||||
});
|
||||
console.log(`retval: ${JSON.stringify(res)}`);
|
||||
$priority.reset;
|
||||
$priority.start = false;
|
||||
$priority.end = true;
|
||||
resetHeat();
|
||||
console.log(`stopHeat: ${JSON.stringify($priority)}`);
|
||||
}
|
||||
|
||||
function setHeat(h) {
|
||||
|
@ -249,6 +252,7 @@
|
|||
handleSelect={() => setHeat(heat)}
|
||||
label="Heats"
|
||||
id="heats"
|
||||
disabled={$priority.start}
|
||||
/>
|
||||
{#if !$priority.end}
|
||||
<div class="timer">{pad2($priority.min)}:{pad2($priority.sec)}</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue