aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/preferences/ui.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-10 18:22:46 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-10 18:22:46 +0200
commitf268bd2087fbfb57b8504becf364a00ddebde075 (patch)
tree54c0e27bdfb32d553d13addc1de69b56b86630c1 /client-web/source/preferences/ui.ts
parentd889e1b572952c5777fc2bb147f04ad8baf7f497 (diff)
downloadkeks-meet-f268bd2087fbfb57b8504becf364a00ddebde075.tar
keks-meet-f268bd2087fbfb57b8504becf364a00ddebde075.tar.bz2
keks-meet-f268bd2087fbfb57b8504becf364a00ddebde075.tar.zst
notifications for chat
Diffstat (limited to 'client-web/source/preferences/ui.ts')
-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))
}
}