summaryrefslogtreecommitdiff
path: root/client-web/source/preferences
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source/preferences')
-rw-r--r--client-web/source/preferences/ui.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client-web/source/preferences/ui.ts b/client-web/source/preferences/ui.ts
index 1aaaca0..3461da9 100644
--- a/client-web/source/preferences/ui.ts
+++ b/client-web/source/preferences/ui.ts
@@ -1,4 +1,4 @@
-import { ediv, elabel, espan, OverlayUi } from "../helper.ts";
+import { ebr, ebutton, ediv, elabel, espan, OverlayUi } from "../helper.ts";
import { PREF_DECLS } from "./decl.ts";
import { change_pref, PrefDecl, PREFS } from "./mod.ts";
@@ -21,7 +21,11 @@ export class PrefUi extends OverlayUi {
}
return espan(`(not implemented)`)
})
- super(ediv({ class: "prefs-overlay" }, ...elements))
+ const notification_perm = Notification.permission == "granted" ? ediv() : ediv({},
+ espan("For keks-meet to send notifications, it needs you to grant permission: "),
+ ebutton("Grant", { onclick: () => Notification.requestPermission() }),
+ )
+ super(ediv({ class: "prefs-overlay" }, notification_perm, ebr(), ...elements))
}
}