diff --git a/resources/lang/en.json b/resources/lang/en.json index 5633e3cd4..49bf7e135 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -1253,7 +1253,6 @@ "confirm_downgrade": "Downgrade to {tier}? You'll get account credit for the unused portion of your current plan.", "confirm_upgrade": "Upgrade to {tier}? You'll be charged the prorated difference now.", "currency_pack_purchase_success": "Currency pack purchase successful!", - "current_plan": "Current Plan", "flags": "Flags", "login_required": "You must be logged in to purchase with currency.", "no_flags": "No flags available. Check back later for new items.", @@ -1266,7 +1265,7 @@ "price_per_month": "/mo", "purchase_failed": "Purchase failed. Please try again.", "purchase_success": "Purchase succeeded: {name}", - "subscribe_button": "Subscribe", + "subscribed": "Subscribed", "subscription_purchase_success": "Subscription activated!", "subscriptions": "Subscriptions", "switch_button": "Switch", @@ -1288,7 +1287,6 @@ "pattern": { "default": "Default" }, - "purchase": "Purchase", "search": "Search...", "select_skin": "Select Skin", "selected": "selected", diff --git a/src/client/components/CosmeticButton.ts b/src/client/components/CosmeticButton.ts index 2a705a995..871ad74db 100644 --- a/src/client/components/CosmeticButton.ts +++ b/src/client/components/CosmeticButton.ts @@ -19,7 +19,6 @@ import "./CosmeticContainer"; import "./CosmeticInfo"; import { renderPatternPreview } from "./PatternPreview"; import "./PlutoniumIcon"; -import { DEFAULT_DOLLAR_LABEL_KEY } from "./PurchaseButton"; @customElement("cosmetic-button") export class CosmeticButton extends LitElement { @@ -265,12 +264,11 @@ export class CosmeticButton extends LitElement { const isSkin = type === "skin"; const isOwnedSubscription = type === "subscription" && active.relationship === "owned"; + // Switching tiers shows "Switch"; a first-time subscribe shows price only. const dollarLabelKey = - type === "subscription" - ? this.userHasSubscription - ? "store.switch_button" - : "store.subscribe_button" - : DEFAULT_DOLLAR_LABEL_KEY; + type === "subscription" && this.userHasSubscription + ? "store.switch_button" + : ""; const priceSuffix = type === "subscription" ? translateText("store.price_per_month") : ""; const sizeClass = type === "flag" ? "gap-1 p-1.5 w-36" : "gap-2 p-3 w-48"; @@ -329,9 +327,9 @@ export class CosmeticButton extends LitElement { ${this.renderColorSwatches()} ${isOwnedSubscription ? html`
- ${translateText("store.current_plan")} + ${translateText("store.subscribed")}
` : nothing} diff --git a/src/client/components/CosmeticContainer.ts b/src/client/components/CosmeticContainer.ts index d63c90b2d..113207348 100644 --- a/src/client/components/CosmeticContainer.ts +++ b/src/client/components/CosmeticContainer.ts @@ -2,7 +2,6 @@ import { html, LitElement } from "lit"; import { customElement, property } from "lit/decorators.js"; import { Product } from "../../core/CosmeticSchemas"; import "./PurchaseButton"; -import { DEFAULT_DOLLAR_LABEL_KEY } from "./PurchaseButton"; type Rarity = "common" | "uncommon" | "rare" | "epic" | "legendary" | string; @@ -159,9 +158,9 @@ export class CosmeticContainer extends LitElement { @property({ type: Number }) priceSoft: number | null = null; - /** Override the dollar-button label key. */ + /** Optional action-label key for the dollar button; empty shows price alone. */ @property({ type: String }) - dollarLabelKey: string = DEFAULT_DOLLAR_LABEL_KEY; + dollarLabelKey: string = ""; /** Optional suffix appended to the displayed price, e.g. "/mo". */ @property({ type: String }) diff --git a/src/client/components/PurchaseButton.ts b/src/client/components/PurchaseButton.ts index 8210b8750..44edd514c 100644 --- a/src/client/components/PurchaseButton.ts +++ b/src/client/components/PurchaseButton.ts @@ -5,8 +5,6 @@ import { translateText } from "../Utils"; import "./CapIcon"; import "./PlutoniumIcon"; -export const DEFAULT_DOLLAR_LABEL_KEY = "territory_patterns.purchase"; - const PURCHASE_STYLE_ID = "purchase-button-styles"; if (!document.getElementById(PURCHASE_STYLE_ID)) { const style = document.createElement("style"); @@ -192,9 +190,10 @@ export class PurchaseButton extends LitElement { @property({ type: String }) rarity: string = "common"; - /** Override the dollar-button label key. */ + /** Optional action-label key shown before the price (e.g. "Switch"). Empty + * shows the price on its own. */ @property({ type: String }) - dollarLabelKey: string = DEFAULT_DOLLAR_LABEL_KEY; + dollarLabelKey: string = ""; /** Optional suffix appended to the displayed price, e.g. "/mo". Not translated here. */ @property({ type: String }) @@ -231,15 +230,14 @@ export class PurchaseButton extends LitElement { private renderDollarButton() { return html` `; }