mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-24 23:32:24 +00:00
Restore subscriptions in store and account modal (#4461)
Reverts cdcc7747 ("Hide subscriptions in store and account modal behind
a feature flag").
This re-adds the Subscriptions tab to the store, restores the
subscription panel on the account modal, and re-enables the cosmetics
fetch — removing the `SUBSCRIPTIONS_ENABLED` feature flag that gated
them all behind `false`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
@@ -27,7 +27,7 @@ import "./components/Difficulties";
|
||||
import "./components/FriendsList";
|
||||
import "./components/SubscriptionPanel";
|
||||
import { modalHeader } from "./components/ui/ModalHeader";
|
||||
import { fetchCosmetics, SUBSCRIPTIONS_ENABLED } from "./Cosmetics";
|
||||
import { fetchCosmetics } from "./Cosmetics";
|
||||
import { translateText } from "./Utils";
|
||||
|
||||
@customElement("account-modal")
|
||||
@@ -38,9 +38,9 @@ export class AccountModal extends BaseModal {
|
||||
@state() private isLoadingUser: boolean = false;
|
||||
|
||||
private userMeResponse: UserMeResponse | null = null;
|
||||
private cosmetics: Cosmetics | null = null;
|
||||
private statsTree: PlayerStatsTree | null = null;
|
||||
private recentGames: PlayerGame[] = [];
|
||||
private cosmetics: Cosmetics | null = null;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -231,7 +231,6 @@ export class AccountModal extends BaseModal {
|
||||
}
|
||||
|
||||
private renderSubscriptionPanel(): TemplateResult | "" {
|
||||
if (!SUBSCRIPTIONS_ENABLED) return "";
|
||||
const sub = this.userMeResponse?.player?.subscription;
|
||||
if (!sub) return "";
|
||||
const cosmetic = this.cosmetics?.subscriptions?.[sub.tier] ?? null;
|
||||
@@ -552,12 +551,10 @@ export class AccountModal extends BaseModal {
|
||||
this.isLoadingUser = true;
|
||||
this.handleLinkResult(args);
|
||||
|
||||
if (SUBSCRIPTIONS_ENABLED) {
|
||||
void fetchCosmetics().then((cosmetics) => {
|
||||
this.cosmetics = cosmetics;
|
||||
this.requestUpdate();
|
||||
});
|
||||
}
|
||||
void fetchCosmetics().then((cosmetics) => {
|
||||
this.cosmetics = cosmetics;
|
||||
this.requestUpdate();
|
||||
});
|
||||
|
||||
void getUserMe()
|
||||
.then((userMe) => {
|
||||
|
||||
Reference in New Issue
Block a user