mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-23 18:33:07 +00:00
Add anonymous name toggle to user settings (#661)
## Description: Added a new toggle to user settings I deleted some leftover files that were no longer in use in order to eliminate errors. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: aotumuri
This commit is contained in:
@@ -102,6 +102,15 @@ export class UserSettingModal extends LitElement {
|
||||
console.log("🤡 Emojis:", enabled ? "ON" : "OFF");
|
||||
}
|
||||
|
||||
private toggleAnonymousNames(e: CustomEvent<{ checked: boolean }>) {
|
||||
const enabled = e.detail?.checked;
|
||||
if (typeof enabled !== "boolean") return;
|
||||
|
||||
this.userSettings.set("settings.anonymousNames", enabled);
|
||||
|
||||
console.log("🙈 Anonymous Names:", enabled ? "ON" : "OFF");
|
||||
}
|
||||
|
||||
private toggleLeftClickOpensMenu(e: CustomEvent<{ checked: boolean }>) {
|
||||
const enabled = e.detail?.checked;
|
||||
if (typeof enabled !== "boolean") return;
|
||||
@@ -226,6 +235,15 @@ export class UserSettingModal extends LitElement {
|
||||
@change=${this.toggleLeftClickOpensMenu}
|
||||
></setting-toggle>
|
||||
|
||||
<!-- 🙈 Anonymous Names -->
|
||||
<setting-toggle
|
||||
label="${translateText("user_setting.anonymous_names_label")}"
|
||||
description="${translateText("user_setting.anonymous_names_desc")}"
|
||||
id="anonymous-names-toggle"
|
||||
.checked=${this.userSettings.anonymousNames()}
|
||||
@change=${this.toggleAnonymousNames}
|
||||
></setting-toggle>
|
||||
|
||||
<!-- ⚔️ Attack Ratio -->
|
||||
<setting-slider
|
||||
label="${translateText("user_setting.attack_ratio_label")}"
|
||||
|
||||
Reference in New Issue
Block a user