bugfix: hide language button when starting game

This commit is contained in:
evanpelle
2026-01-06 09:33:25 -08:00
parent 69fe93f6ff
commit 24716f848d
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -20,6 +20,7 @@ export class LangSelector extends LitElement {
@state() private languageList: any[] = [];
@state() private showModal: boolean = false;
@state() private debugMode: boolean = false;
@state() isVisible = true;
private debugKeyPressed: boolean = false;
private languageMetadata: LanguageMetadata[] = metadata;
@@ -248,7 +249,16 @@ export class LangSelector extends LitElement {
await this.loadLanguageList();
}
public close() {
this.showModal = false;
this.isVisible = false;
this.requestUpdate();
}
render() {
if (!this.isVisible) {
return html``;
}
const currentLang =
this.languageList.find((l) => l.code === this.currentLang) ??
(this.currentLang === "debug"
+1
View File
@@ -560,6 +560,7 @@ class Client {
"stats-button",
"token-login",
"matchmaking-modal",
"lang-selector",
].forEach((tag) => {
const modal = document.querySelector(tag) as HTMLElement & {
close?: () => void;