Skip to content

feat: optional sound feedback for viewer Next / Close buttons - #426

Closed
lihuang wants to merge 1 commit into
julyx10:mainfrom
lihuang:claude/affectionate-wozniak-ye2kmg
Closed

lihuang wants to merge 1 commit into
julyx10:mainfrom
lihuang:claude/affectionate-wozniak-ye2kmg

Conversation

@lihuang

@lihuang lihuang commented Oct 15, 2026 •

Copy link
Copy Markdown

Fixes #424

What

Adds an optional Button sound toggle under Settings → Viewer → Navigation (off by default). When enabled, clicking the Next or Close button in the media viewer plays a short, quiet tone:

  • Next: short higher tone (880 Hz, ~60 ms); not played when already on the last item
  • Close: slightly lower tone (440 Hz, ~90 ms)

Why

On macOS it can be hard to tell whether a click on Next/Close registered, especially with similar-looking consecutive photos. A subtle audio cue gives immediate confirmation (see #424).

How

  • src-vite/src/common/sound.ts: tiny helper that synthesizes the tones with the Web Audio API, so there are no audio assets and no new dependencies
  • MediaViewer.vue: only the Next/Close button clicks (toolbar, overlay arrow, close buttons) play the sound; keyboard and mouse-wheel navigation stay silent, so fast browsing isn't noisy
  • New setting settings.viewerButtonSound (default false), synced across windows like the other viewer settings
  • Strings added for all 15 locales

Testing

  • Built and ran with cargo tauri dev on macOS (Apple Silicon): with the toggle on, Next/Close play the tone; with it off, no sound
  • pnpm build and pnpm test:startup pass

Screenshot

截屏2026-10-15 18 15 14

Claude-Session: https://claude.ai/code/session_01GAqDoZqsLeVU3BPxtiKN5L

Add a "Button sound" toggle (off by default) to Settings > Viewer > Navigation.
When enabled, clicking the Next or Close button in the media viewer plays a
short tone synthesized with the Web Audio API, so no audio assets or new
dependencies are added. Keyboard and mouse-wheel navigation stay silent.

Refs julyx10#424

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAqDoZqsLeVU3BPxtiKN5L
@julyx10 julyx10 closed this Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] Add sound feedback for “Next” and “Close” buttons on macOS

3 participants