feat: improve toast UI, add-modal cookie handling, and completion sounds

- Refine toast animations and durations
- Prevent extension-captured cookies from being sent across cross-origin redirects
- Clear stale extension metadata properly for single-link handoffs
- Disable completion sound by default and update settings labels
- Handle AudioContext suspension for completion chimes
This commit is contained in:
NimBold
2026-07-04 05:32:40 +03:30
parent 84a4ff4bfc
commit 4a322196de
7 changed files with 162 additions and 80 deletions
+7 -5
View File
@@ -44,13 +44,17 @@ const getScheduledQueueIds = () => {
type AudioContextConstructor = typeof AudioContext;
const playCompletionChime = () => {
const playCompletionChime = async () => {
const AudioCtor =
window.AudioContext ||
(window as Window & { webkitAudioContext?: AudioContextConstructor }).webkitAudioContext;
if (!AudioCtor) return;
const context = new AudioCtor();
if (context.state === 'suspended') {
await context.resume();
}
const oscillator = context.createOscillator();
const gain = context.createGain();
oscillator.type = 'sine';
@@ -551,11 +555,9 @@ function App() {
if (event.payload.status !== 'completed' && event.payload.status !== 'failed') return;
const settings = useSettingsStore.getState();
if (event.payload.status === 'completed' && settings.playCompletionSound) {
try {
playCompletionChime();
} catch (error) {
playCompletionChime().catch(error => {
console.error('Completion sound failed:', error);
}
});
}
if (!settings.showNotifications) return;