feat(sidebar): redesign sidebar UI with three user states (light theme)
Replace the dark sidebar theme with a light-themed three-state UI
matching the design references:
- guest : pink "login" pill in user row, no status pill on VIP card,
"Activate VIP Membership" button shown
- member : "VIP membership not activated" subtitle, no status pill,
"Activate VIP Membership" button shown
- vip : pink "VIP Member" pill with diamond icon, "Activated" pill
in VIP card header, no Activate button
Decompose into BackBar, UserHeader, VipBenefitsCard, and VoicePackageCard
under src/app/sidebar/components/. Delete obsolete GuestPanel,
UserInfoCard, and VipCta.
Lift VIP_BENEFITS to a shared src/data/constants/vip-benefits.ts so the
sidebar and subscription page render identical benefit copy.
Add five sidebar tokens (--color-card-surface, --color-voice-gradient-*
--border-card, --shadow-card, --color-pill-bg) to src/tokens/colors.css.
Includes barrelsby regeneration for src/app/sidebar/components and
side-effect barrel updates under src/stores/{auth,chat,sidebar,user},
plus package-lock.json from npm install (required for lint/typecheck).
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
/* 双层 background 实现 pink → orange 渐变描边 */
|
||||
.card {
|
||||
background:
|
||||
linear-gradient(#ffffff, #ffffff) padding-box,
|
||||
linear-gradient(
|
||||
135deg,
|
||||
var(--color-voice-gradient-start, #ff6fa3),
|
||||
var(--color-voice-gradient-end, #ff9a5a)
|
||||
) border-box;
|
||||
border: var(--border-card, 1.5px) solid transparent;
|
||||
border-radius: var(--radius-xl, 16px);
|
||||
box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.04));
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--spacing-md, 12px);
|
||||
padding: var(--spacing-lg, 16px) var(--spacing-lg, 16px) var(--spacing-sm, 8px);
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-lg, 16px);
|
||||
font-weight: 700;
|
||||
color: var(--color-accent, #f84d96);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.micIcon {
|
||||
flex: 0 0 auto;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 50%;
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
var(--color-voice-gradient-start, #ff6fa3),
|
||||
var(--color-voice-gradient-end, #ff9a5a)
|
||||
);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 4px 12px rgba(255, 111, 163, 0.25);
|
||||
}
|
||||
|
||||
.micGlyph {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.usage {
|
||||
margin: 0;
|
||||
padding: 0 var(--spacing-lg, 16px);
|
||||
font-size: var(--font-size-md, 14px);
|
||||
color: var(--color-text-secondary, #9e9e9e);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.usageNumber {
|
||||
color: var(--color-accent, #f84d96);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.usageText {
|
||||
color: var(--color-text-secondary, #9e9e9e);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: var(--spacing-md, 12px) var(--spacing-lg, 16px) var(--spacing-lg, 16px);
|
||||
}
|
||||
|
||||
.buyBtn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: var(--spacing-md, 12px) var(--spacing-lg, 16px);
|
||||
border-radius: var(--radius-full, 999px);
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
var(--color-button-gradient-start, #ff67e0),
|
||||
var(--color-button-gradient-end, #ff52a2)
|
||||
);
|
||||
color: var(--color-text-primary, #ffffff);
|
||||
font-size: var(--font-size-md, 14px);
|
||||
font-weight: 600;
|
||||
border: 0;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.buyBtn:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.buyBtn:focus-visible {
|
||||
outline: 2px solid var(--color-accent, #f84d96);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
Reference in New Issue
Block a user