Skip to content

Commit 927f09a

Browse files
committed
dark mode and localhost bug fixes
1 parent 02ccae8 commit 927f09a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/components/TheCycleEdit.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ watch(
5959
<dialog
6060
ref="dialog"
6161
:aria-labelledby="id + `-title`"
62-
class="m-auto translate-y-2 bg-transparent opacity-0 transition-all transition-discrete duration-500 backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-500 open:translate-0 open:opacity-100 open:backdrop:opacity-100 starting:open:translate-y-2 starting:open:opacity-0 starting:open:backdrop:opacity-0"
62+
class="m-auto translate-y-2 bg-transparent opacity-0 transition-all transition-discrete duration-500 backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-500 open:translate-0 open:opacity-100 open:backdrop:opacity-100 dark:backdrop:bg-stone-800/70 starting:open:translate-y-2 starting:open:opacity-0 starting:open:backdrop:opacity-0"
6363
closedby="any"
6464
@close="close"
6565
>

src/use/notification.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ export function useNotification() {
3030
notification.value = undefined;
3131
}
3232

33-
navigator.serviceWorker.getRegistration().then((registration) => {
34-
worker.value = registration;
35-
});
33+
if ('serviceWorker' in navigator) {
34+
navigator.serviceWorker.getRegistration().then((registration) => {
35+
worker.value = registration;
36+
});
37+
}
3638

3739
return {
3840
notify,

0 commit comments

Comments
 (0)