feat: sound system — 12 new sounds + navigation category; dashboard FAB widget button

Sounds:
- UI: modal_open, modal_close, tab_switch, delete
- Navigation (new category): page_enter, section_reveal
- Classroom: timer_warning, wb_clear, file_shared
- Gamification: challenge_complete, daily_login
- Quiz: time_up, quiz_bonus

Dashboard:
- Widget configurator moved from header to fixed FAB (bottom-right)
  no longer pushed off-screen by wide sidebar

Profile settings:
- Added Navigation category toggle
- Expanded preview section: 12 test buttons covering all categories

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Maxim Dolgolyov
2026-04-14 20:26:04 +03:00
parent 89ba25cd20
commit f3c9ab860e
3 changed files with 169 additions and 45 deletions
+56 -10
View File
@@ -819,7 +819,7 @@
<div class="p-card-icon"><i data-lucide="volume-2" style="width:15px;height:15px"></i></div>
<div>
<div class="p-card-title">Звуки системы</div>
<div class="p-card-sub">Уведомления, геймификация, classroom, квизы</div>
<div class="p-card-sub">Синтезированные — не требуют загрузки файлов</div>
</div>
</div>
@@ -854,7 +854,7 @@
<div class="pref-row">
<div class="pref-row-info">
<div class="pref-row-label">Интерфейс</div>
<div class="pref-row-desc">Клики, успех, ошибки, уведомления</div>
<div class="pref-row-desc">Клики, модальные окна, удаление, уведомления</div>
</div>
<label class="pref-toggle">
<input type="checkbox" id="pref-sfx-ui" onchange="prefSfxCat('ui',this.checked)">
@@ -862,11 +862,23 @@
</label>
</div>
<!-- Navigation sounds -->
<div class="pref-row">
<div class="pref-row-info">
<div class="pref-row-label">Навигация</div>
<div class="pref-row-desc">Переходы между страницами и секциями</div>
</div>
<label class="pref-toggle">
<input type="checkbox" id="pref-sfx-navigation" onchange="prefSfxCat('navigation',this.checked)">
<span class="pref-toggle-track"></span>
</label>
</div>
<!-- Classroom sounds -->
<div class="pref-row">
<div class="pref-row-info">
<div class="pref-row-label">Classroom</div>
<div class="pref-row-desc">Урок, участники, чат, рука, рисование</div>
<div class="pref-row-desc">Урок, участники, таймер, доска, файлы</div>
</div>
<label class="pref-toggle">
<input type="checkbox" id="pref-sfx-classroom" onchange="prefSfxCat('classroom',this.checked)">
@@ -878,7 +890,7 @@
<div class="pref-row">
<div class="pref-row-info">
<div class="pref-row-label">Геймификация</div>
<div class="pref-row-desc">XP, уровень, достижения, монеты</div>
<div class="pref-row-desc">XP, уровень, достижения, испытания, вход</div>
</div>
<label class="pref-toggle">
<input type="checkbox" id="pref-sfx-gamification" onchange="prefSfxCat('gamification',this.checked)">
@@ -890,7 +902,7 @@
<div class="pref-row">
<div class="pref-row-info">
<div class="pref-row-label">Квизы</div>
<div class="pref-row-desc">Старт вопроса, правильно, неправильно</div>
<div class="pref-row-desc">Старт, правильно/неправильно, таймер, бонус</div>
</div>
<label class="pref-toggle">
<input type="checkbox" id="pref-sfx-quiz" onchange="prefSfxCat('quiz',this.checked)">
@@ -898,23 +910,56 @@
</label>
</div>
<!-- Test button -->
<div style="margin-top:14px;display:flex;gap:8px;flex-wrap:wrap">
<!-- Preview buttons -->
<div class="pref-section-label" style="margin-top:14px">Прослушать</div>
<div style="display:flex;gap:8px;flex-wrap:wrap;margin-top:8px">
<button class="pref-test-btn" onclick="prefSfxTest('notification')">
<i data-lucide="bell" style="width:12px;height:12px;vertical-align:-2px"></i>
Уведомление
</button>
<button class="pref-test-btn" onclick="prefSfxTest('success')">
<i data-lucide="check-circle" style="width:12px;height:12px;vertical-align:-2px"></i>
Успех
</button>
<button class="pref-test-btn" onclick="prefSfxTest('error')">
<i data-lucide="x-circle" style="width:12px;height:12px;vertical-align:-2px"></i>
Ошибка
</button>
<button class="pref-test-btn" onclick="prefSfxTest('modal_open')">
<i data-lucide="layout" style="width:12px;height:12px;vertical-align:-2px"></i>
Модал
</button>
<button class="pref-test-btn" onclick="prefSfxTest('page_enter')">
<i data-lucide="arrow-right" style="width:12px;height:12px;vertical-align:-2px"></i>
Навигация
</button>
<button class="pref-test-btn" onclick="prefSfxTest('lesson_start')">
<i data-lucide="play" style="width:12px;height:12px;vertical-align:-2px"></i>
Урок
</button>
<button class="pref-test-btn" onclick="prefSfxTest('timer_warning')">
<i data-lucide="clock" style="width:12px;height:12px;vertical-align:-2px"></i>
Таймер
</button>
<button class="pref-test-btn" onclick="prefSfxTest('achievement')">
<i data-lucide="trophy" style="width:12px;height:12px;vertical-align:-2px"></i>
Ачивка
</button>
<button class="pref-test-btn" onclick="prefSfxTest('challenge_complete')">
<i data-lucide="target" style="width:12px;height:12px;vertical-align:-2px"></i>
Испытание
</button>
<button class="pref-test-btn" onclick="prefSfxTest('level_up')">
<i data-lucide="zap" style="width:12px;height:12px;vertical-align:-2px"></i>
Уровень
</button>
<button class="pref-test-btn" onclick="prefSfxTest('lesson_start')">
<i data-lucide="play" style="width:12px;height:12px;vertical-align:-2px"></i>
Урок
<button class="pref-test-btn" onclick="prefSfxTest('quiz_correct')">
<i data-lucide="check" style="width:12px;height:12px;vertical-align:-2px"></i>
Правильно
</button>
<button class="pref-test-btn" onclick="prefSfxTest('time_up')">
<i data-lucide="timer-off" style="width:12px;height:12px;vertical-align:-2px"></i>
Время вышло
</button>
</div>
</div>
@@ -1537,6 +1582,7 @@
const setChk = (id, v) => { const el = document.getElementById(id); if (el) el.checked = v; };
setChk('pref-sfx-enabled', sfx.enabled);
setChk('pref-sfx-ui', sfx.prefs.ui);
setChk('pref-sfx-navigation', sfx.prefs.navigation !== false);
setChk('pref-sfx-classroom', sfx.prefs.classroom);
setChk('pref-sfx-gamification', sfx.prefs.gamification);
setChk('pref-sfx-quiz', sfx.prefs.quiz);