diff --git a/index.html b/index.html index 4051834..3f708f2 100644 --- a/index.html +++ b/index.html @@ -208,7 +208,7 @@ .settingsbody { - height: calc(75vh - 110px); + height: calc(80vh - 100px); overflow-y: auto; overflow-x: hidden; } @@ -2162,6 +2162,7 @@ padding: 8px; padding-left: 0px; float: right; + background-color: #00000000; } .corpo_leftpanel_open { @@ -2173,6 +2174,14 @@ { background: #dddddd; } + body.darkmode .corpo_leftpanel_open + { + background: #333333; + } + body.darkmode .corpo_leftpanel_open:hover + { + background: #444444; + } .corpo_arrow_right { display: inline-block; width: 0; @@ -4087,6 +4096,7 @@ invert_colors: false, passed_ai_warning: false, //used to store AI safety panel acknowledgement state entersubmit: true, //enter sends the prompt + darkmode: true, max_context_length: (localflag?2048:1600), max_length: 200, @@ -4425,12 +4435,13 @@ document.getElementById("enhancedchatinterface").classList.add("transparentbg"); document.getElementById("enhancedchatinterface_inner").classList.add("transparentbg"); } - populate_corpo_leftpanel(); loadok = true; } else { console.log("Skipped missing local save"); loadok = false; } + populate_corpo_leftpanel(); + update_toggle_theme(false); //load theme but dont save or toggle it } catch (e) { console.log("Discarded invalid local save: " + e); @@ -9061,36 +9072,30 @@ function display_settings_tab(tabidx) { current_settings_tab_idx = tabidx; - document.getElementById("settingsmenubasic_tab").classList.remove("active"); document.getElementById("settingsmenusamplers_tab").classList.remove("active"); document.getElementById("settingsmenuformat_tab").classList.remove("active"); document.getElementById("settingsmenumedia_tab").classList.remove("active"); document.getElementById("settingsmenuadvanced_tab").classList.remove("active"); - document.getElementById("settingsmenubasic").classList.add("hidden"); document.getElementById("settingsmenusamplers").classList.add("hidden"); document.getElementById("settingsmenuformat").classList.add("hidden"); document.getElementById("settingsmenumedia").classList.add("hidden"); document.getElementById("settingsmenuadvanced").classList.add("hidden"); switch (tabidx) { - case 0: //basic - document.getElementById("settingsmenubasic").classList.remove("hidden"); - document.getElementById("settingsmenubasic_tab").classList.add("active"); + case 0: //format + document.getElementById("settingsmenuformat").classList.remove("hidden"); + document.getElementById("settingsmenuformat_tab").classList.add("active"); break; case 1: //samplers document.getElementById("settingsmenusamplers").classList.remove("hidden"); document.getElementById("settingsmenusamplers_tab").classList.add("active"); break; - case 2: //format - document.getElementById("settingsmenuformat").classList.remove("hidden"); - document.getElementById("settingsmenuformat_tab").classList.add("active"); - break; - case 3: //media + case 2: //media document.getElementById("settingsmenumedia").classList.remove("hidden"); document.getElementById("settingsmenumedia_tab").classList.add("active"); break; - case 4: //advanced + case 3: //advanced document.getElementById("settingsmenuadvanced").classList.remove("hidden"); document.getElementById("settingsmenuadvanced_tab").classList.add("active"); break; @@ -9715,10 +9720,10 @@ else { document.getElementById('btn_aesthetics').classList.add('hidden'); } switch(document.getElementById('gui_type').value) { - case "0": document.getElementById("guitypedesc").innerText = "The classic Kobold Blue theme we know and love."; break; + case "0": document.getElementById("guitypedesc").innerText = "The classic Kobold Blue theme everyone loves."; break; case "1": document.getElementById("guitypedesc").innerText = "A compact instant messenger styled chat theme."; break; - case "2": document.getElementById("guitypedesc").innerText = "Ultra customizable aesthetic theme, great for character cards."; break; - case "3": document.getElementById("guitypedesc").innerText = "A clean, minimalistic, corporate AI assistant theme."; break; + case "2": document.getElementById("guitypedesc").innerText = "Customizable aesthetic theme with character portraits."; break; + case "3": document.getElementById("guitypedesc").innerText = "Clean, minimalistic, corporate AI assistant theme."; break; default: document.getElementById("guitypedesc").innerText = ""; break; } } @@ -9727,10 +9732,10 @@ switch(document.getElementById('opmode').value) { - case "1": document.getElementById("opmodedesc").innerText = "Let the AI continue writing a story or text."; break; - case "2": document.getElementById("opmodedesc").innerText = "Participate in a co-written, turn-based interactive adventure."; break; - case "3": document.getElementById("opmodedesc").innerText = "Take turns roleplaying with a virtual chatbot AI."; break; - case "4": document.getElementById("opmodedesc").innerText = "Give the AI instructions, ask questions, or perform tasks."; break; + case "1": document.getElementById("opmodedesc").innerText = "Let the AI co-write a story."; break; + case "2": document.getElementById("opmodedesc").innerText = "Participate in turn-based interactive adventures."; break; + case "3": document.getElementById("opmodedesc").innerText = "Roleplay with a virtual chatbot AI."; break; + case "4": document.getElementById("opmodedesc").innerText = "Give the AI instructions, questions, or do tasks."; break; default: document.getElementById("opmodedesc").innerText = ""; break; } @@ -10106,6 +10111,7 @@ } warn_on_quit = false; show_corpo_leftpanel(false); + update_toggle_theme(false); //load theme but dont save or toggle it render_gametext(save); //necessary to trigger an autosave to wipe out current story in case they exit browser after newgame. } @@ -14875,9 +14881,22 @@ return newbodystr; } - function btn_theme() + function update_toggle_theme(toggle=false) { - document.body.classList.toggle('darkmode'); + if(toggle) + { + localsettings.darkmode = !localsettings.darkmode; + autosave(); + } + + if(localsettings.darkmode) + { + document.body.classList.add('darkmode'); + } + else + { + document.body.classList.remove('darkmode'); + } } @@ -14888,7 +14907,7 @@
New Chat
Context
Raw Editor
-
Theme
+
Light / Dark Theme
Quick Slot Load
`; @@ -16371,7 +16390,7 @@ - +
@@ -16915,51 +16934,177 @@