diff --git a/src/client/UsernameInput.ts b/src/client/UsernameInput.ts index ccc68437d..3867c51ae 100644 --- a/src/client/UsernameInput.ts +++ b/src/client/UsernameInput.ts @@ -27,6 +27,9 @@ export class UsernameInput extends LitElement { @state() private baseUsername: string = ""; @state() private clanTag: string = ""; + // Clans aren't supported on CrazyGames — hide the tag input and never submit one. + private readonly onCrazyGames = crazyGamesSDK.isOnCrazyGames(); + @property({ type: String }) validationError: string = ""; // Ownership-check feedback (i18n key) shown inline beneath the tag input. Only // "not a member" gates the buttons (see emitValidity); the rest is advisory. @@ -124,7 +127,9 @@ export class UsernameInput extends LitElement { private loadStoredUsername() { const storedUsername = localStorage.getItem(usernameKey); if (storedUsername) { - this.clanTag = localStorage.getItem(clanTagKey) ?? ""; + if (!this.onCrazyGames) { + this.clanTag = localStorage.getItem(clanTagKey) ?? ""; + } this.baseUsername = storedUsername; this.validateAndStore(); this.startClanCheck(); @@ -137,7 +142,7 @@ export class UsernameInput extends LitElement { render() { return html`