fix(webui): refine browser notifications (NAN-227)
Reconcile the original notification fix with the integrated main snapshot. Group notification settings and simplify localized copy and documentation. Preserve permission opt-out and notification click routing across app transitions. Suppress late completion notifications for discarded temporary chats and align notification settings skeletons with the loaded layout.
This commit is contained in:
1 parent
7b2af031c0
commit
11152626f8
34 files changed
+728
-289
No files matched your search
@@ -2,7 +2,6 @@ import type { Dispatch, SetStateAction } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { LanguageSwitcher } from "@/components/LanguageSwitcher";
|
||||
import { BrowserNotificationSettings } from "./BrowserNotificationSettings";
|
||||
import { SettingsGroup, SettingsRow, SettingsSectionTitle } from "@/components/settings/shared/SettingsControls";
|
||||
import { ToggleButton } from "@/components/ui/toggle-button";
|
||||
import { SegmentedControl } from "@/components/ui/segmented-control";
|
||||
@@ -101,24 +100,6 @@ export function AppearanceSettingsView({
|
||||
label={localPrefs.brandLogos ? tx("settings.values.on", "On") : tx("settings.values.off", "Off")}
|
||||
/>
|
||||
</SettingsRow>
|
||||
<BrowserNotificationSettings localPrefs={localPrefs} onChangeLocalPrefs={onChangeLocalPrefs} />
|
||||
<SettingsRow
|
||||
title={tx("settings.rows.notificationSound", "Completion sound")}
|
||||
description={tx(
|
||||
"settings.help.notificationSound",
|
||||
"Play a short chime when a turn finishes, even when this page is in the background. Off by default.",
|
||||
)}
|
||||
>
|
||||
<ToggleButton
|
||||
checked={localPrefs.notificationSound}
|
||||
onChange={(notificationSound) =>
|
||||
onChangeLocalPrefs((prev) => ({ ...prev, notificationSound }))}
|
||||
ariaLabel={tx("settings.rows.notificationSound", "Completion sound")}
|
||||
label={localPrefs.notificationSound
|
||||
? tx("settings.values.on", "On")
|
||||
: tx("settings.values.off", "Off")}
|
||||
/>
|
||||
</SettingsRow>
|
||||
</SettingsGroup>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user