ac0db6118d
新增主题变量 (light + dark 两套): - --success-rgb / --danger / --danger-rgb (utils/theme.js) 全部硬编码 #XXX / rgba 颜色统一改主题变量: - progress-ring 加 trackColor prop,默认 #EEEEEE (canvas 不能直接读 CSS var,需要 caller 传字面颜色) - ui-modal sheet 背景 #FFFFFF → var(--card-bg), 加底部 padding 避开 Dock TabBar - ui-modal handle #DDD → var(--bg-soft) - ui-btn --danger 文字 #E53935 → var(--danger), 边框 rgba(229,57,53,...) → rgba(var(--danger-rgb),...) - calendar-heatmap 三个 #999/#333 文字色 → var(--text-secondary)/var(--text) - index picker: preset/custom input 背景 #F5F5F5 → var(--bg-soft), label #666 → var(--text-secondary) - index done-badge 绿色 → var(--success-rgb), pending-text #CCC → var(--text-secondary) - records empty/hint #CCC/#E0E0E0 → var(--text-secondary), danger 红 → var(--danger) - settings plan-editor-sheet 背景 #FFFFFF → var(--card-bg), avatar 背景, handle, editor-input, preview 全部跟进 - leaderboard 金/铜背景 #FFF7E6/#FFF1E6 → rgba 半透明 (dark mode 下不刺眼) Tab bar inactive 图标重新根据 dark mode 切换颜色 (#999999 light / #98989F dark) leaderboard.json 删除 backgroundColor: #F5F5F5 覆盖,让 theme.json 接管 故意保留: - 各 .wxss 中渐变按钮上的 #FFFFFF 文字色 - 排行榜金/铜文字色 #FA8C16/#D46B08 (视觉符号约定) - 各页 data 中 orange theme 默认值 (onShow 后被 themeMod 覆盖)
257 lines
4.6 KiB
Plaintext
257 lines
4.6 KiB
Plaintext
.container {
|
|
padding: 0;
|
|
padding-bottom: calc(134rpx + env(safe-area-inset-bottom));
|
|
min-height: 100vh;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Period tabs */
|
|
.period-tabs {
|
|
display: flex;
|
|
background: var(--card-bg);
|
|
padding: 0 32rpx;
|
|
border-bottom: 1rpx solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
.period-tab {
|
|
flex: 1;
|
|
text-align: center;
|
|
padding: 24rpx 0 20rpx;
|
|
font-size: 30rpx;
|
|
color: var(--text-secondary);
|
|
position: relative;
|
|
transition: color 0.2s, background-color 0.3s ease;
|
|
}
|
|
|
|
.period-tab.active {
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.period-tab.active::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 40rpx;
|
|
height: 6rpx;
|
|
border-radius: 3rpx;
|
|
background: var(--primary);
|
|
}
|
|
|
|
/* Status */
|
|
.status-wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding-top: 120rpx;
|
|
}
|
|
|
|
.status-text {
|
|
font-size: 28rpx;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.empty-icon {
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
opacity: 0.3;
|
|
margin-bottom: 24rpx;
|
|
}
|
|
|
|
.empty-text {
|
|
font-size: 30rpx;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.empty-sub {
|
|
font-size: 26rpx;
|
|
color: var(--text-secondary);
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Rank list */
|
|
.rank-list {
|
|
padding: 16rpx 24rpx;
|
|
}
|
|
|
|
.rank-item {
|
|
display: flex;
|
|
align-items: center;
|
|
background: var(--card-bg);
|
|
border-radius: 16rpx;
|
|
padding: 20rpx 24rpx;
|
|
margin-bottom: 12rpx;
|
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
|
transition: background-color 0.3s ease, border-color 0.3s ease;
|
|
}
|
|
|
|
.rank-item.is-me {
|
|
background: rgba(var(--primary-rgb), 0.12);
|
|
border: 2rpx solid var(--primary);
|
|
}
|
|
|
|
/* Rank number */
|
|
.rank-num {
|
|
width: 56rpx;
|
|
height: 56rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 28rpx;
|
|
font-weight: 700;
|
|
color: var(--text-secondary);
|
|
border-radius: 50%;
|
|
background: var(--bg-soft);
|
|
flex-shrink: 0;
|
|
margin-right: 16rpx;
|
|
}
|
|
|
|
.rank-num.gold { background: rgba(250, 140, 22, 0.15); color: #FA8C16; font-size: 36rpx; }
|
|
.rank-num.silver { background: var(--bg-soft); color: #8C8C8C; font-size: 36rpx; }
|
|
.rank-num.bronze { background: rgba(212, 107, 8, 0.15); color: #D46B08; font-size: 36rpx; }
|
|
|
|
.rank-avatar {
|
|
width: 64rpx;
|
|
height: 64rpx;
|
|
border-radius: 50%;
|
|
background: var(--bg-soft);
|
|
flex-shrink: 0;
|
|
margin-right: 16rpx;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.rank-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.rank-name {
|
|
font-size: 28rpx;
|
|
font-weight: 500;
|
|
color: var(--text);
|
|
display: block;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.rank-sessions {
|
|
font-size: 22rpx;
|
|
color: var(--text-secondary);
|
|
margin-top: 4rpx;
|
|
}
|
|
|
|
.rank-dur {
|
|
font-size: 30rpx;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
flex-shrink: 0;
|
|
margin-left: 16rpx;
|
|
}
|
|
|
|
/* My rank bar (pinned) */
|
|
.my-bar {
|
|
position: fixed;
|
|
bottom: calc(110rpx + env(safe-area-inset-bottom));
|
|
left: 24rpx;
|
|
right: 24rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
background: rgba(var(--primary-rgb), 0.12);
|
|
border: 2rpx solid var(--primary);
|
|
border-radius: 16rpx;
|
|
padding: 16rpx 24rpx;
|
|
z-index: 10;
|
|
box-shadow: 0 -4rpx 16rpx rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.my-bar .rank-name {
|
|
color: var(--primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* ---- rank item entrance animation ---- */
|
|
.rank-item--enter {
|
|
animation: rankIn 0.4s cubic-bezier(0.2, 0, 0.2, 1) both;
|
|
}
|
|
|
|
@keyframes rankIn {
|
|
from { opacity: 0; transform: translateX(-20rpx); }
|
|
to { opacity: 1; transform: translateX(0); }
|
|
}
|
|
|
|
/* ---- empty state illustration ---- */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 80rpx 32rpx;
|
|
}
|
|
|
|
.empty-illus {
|
|
position: relative;
|
|
width: 200rpx;
|
|
height: 200rpx;
|
|
margin-bottom: 40rpx;
|
|
}
|
|
|
|
.empty-illus-body {
|
|
position: absolute;
|
|
bottom: 30rpx;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 160rpx;
|
|
height: 30rpx;
|
|
background: linear-gradient(90deg, var(--primary), var(--primary-light));
|
|
border-radius: 16rpx;
|
|
}
|
|
|
|
.empty-illus-arm {
|
|
position: absolute;
|
|
bottom: 36rpx;
|
|
width: 20rpx;
|
|
height: 60rpx;
|
|
background: var(--primary);
|
|
border-radius: 10rpx;
|
|
}
|
|
|
|
.empty-illus-arm--l {
|
|
left: 30rpx;
|
|
transform: rotate(30deg);
|
|
}
|
|
|
|
.empty-illus-arm--r {
|
|
right: 30rpx;
|
|
transform: rotate(-30deg);
|
|
}
|
|
|
|
.empty-illus-bubble {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
background: var(--primary-bg);
|
|
color: var(--primary);
|
|
font-size: 22rpx;
|
|
font-weight: 600;
|
|
padding: 8rpx 16rpx;
|
|
border-radius: 16rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.empty-text {
|
|
font-size: 30rpx;
|
|
color: var(--text);
|
|
margin-bottom: 12rpx;
|
|
}
|
|
|
|
.empty-sub {
|
|
font-size: 26rpx;
|
|
color: var(--text-secondary);
|
|
}
|