diff --git a/frontend/src/app/enhance/[tokenId]/_components/ResultCard.tsx b/frontend/src/app/enhance/[tokenId]/_components/ResultCard.tsx
index 9299c57..bd1d92c 100644
--- a/frontend/src/app/enhance/[tokenId]/_components/ResultCard.tsx
+++ b/frontend/src/app/enhance/[tokenId]/_components/ResultCard.tsx
@@ -6,7 +6,7 @@
import Link from "next/link";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { designName, RARITY_LABEL } from "@/components/envelope/designs";
+import { designName, RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import type { EnvelopeView } from "@/lib/near";
import { BUTTON_PRIMARY, BUTTON_SECONDARY, envelopeName } from "../../../envelopes/_components/shared";
@@ -108,9 +108,14 @@ function Success({ outcome, name, design }: { outcome: EnhanceOutcome; name: str
+{outcome.from} → +{outcome.to}
- {rarityUp
- ? `${RARITY_LABEL[before].toUpperCase()} → ${RARITY_LABEL[after].toUpperCase()} · Rarity upgraded`
- : `${RARITY_LABEL[after].toUpperCase()} · Level upgraded`}
+ {rarityUp && (
+ <>
+ {RARITY_LABEL[before].toUpperCase()}
+ →
+ >
+ )}
+ {RARITY_LABEL[after].toUpperCase()}
+ {rarityUp ? " · Rarity upgraded" : " · Level upgraded"}
{name}
One attempt used. A new chapter for your {designName(design)} Envelope.
@@ -128,7 +133,8 @@ function Failure({ outcome, name, design }: { outcome: EnhanceOutcome; name: str
{name} remains at +{outcome.from}.
- {RARITY_LABEL[rarityOf(outcome.from)].toUpperCase()} · Your level and rarity are unchanged.
+ {RARITY_LABEL[rarityOf(outcome.from)].toUpperCase()} ·
+ Your level and rarity are unchanged.
>
);
diff --git a/frontend/src/app/enhance/[tokenId]/page.tsx b/frontend/src/app/enhance/[tokenId]/page.tsx
index 93b7509..a1f3a32 100644
--- a/frontend/src/app/enhance/[tokenId]/page.tsx
+++ b/frontend/src/app/enhance/[tokenId]/page.tsx
@@ -9,7 +9,7 @@ import { useParams, useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { useNear, type EnvelopeView } from "@/lib/near";
import {
@@ -119,7 +119,7 @@ export default function EnhancePage() {
+{envelope.level}
- {RARITY_LABEL[envelope.rarity]}
+ {RARITY_LABEL[envelope.rarity]}
diff --git a/frontend/src/app/envelopes/[tokenId]/_components/EnvelopeHero.tsx b/frontend/src/app/envelopes/[tokenId]/_components/EnvelopeHero.tsx
index fd6219d..3ff398c 100644
--- a/frontend/src/app/envelopes/[tokenId]/_components/EnvelopeHero.tsx
+++ b/frontend/src/app/envelopes/[tokenId]/_components/EnvelopeHero.tsx
@@ -4,7 +4,7 @@
import Link from "next/link";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { shortAccount, type EnvelopeView } from "@/lib/near";
import { BUTTON_PRIMARY, envelopeName } from "../../_components/shared";
@@ -18,10 +18,10 @@ export function EnvelopeHero({ envelope, isOwner }: { envelope: EnvelopeView; is
{envelopeName(envelope)} #{envelope.token_id}
-
+
+{envelope.level}
- /
- {RARITY_LABEL[envelope.rarity].toUpperCase()}
+ /
+ {RARITY_LABEL[envelope.rarity].toUpperCase()}
Current Owner: {shortAccount(envelope.owner_id)}
diff --git a/frontend/src/app/envelopes/[tokenId]/_components/OverviewTab.tsx b/frontend/src/app/envelopes/[tokenId]/_components/OverviewTab.tsx
index 270e0c4..59a49a0 100644
--- a/frontend/src/app/envelopes/[tokenId]/_components/OverviewTab.tsx
+++ b/frontend/src/app/envelopes/[tokenId]/_components/OverviewTab.tsx
@@ -3,7 +3,7 @@
import Link from "next/link";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { EXPLORER_URL, shortAccount, type EnvelopeView } from "@/lib/near";
import { BUTTON_SECONDARY, formatDate } from "../../_components/shared";
@@ -20,7 +20,7 @@ export function OverviewTab({
// MVP 강화는 실패해도 레벨이 내려가지 않으므로 성공 횟수 = 현재 레벨 (INTERFACE.md 강화)
const stats = [
{ label: "Level", value: `+${envelope.level}` },
- { label: "Rarity", value: RARITY_LABEL[envelope.rarity] },
+ { label: "Rarity", value: RARITY_LABEL[envelope.rarity], className: RARITY_TEXT[envelope.rarity] },
{ label: "Created", value: formatDate(envelope.created_at_ms) },
{ label: "Successful enhancements", value: String(envelope.level) },
{ label: "Times gifted", value: String(envelope.history.length) },
@@ -37,10 +37,10 @@ export function OverviewTab({
- {stats.map(({ label, value, title }) => (
+ {stats.map(({ label, value, title, className }) => (
- {label}
- -
+
-
{value}
diff --git a/frontend/src/app/envelopes/[tokenId]/open/page.tsx b/frontend/src/app/envelopes/[tokenId]/open/page.tsx
index f27d000..ba534ec 100644
--- a/frontend/src/app/envelopes/[tokenId]/open/page.tsx
+++ b/frontend/src/app/envelopes/[tokenId]/open/page.tsx
@@ -9,7 +9,7 @@ import { useParams } from "next/navigation";
import { useEffect, useState } from "react";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { GiftBanner } from "@/components/ui/GiftBanner";
import { displayName, useNear, type EnvelopeView, type VaultBalances } from "@/lib/near";
import { isOpened, isReceivedBy, markOpened } from "@/lib/opened";
@@ -121,7 +121,7 @@ export default function OpenEnvelopePage() {
{envelopeName(envelope)} +{envelope.level}
-
+
{RARITY_LABEL[envelope.rarity]}
@@ -175,7 +175,8 @@ function Opening({ envelope, from }: { envelope: EnvelopeView; from: string }) {
- {envelopeName(envelope)} +{envelope.level} · {RARITY_LABEL[envelope.rarity]}
+ {envelopeName(envelope)} +{envelope.level} ·{" "}
+ {RARITY_LABEL[envelope.rarity]}
Opening
@@ -230,7 +231,7 @@ function Revealed({
{envelopeName(envelope)} +{envelope.level}
- {RARITY_LABEL[envelope.rarity]} · Its story continues with you.
+ {RARITY_LABEL[envelope.rarity]} · Its story continues with you.
diff --git a/frontend/src/app/envelopes/[tokenId]/withdraw/_components/EnvelopeSideCard.tsx b/frontend/src/app/envelopes/[tokenId]/withdraw/_components/EnvelopeSideCard.tsx
index 8f64f8b..27ccf9a 100644
--- a/frontend/src/app/envelopes/[tokenId]/withdraw/_components/EnvelopeSideCard.tsx
+++ b/frontend/src/app/envelopes/[tokenId]/withdraw/_components/EnvelopeSideCard.tsx
@@ -2,7 +2,7 @@
// 소유자: C
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import type { EnvelopeView } from "@/lib/near";
import { envelopeName } from "../../../_components/shared";
@@ -21,7 +21,7 @@ export function EnvelopeSideCard({
{envelopeName(envelope)} #{envelope.token_id}
- +{envelope.level} · {RARITY_LABEL[envelope.rarity]}
+ +{envelope.level} · {RARITY_LABEL[envelope.rarity]}
{note}
diff --git a/frontend/src/app/envelopes/_components/EnvelopeListCard.tsx b/frontend/src/app/envelopes/_components/EnvelopeListCard.tsx
index d3c2215..d2abf3b 100644
--- a/frontend/src/app/envelopes/_components/EnvelopeListCard.tsx
+++ b/frontend/src/app/envelopes/_components/EnvelopeListCard.tsx
@@ -4,7 +4,7 @@
import Link from "next/link";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { displayName, type EnvelopeView } from "@/lib/near";
import { assetsText, BUTTON_SECONDARY, envelopeName, type BalancesResult } from "./shared";
@@ -27,7 +27,7 @@ export function EnvelopeListCard({
{envelopeName(envelope)} +{envelope.level}
-
+
{RARITY_LABEL[envelope.rarity]}
diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css
index 14dffd1..02e43be 100644
--- a/frontend/src/app/globals.css
+++ b/frontend/src/app/globals.css
@@ -17,6 +17,7 @@
--color-on-brand: #0a0a0a;
/* 희귀도 강조색 (봉투 그림 public/designs/와 같은 값) */
+ --color-common: #cfcfca;
--color-rare: #4da3ff;
--color-epic: #b57bff;
--color-legendary: #ffc83d;
diff --git a/frontend/src/app/missions/page.tsx b/frontend/src/app/missions/page.tsx
index b9a5551..7cad1f1 100644
--- a/frontend/src/app/missions/page.tsx
+++ b/frontend/src/app/missions/page.tsx
@@ -10,7 +10,7 @@ import { useSearchParams } from "next/navigation";
import { Suspense, useCallback, useEffect, useState } from "react";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { useNear, type EnvelopeView, type NearEventView } from "@/lib/near";
import {
@@ -186,7 +186,7 @@ function MissionBoard({
{envelopeName(e)} +{e.level}
- {RARITY_LABEL[e.rarity]} · #{e.token_id}
+ {RARITY_LABEL[e.rarity]} · #{e.token_id}
{attemptsText(e.enhance_tickets)}
@@ -204,7 +204,7 @@ function MissionBoard({
{label} +{selected.level}
- {RARITY_LABEL[selected.rarity]}
+ {RARITY_LABEL[selected.rarity]}
{attemptsText(selected.enhance_tickets)} ready
{selected.enhance_tickets > 0 && selected.level < 10 ? (
diff --git a/frontend/src/app/send/[tokenId]/AssetsStep.tsx b/frontend/src/app/send/[tokenId]/AssetsStep.tsx
index e8bed82..507f259 100644
--- a/frontend/src/app/send/[tokenId]/AssetsStep.tsx
+++ b/frontend/src/app/send/[tokenId]/AssetsStep.tsx
@@ -4,7 +4,7 @@
// 소유자: C
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import type { EnvelopeView, VaultBalances } from "@/lib/near";
import {
@@ -65,8 +65,9 @@ export function AssetsStep({
{envelopeTitle(envelope)}
-
- {RARITY_LABEL[envelope.rarity].toUpperCase()} · Gifted {gifted} {gifted === 1 ? "time" : "times"}
+
+ {RARITY_LABEL[envelope.rarity].toUpperCase()} · Gifted{" "}
+ {gifted} {gifted === 1 ? "time" : "times"}
Assets inside now: {formatAssets(inside) ?? "None"}
diff --git a/frontend/src/app/send/[tokenId]/PreviewStep.tsx b/frontend/src/app/send/[tokenId]/PreviewStep.tsx
index c8555b2..1a6ce48 100644
--- a/frontend/src/app/send/[tokenId]/PreviewStep.tsx
+++ b/frontend/src/app/send/[tokenId]/PreviewStep.tsx
@@ -4,7 +4,7 @@
// 소유자: C
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { displayName, type EnvelopeView } from "@/lib/near";
import { envelopeTitle, StepHeader } from "./shared";
@@ -44,7 +44,7 @@ export function PreviewStep({
{envelopeTitle(envelope)}
-
+
{RARITY_LABEL[envelope.rarity]}
diff --git a/frontend/src/app/send/[tokenId]/RecipientStep.tsx b/frontend/src/app/send/[tokenId]/RecipientStep.tsx
index 7ed128e..5d777cd 100644
--- a/frontend/src/app/send/[tokenId]/RecipientStep.tsx
+++ b/frontend/src/app/send/[tokenId]/RecipientStep.tsx
@@ -6,7 +6,7 @@
import { useEffect, useState } from "react";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { displayName, isValidAccountId, NETWORK, useNear, type EnvelopeView } from "@/lib/near";
import { envelopeTitle, StepHeader } from "./shared";
@@ -117,7 +117,7 @@ export function RecipientStep({
{envelopeTitle(envelope)}
-
+
{RARITY_LABEL[envelope.rarity]}
Inside: {totalText ?? "Nothing"}
diff --git a/frontend/src/app/send/[tokenId]/SentView.tsx b/frontend/src/app/send/[tokenId]/SentView.tsx
index 028c43a..6cc2b14 100644
--- a/frontend/src/app/send/[tokenId]/SentView.tsx
+++ b/frontend/src/app/send/[tokenId]/SentView.tsx
@@ -4,7 +4,7 @@
import Link from "next/link";
import { EnvelopeIllustration } from "@/components/envelope/EnvelopeIllustration";
-import { RARITY_LABEL } from "@/components/envelope/designs";
+import { RARITY_LABEL, RARITY_TEXT } from "@/components/envelope/designs";
import { displayName, EXPLORER_URL, type EnvelopeView } from "@/lib/near";
import { envelopeTitle } from "./shared";
@@ -30,7 +30,7 @@ export function SentView({
{envelopeTitle(envelope)}
-
+
{RARITY_LABEL[envelope.rarity]}
diff --git a/frontend/src/components/envelope/ChooseEnvelopeCard.tsx b/frontend/src/components/envelope/ChooseEnvelopeCard.tsx
index 50831aa..6b757ee 100644
--- a/frontend/src/components/envelope/ChooseEnvelopeCard.tsx
+++ b/frontend/src/components/envelope/ChooseEnvelopeCard.tsx
@@ -3,7 +3,7 @@
import type { EnvelopeView } from "@/lib/near";
-import { designName, RARITY_LABEL } from "./designs";
+import { designName, RARITY_LABEL, RARITY_TEXT } from "./designs";
import { EnvelopeIllustration } from "./EnvelopeIllustration";
const formatDate = (ms: number) =>
@@ -30,7 +30,7 @@ export function ChooseEnvelopeCard({
{designName(envelope.design)} Envelope +{envelope.level}
-
+
{RARITY_LABEL[envelope.rarity]}
diff --git a/frontend/src/components/envelope/ReceivedEnvelopeCard.tsx b/frontend/src/components/envelope/ReceivedEnvelopeCard.tsx
index b2d2b7c..6f6c0a7 100644
--- a/frontend/src/components/envelope/ReceivedEnvelopeCard.tsx
+++ b/frontend/src/components/envelope/ReceivedEnvelopeCard.tsx
@@ -5,7 +5,7 @@ import Link from "next/link";
import { displayName, type EnvelopeView } from "@/lib/near";
-import { designName, RARITY_LABEL } from "./designs";
+import { designName, RARITY_LABEL, RARITY_TEXT } from "./designs";
import { EnvelopeIllustration } from "./EnvelopeIllustration";
export function ReceivedEnvelopeCard({ envelope, opened }: { envelope: EnvelopeView; opened: boolean }) {
@@ -21,7 +21,7 @@ export function ReceivedEnvelopeCard({ envelope, opened }: { envelope: EnvelopeV
{designName(envelope.design)} Envelope +{envelope.level}
-
{RARITY_LABEL[envelope.rarity]}
+
{RARITY_LABEL[envelope.rarity]}
{from ? `From ${displayName(from)}` : "Minted by you"} · {opened ? "Opened" : "Unopened"}
diff --git a/frontend/src/components/envelope/designs.ts b/frontend/src/components/envelope/designs.ts
index dfad02a..aa8f427 100644
--- a/frontend/src/components/envelope/designs.ts
+++ b/frontend/src/components/envelope/designs.ts
@@ -8,6 +8,14 @@ export const DESIGN_NAMES = ["Classic", "Golden", "Midnight"] as const;
export const designName = (design: number) => DESIGN_NAMES[design] ?? "Classic";
/** 화면 표기용. 온체인 값 Basic은 시안대로 Common으로 보여 준다. */
+/** 희귀도 글자색 (globals.css --color-common / rare / epic / legendary, 봉투 그림과 같은 색) */
+export const RARITY_TEXT: Record
= {
+ Basic: "text-common",
+ Rare: "text-rare",
+ Epic: "text-epic",
+ Legendary: "text-legendary",
+};
+
export const RARITY_LABEL: Record = {
Basic: "Common",
Rare: "Rare",