diff --git a/index.html b/index.html index c15810e54..3ef165efd 100644 --- a/index.html +++ b/index.html @@ -245,6 +245,11 @@ inline class="hidden w-full h-full page-content relative z-50" > + - diff --git a/src/client/TerritoryPatternsModal.ts b/src/client/TerritoryPatternsModal.ts index c4349f113..83cfe207f 100644 --- a/src/client/TerritoryPatternsModal.ts +++ b/src/client/TerritoryPatternsModal.ts @@ -25,7 +25,6 @@ export class TerritoryPatternsModal extends BaseModal { private cosmetics: Cosmetics | null = null; private userSettings: UserSettings = new UserSettings(); - private isActive = false; private userMeResponse: UserMeResponse | false = false; private _onPatternSelected = async () => { @@ -137,21 +136,25 @@ export class TerritoryPatternsModal extends BaseModal { } render() { - if (!this.isActive && !this.inline) return html``; - const content = html`
- ${modalHeader({ - title: translateText("territory_patterns.title"), - onBack: () => this.close(), - ariaLabel: translateText("common.back"), - rightContent: !hasLinkedAccount(this.userMeResponse) - ? html`
- ${this.renderNotLoggedInWarning()} -
` - : undefined, - })} -
+
+ ${modalHeader({ + title: translateText("territory_patterns.title"), + onBack: () => this.close(), + ariaLabel: translateText("common.back"), + rightContent: !hasLinkedAccount(this.userMeResponse) + ? html`
+ ${this.renderNotLoggedInWarning()} +
` + : undefined, + })} +
+
${this.renderPatternGrid()}
@@ -174,15 +177,8 @@ export class TerritoryPatternsModal extends BaseModal { `; } - public async open() { - this.isActive = true; + protected async onOpen(): Promise { await this.refresh(); - super.open(); - } - - public close() { - this.isActive = false; - super.close(); } private selectPattern(pattern: PlayerPattern | null) {