mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-23 15:26:50 +00:00
Change variable name from dKeyPressed to debugKeyPressed in LangSelector (#1583)
## Description: Renamed dKeyPressed to debugKeyPressed to better reflect the actual key used for debug mode activation. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I have read and accepted the CLA agreement (only required once).
This commit is contained in:
@@ -39,7 +39,7 @@ export class LangSelector extends LitElement {
|
||||
@state() private showModal: boolean = false;
|
||||
@state() private debugMode: boolean = false;
|
||||
|
||||
private dKeyPressed: boolean = false;
|
||||
private debugKeyPressed: boolean = false;
|
||||
|
||||
private languageMap: Record<string, any> = {
|
||||
ar,
|
||||
@@ -83,10 +83,10 @@ export class LangSelector extends LitElement {
|
||||
|
||||
private setupDebugKey() {
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.key.toLowerCase() === "t") this.dKeyPressed = true;
|
||||
if (e.key.toLowerCase() === "t") this.debugKeyPressed = true;
|
||||
});
|
||||
window.addEventListener("keyup", (e) => {
|
||||
if (e.key.toLowerCase() === "t") this.dKeyPressed = false;
|
||||
if (e.key.toLowerCase() === "t") this.debugKeyPressed = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ export class LangSelector extends LitElement {
|
||||
}
|
||||
|
||||
let debugLang: any = null;
|
||||
if (this.dKeyPressed) {
|
||||
if (this.debugKeyPressed) {
|
||||
debugLang = {
|
||||
code: "debug",
|
||||
native: "Debug",
|
||||
@@ -264,7 +264,7 @@ export class LangSelector extends LitElement {
|
||||
}
|
||||
|
||||
private openModal() {
|
||||
this.debugMode = this.dKeyPressed;
|
||||
this.debugMode = this.debugKeyPressed;
|
||||
this.showModal = true;
|
||||
this.loadLanguageList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user