mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 09:30:45 +00:00
remove tag_not_member
This commit is contained in:
@@ -662,8 +662,7 @@
|
||||
"tag_too_short": "Clan tag must be 2-5 alphanumeric characters.",
|
||||
"tag_too_long": "Clan tag cannot exceed 5 characters.",
|
||||
"tag_invalid_chars": "Clan tag can only contain letters and numbers.",
|
||||
"tag_not_member": "Join the {tag} clan before using its tag.",
|
||||
"tag_checking": "Checking clan tag…"
|
||||
"tag_not_member": "Join the {tag} clan before using its tag."
|
||||
},
|
||||
"host_modal": {
|
||||
"title": "Create Private Lobby",
|
||||
|
||||
@@ -47,16 +47,6 @@ export class GameModeSelector extends LitElement {
|
||||
return this;
|
||||
}
|
||||
|
||||
private identityTooltip(): string {
|
||||
if (this.identity.validating) {
|
||||
return translateText("username.tag_checking");
|
||||
}
|
||||
const { username, clanTag } = this.identity.state;
|
||||
if (!username.valid) return username.error;
|
||||
if (!clanTag.valid) return clanTag.error;
|
||||
return "";
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.lobbySocket.start();
|
||||
@@ -258,12 +248,10 @@ export class GameModeSelector extends LitElement {
|
||||
bgClass: string = CARD_BG,
|
||||
) {
|
||||
const disabled = !this.identity.ready;
|
||||
const tip = this.identityTooltip();
|
||||
return html`
|
||||
<button
|
||||
@click=${onClick}
|
||||
?disabled=${disabled}
|
||||
title=${disabled && tip ? tip : ""}
|
||||
aria-busy=${this.identity.validating ? "true" : "false"}
|
||||
class="flex items-center justify-center w-full h-full rounded-lg ${bgClass} transition-all duration-200 text-sm lg:text-base font-medium text-white uppercase tracking-wider text-center disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100 disabled:hover:brightness-100"
|
||||
>
|
||||
@@ -309,12 +297,10 @@ export class GameModeSelector extends LitElement {
|
||||
}
|
||||
|
||||
const disabled = !this.identity.ready;
|
||||
const tip = this.identityTooltip();
|
||||
return html`
|
||||
<button
|
||||
@click=${() => this.joinPublicLobby(lobby)}
|
||||
?disabled=${disabled}
|
||||
title=${disabled && tip ? tip : ""}
|
||||
aria-busy=${this.identity.validating ? "true" : "false"}
|
||||
class="group relative w-full h-44 sm:h-full text-white uppercase rounded-2xl transition-all duration-200 hover:scale-[1.02] active:scale-[0.98] bg-surface hover:shadow-[var(--shadow-lobby-card-hover)] disabled:opacity-60 disabled:cursor-not-allowed disabled:hover:scale-100"
|
||||
>
|
||||
|
||||
@@ -419,11 +419,9 @@ export class HostLobbyModal extends BaseModal {
|
||||
variant="primary"
|
||||
width="block"
|
||||
size="lg"
|
||||
.title=${this.identity.validating
|
||||
? translateText("username.tag_checking")
|
||||
: this.clients.length === 1
|
||||
? translateText("host_modal.waiting")
|
||||
: translateText("host_modal.start")}
|
||||
.title=${this.clients.length === 1
|
||||
? translateText("host_modal.waiting")
|
||||
: translateText("host_modal.start")}
|
||||
?disable=${this.clients.length < 2 || !this.identity.ready}
|
||||
@click=${this.startGame}
|
||||
></o-button>
|
||||
|
||||
@@ -252,11 +252,7 @@ export class JoinLobbyModal extends BaseModal {
|
||||
></o-button>
|
||||
</div>
|
||||
<o-button
|
||||
title=${
|
||||
this.identity.validating
|
||||
? translateText("username.tag_checking")
|
||||
: translateText("private_lobby.join_lobby")
|
||||
}
|
||||
title=${translateText("private_lobby.join_lobby")}
|
||||
width="block"
|
||||
submit
|
||||
?disable=${!this.identity.ready}
|
||||
|
||||
@@ -229,11 +229,6 @@ export class MatchmakingButton extends LitElement {
|
||||
|
||||
render() {
|
||||
const disabled = this.isLoggedIn && !this.identity.ready;
|
||||
const title = disabled
|
||||
? this.identity.validating
|
||||
? translateText("username.tag_checking")
|
||||
: translateText("matchmaking_modal.title")
|
||||
: translateText("matchmaking_modal.title");
|
||||
return this.isLoggedIn
|
||||
? html`
|
||||
<button
|
||||
@@ -241,7 +236,7 @@ export class MatchmakingButton extends LitElement {
|
||||
?disabled=${disabled}
|
||||
aria-busy=${this.identity.validating ? "true" : "false"}
|
||||
class="no-crazygames w-full h-20 bg-purple-600 hover:bg-purple-500 text-white font-black uppercase tracking-widest rounded-xl transition-all duration-200 flex flex-col items-center justify-center group overflow-hidden relative disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-purple-600"
|
||||
title="${title}"
|
||||
title="${translateText("matchmaking_modal.title")}"
|
||||
>
|
||||
<span class="relative z-10 text-2xl">
|
||||
${translateText("matchmaking_button.play_ranked")}
|
||||
|
||||
@@ -359,11 +359,7 @@ export class SinglePlayerModal extends BaseModal {
|
||||
variant="primary"
|
||||
width="block"
|
||||
size="lg"
|
||||
translationKey=${
|
||||
this.identity.validating
|
||||
? "username.tag_checking"
|
||||
: "single_modal.start"
|
||||
}
|
||||
translationKey="single_modal.start"
|
||||
?disable=${!this.identity.ready}
|
||||
@click=${this.startGame}
|
||||
></o-button>
|
||||
|
||||
@@ -125,9 +125,6 @@ export class RankedModal extends BaseModal {
|
||||
<button
|
||||
@click=${onClick}
|
||||
?disabled=${disabled}
|
||||
title=${disabled && this.identity.validating
|
||||
? translateText("username.tag_checking")
|
||||
: ""}
|
||||
aria-busy=${this.identity.validating ? "true" : "false"}
|
||||
class="flex flex-col w-full h-28 sm:h-32 rounded-2xl bg-surface border-0 transition-transform hover:scale-[1.02] active:scale-[0.98] p-6 items-center justify-center gap-3 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user