Skip to content

Commit 4569d25

Browse files
committed
Fixing a useless button
1 parent bc7080e commit 4569d25

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/routes/+page.svelte

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
}
2626
2727
if (d.getSeconds() == 0) {
28-
if (format(d, "HH:mm") == nightmode_on) {
28+
if (format(d, "HH:mm") == nightmode_on && auto_nightmode) {
2929
on = false;
3030
}
31-
if (format(d, "HH:mm") == nightmode_off) {
31+
if (format(d, "HH:mm") == nightmode_off && auto_nightmode) {
3232
on = true;
3333
}
3434
@@ -236,7 +236,9 @@
236236
let theme = $state(getLocalStorage("theme", "lightblue"));
237237
let second_settings = $state(getLocalStorage("seconds", 1));
238238
let hour_gong = $state(getLocalStorage("hour", false) == "true");
239-
let auto_nightmode = $state(getLocalStorage("autonightmode", false) == "true");
239+
let auto_nightmode = $state(
240+
getLocalStorage("autonightmode", false) == "true",
241+
);
240242
let alarms = $state(JSON.parse(getLocalStorage("alarms", "[]")));
241243
let notifications = $state(
242244
JSON.parse(getLocalStorage("notifications", "[]")),
@@ -547,7 +549,8 @@
547549
right to navigate the bottom bar.
548550
</p>
549551
<p>
550-
You can also swipe to the left on the first page to quickly edit alarms.
552+
You can also swipe to the left on the first page to quickly edit
553+
alarms.
551554
</p>
552555
{/if}
553556
</div>
@@ -626,7 +629,9 @@
626629
>Black</button
627630
>
628631
{:else if page_number == 7}
629-
<button type="button" onclick={() => reset()}>Reset all settings and reload</button>
632+
<button type="button" onclick={() => reset()}
633+
>Reset all settings and reload</button
634+
>
630635
{/if}
631636
</div>
632637
{/key}

0 commit comments

Comments
 (0)