feat: make Web UI mood dropdowns Evil Mode-aware

- Disable per-server mood controls when Evil Miku is active
- Show explanatory notice for disabled server mood dropdowns
- Populate global mood dropdown with evil moods when Evil Mode is on
- Fix initialization race condition by awaiting evil mode status first
- Add CSS styles for disabled mood controls
This commit is contained in:
2026-05-18 21:43:44 +03:00
parent 27f0659cc8
commit 7cb21a372b
4 changed files with 112 additions and 28 deletions

View File

@@ -383,7 +383,7 @@ async function loadProfilePictureMetadata() {
// DOMContentLoaded — main initialization
// ============================================================================
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('DOMContentLoaded', async function() {
initTabState();
initTabWheelScroll();
initLogsScrollDetection();
@@ -391,12 +391,13 @@ document.addEventListener('DOMContentLoaded', function() {
initModalAccessibility();
initPromptSourceToggle();
// Load evil mode status FIRST so mood dropdowns populate with the correct list
await checkEvilModeStatus();
loadStatus();
loadServers();
populateMoodDropdowns();
loadServers(); // internally calls populateMoodDropdowns() with correct evilMode
loadLastPrompt();
loadLogs();
checkEvilModeStatus();
checkBipolarModeStatus();
checkGPUStatus();
refreshLanguageStatus();