web: add notification sound toggle and complete notifications module
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
This commit is contained in:
@@ -6,6 +6,7 @@ export interface AppPreferences {
|
||||
messageFontSize: number;
|
||||
sendMode: SendMode;
|
||||
webNotifications: boolean;
|
||||
notificationSound: boolean;
|
||||
privateNotifications: boolean;
|
||||
groupNotifications: boolean;
|
||||
channelNotifications: boolean;
|
||||
@@ -19,6 +20,7 @@ const DEFAULTS: AppPreferences = {
|
||||
messageFontSize: 16,
|
||||
sendMode: "enter",
|
||||
webNotifications: true,
|
||||
notificationSound: true,
|
||||
privateNotifications: true,
|
||||
groupNotifications: true,
|
||||
channelNotifications: true,
|
||||
@@ -40,6 +42,7 @@ export function getAppPreferences(): AppPreferences {
|
||||
messageFontSize: normalizeFontSize(parsed.messageFontSize),
|
||||
sendMode: parsed.sendMode === "ctrl_enter" ? "ctrl_enter" : "enter",
|
||||
webNotifications: typeof parsed.webNotifications === "boolean" ? parsed.webNotifications : DEFAULTS.webNotifications,
|
||||
notificationSound: typeof parsed.notificationSound === "boolean" ? parsed.notificationSound : DEFAULTS.notificationSound,
|
||||
privateNotifications: typeof parsed.privateNotifications === "boolean" ? parsed.privateNotifications : DEFAULTS.privateNotifications,
|
||||
groupNotifications: typeof parsed.groupNotifications === "boolean" ? parsed.groupNotifications : DEFAULTS.groupNotifications,
|
||||
channelNotifications: typeof parsed.channelNotifications === "boolean" ? parsed.channelNotifications : DEFAULTS.channelNotifications,
|
||||
|
||||
Reference in New Issue
Block a user