From c729b51da60c04c034cd2fa33ab307fe2bae2e1c Mon Sep 17 00:00:00 2001 From: Henry Bui Date: Tue, 7 Jan 2025 22:54:30 -0500 Subject: [PATCH 01/21] buttonize this link --- src/routes/dashboard/points-motions/+page.svelte | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/routes/dashboard/points-motions/+page.svelte b/src/routes/dashboard/points-motions/+page.svelte index 0a55752..62169b0 100644 --- a/src/routes/dashboard/points-motions/+page.svelte +++ b/src/routes/dashboard/points-motions/+page.svelte @@ -1,4 +1,5 @@ - -
- - -
-
- -
-
- {#key selectedSpeaker?.key} -
- {#if typeof selectedSpeaker !== "undefined"} - - {/if} -
- {/key} -
- db.updateDelegate(selectedSpeaker?.key, d => { d.stats.durationSpoken += t; })} - /> - -
- {#if !running} - - {:else} - - {/if} - - - -
-
-
- -
- -
-
- -
- - { if (!isRepeat) db.updateDelegate(key, d => { d.stats.timesSpoken++; }) }} - /> -
-
\ No newline at end of file diff --git a/src/lib/components/motions/RoundRobin.svelte b/src/lib/components/motions/RoundRobin.svelte deleted file mode 100644 index f8d4269..0000000 --- a/src/lib/components/motions/RoundRobin.svelte +++ /dev/null @@ -1,109 +0,0 @@ - - -
- - -
-
- -
-
- {#key selectedSpeaker?.key} -
- {#if typeof selectedSpeaker !== "undefined"} - - {/if} -
- {/key} -
- db.updateDelegate(selectedSpeaker?.key, d => { d.stats.durationSpoken += t; })} - /> -
- {#if !running} - - {:else} - - {/if} - - -
-
-
- -
- -
-
- -
- - { if (!isRepeat) db.updateDelegate(key, d => { d.stats.timesSpoken++; }) }} - /> -
-
\ No newline at end of file diff --git a/src/lib/components/motions/TimerPanel.svelte b/src/lib/components/motions/TimerPanel.svelte new file mode 100644 index 0000000..46827bf --- /dev/null +++ b/src/lib/components/motions/TimerPanel.svelte @@ -0,0 +1,224 @@ + + + + +
+ +
+
+ {#key selectedSpeaker?.key} +
+ {#if typeof selectedSpeaker !== "undefined"} + + {/if} +
+ {/key} +
+ {#each timers as _, i} + + {@const last = i == timers.length - 1} + getDuration(i), d => setDuration(i, d)} + bind:running + bind:this={timers[i]} + disableKeyHandlers={!last || timerNotStartable} + onPause={ + last ? t => db.updateDelegate(selectedSpeaker?.key, d => { d.stats.durationSpoken += t; }) + : undefined + } + {editable} + /> + {/each} + +
+ + + + + + {@render (resetButtons ?? resetButton)(reset, canReset)} +
+
+
+ +
+ +
+ + +{#snippet resetButton( + reset: (...indices: number[]) => void, + canReset: (...indices: number[]) => boolean, + label: string = "Reset", + indices?: number[] +)} + +{/snippet} \ No newline at end of file diff --git a/src/lib/components/motions/page/ModCaucus.svelte b/src/lib/components/motions/page/ModCaucus.svelte new file mode 100644 index 0000000..afdd17f --- /dev/null +++ b/src/lib/components/motions/page/ModCaucus.svelte @@ -0,0 +1,65 @@ + + +
+ + +
+ + {#snippet resetButtons(reset, canReset)} + {@render resetButton(reset, canReset, "Reset", [0])} + {@render resetButton(reset, canReset, "Reset All")} + {/snippet} + +
+ +
+ + { if (!isRepeat) db.updateDelegate(key, d => { d.stats.timesSpoken++; }) }} + /> +
+
\ No newline at end of file diff --git a/src/lib/components/motions/README.md b/src/lib/components/motions/page/README.md similarity index 100% rename from src/lib/components/motions/README.md rename to src/lib/components/motions/page/README.md diff --git a/src/lib/components/motions/page/RoundRobin.svelte b/src/lib/components/motions/page/RoundRobin.svelte new file mode 100644 index 0000000..2818ab1 --- /dev/null +++ b/src/lib/components/motions/page/RoundRobin.svelte @@ -0,0 +1,62 @@ + + +
+ + +
+ +
+ +
+ + { if (!isRepeat) db.updateDelegate(key, d => { d.stats.timesSpoken++; }) }} + /> +
+
\ No newline at end of file diff --git a/src/lib/components/motions/UnmodCaucus.svelte b/src/lib/components/motions/page/UnmodCaucus.svelte similarity index 100% rename from src/lib/components/motions/UnmodCaucus.svelte rename to src/lib/components/motions/page/UnmodCaucus.svelte diff --git a/src/routes/dashboard/current-motion/+page.svelte b/src/routes/dashboard/current-motion/+page.svelte index f494de7..d95af01 100644 --- a/src/routes/dashboard/current-motion/+page.svelte +++ b/src/routes/dashboard/current-motion/+page.svelte @@ -1,8 +1,8 @@
From 9705a805998f2d4aa3dd96a5444f0f5b2211885d Mon Sep 17 00:00:00 2001 From: Henry Bui Date: Thu, 9 Jan 2025 23:20:27 -0500 Subject: [PATCH 07/21] LabeledSlideToggle, MetaTags, Navigation, SettingsNavigation --- src/lib/components/IconLabel.svelte | 2 +- src/lib/components/LabeledSlideToggle.svelte | 2 -- src/lib/components/MetaTags.svelte | 6 ++++ src/lib/components/nav/Navigation.svelte | 12 +++++++ .../components/nav/SettingsNavigation.svelte | 32 +++++++++++++++---- src/routes/dashboard/+layout.svelte | 2 +- 6 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/lib/components/IconLabel.svelte b/src/lib/components/IconLabel.svelte index faef141..c5ce8fb 100644 --- a/src/lib/components/IconLabel.svelte +++ b/src/lib/components/IconLabel.svelte @@ -1,5 +1,5 @@ -