Merge pull request #819 from pyrater/staging

Show / Hide Top Bar
This commit is contained in:
Cohee 2023-07-30 16:38:44 +03:00 committed by GitHub
commit 6d9c2ec365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 0 deletions

View File

@ -3823,6 +3823,10 @@
<i class="fa-lg fa-solid fa-repeat"></i> <i class="fa-lg fa-solid fa-repeat"></i>
<span data-i18n="Regenerate">Regenerate</span> <span data-i18n="Regenerate">Regenerate</span>
</a> </a>
<a id="option_settings">
<i class="fa-lg fa-solid fa-cog"></i>
<span data-i18n="Settings">Settings</span>
</a>
</div> </div>
</div> </div>

View File

@ -7751,6 +7751,31 @@ $(document).ready(function () {
else if (id == "option_delete_mes") { else if (id == "option_delete_mes") {
setTimeout(openMessageDelete, animation_duration); setTimeout(openMessageDelete, animation_duration);
} }
else if (id === "option_settings") {
//var checkBox = document.getElementById("waifuMode");
var topBar = document.getElementById("top-bar");
var topSettingsHolder = document.getElementById("top-settings-holder");
var divchat = document.getElementById("chat");
//if (checkBox.checked) {
if (topBar.style.display === "none") {
topBar.style.display = ""; // or "inline-block" if that's the original display value
topSettingsHolder.style.display = ""; // or "inline-block" if that's the original display value
divchat.style.borderRadius = "";
divchat.style.backgroundColor = "";
} else {
divchat.style.borderRadius = "10px"; // Adjust the value to control the roundness of the corners
divchat.style.backgroundColor = "#f0f0f0"; // Set the background color to your preference
topBar.style.display = "none";
topSettingsHolder.style.display = "none";
}
//}
}
hideMenu(); hideMenu();
}); });