Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,8 @@
"legendary": "Legendary",
"adfree": "ad-free for life!",
"hard": "Plutonium",
"soft": "Caps"
"soft": "Caps",
"free": "+{numFree} BONUS!"
},
"flag_input": {
"title": "Select Flag",
Expand Down
11 changes: 10 additions & 1 deletion src/client/components/CosmeticButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class CosmeticButton extends LitElement {
const colorClass = isHard ? "text-green-400" : "text-amber-700";
const currencyKey = isHard ? "cosmetics.hard" : "cosmetics.soft";
return html`<div
class="flex flex-col items-center justify-end h-full w-full text-center gap-1 pb-1"
class="relative flex flex-col items-center justify-end h-full w-full text-center gap-1 pb-1"
>
${icon}
<span class="text-lg font-black ${colorClass}"
Expand All @@ -88,6 +88,15 @@ export class CosmeticButton extends LitElement {
<span class="text-[10px] font-bold text-white/50 uppercase"
>${translateText(currencyKey)}</span
>
${pack.bonusAmount > 0
? html`<div
class="absolute top-3 -right-8 bg-green-500 text-white text-[10px] font-black px-8 py-0.5 rotate-45 shadow-md uppercase tracking-wide pointer-events-none"
>
${translateText("cosmetics.free", {
numFree: pack.bonusAmount.toLocaleString(),
})}
</div>`
: nothing}
</div>`;
}

Expand Down
1 change: 1 addition & 0 deletions src/core/CosmeticSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const PackSchema = CosmeticSchema.extend({
displayName: z.string(),
currency: z.enum(["hard", "soft"]),
amount: z.number().int().positive(),
bonusAmount: z.number().int().nonnegative(),
Comment thread
evanpelle marked this conversation as resolved.
});

// Schema for resources/cosmetics/cosmetics.json
Expand Down
Loading