功能:大卡片/小卡片弹出时播放叮咚通知音

effect-sounds.js:
- 新增 ding() 函数:A5(880Hz) + E5(659Hz) 两音叮咚
  每音含基音×2.76铃铛泛音,快冲击+铃铛式衰减
  自动检查 chat_sound_muted 禁音标志
- 导出 ding 至返回对象,底部暴露 window.chatSound = {ding}

toast-notification.blade.php:
- chatToast.show() 中 appendChild 后调用 window.chatSound.ding()

scripts.blade.php:
- chatBanner.show() 开头调用 window.chatSound.ding()
This commit is contained in:
2026-03-01 13:28:19 +08:00
parent dac7750fe1
commit 58b63fa8d3
3 changed files with 77 additions and 1 deletions
@@ -822,6 +822,9 @@
function show(opts = {}) {
ensureKeyframes();
// 大卡片弹出时播放叮咚通知音
if (window.chatSound) window.chatSound.ding();
const id = opts.id || 'chat-banner-default';
const gradient = (opts.gradient || ['#4f46e5', '#7c3aed', '#db2777']).join(', ');
const titleColor = opts.titleColor || '#fde68a';