feat(shared,web-admin,desktop-client,build): beUI 动效层与两端深色主题,全项目图标改用设计导出的新图标
动效层:把 beUI 的动效语言移植到两端,令牌放在 packages/shared/src/motion.ts(纯常量,后端也引用得到)。弹簧用数值积分生成 CSS linear(),纯 CSS 即可驱动,不必每组件一个 rAF 循环;两端各一份 composables/motion.ts 负责 DOM 部分,在 app.mount() 之前注入 :root。含 reduced-motion 全局降级与 hover 能力探测;灵动岛只移植单调曲线。
深色主题:Web 管理端补齐,机制与桌面客户端一致;语义色令牌只覆盖颜色,不动圆角与动效令牌。默认跟随系统,用户手动点过之后以用户为准。
图标:build/classhelper.{png,ico} 成为全项目唯一图形源,pnpm icons 从它派生各端图标与界面内品牌标。版本号统一到 1.1.2。
This commit is contained in:
1 parent
82c85b59c1
commit
ce9bed73f4
59 files changed
+2974
-336
No files matched your search
@@ -9,6 +9,8 @@ import {
|
||||
type DashboardSummary,
|
||||
} from '@classhelper/shared';
|
||||
import { dashboardApi, notificationApi } from '@/api';
|
||||
import StatCard from '@/components/StatCard.vue';
|
||||
import { useStaggerIn } from '@/composables/motion';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
import { useRealtimeStore } from '@/stores/realtime';
|
||||
import { SOCKET_EVENTS, type NotificationDto } from '@classhelper/shared';
|
||||
@@ -38,6 +40,12 @@ const statCards = computed(() => {
|
||||
];
|
||||
});
|
||||
|
||||
/**
|
||||
* 统计卡片的错峰入场(beUI 的 stagger reveal):按索引下发 `--ch-reveal-delay`,
|
||||
* 让七张卡片依次浮现而不是"啪"地一起出现。延迟在 `.ch-reveal` 里生效。
|
||||
*/
|
||||
const revealStyle = useStaggerIn();
|
||||
|
||||
async function load(): Promise<void> {
|
||||
loading.value = true;
|
||||
try {
|
||||
@@ -93,11 +101,13 @@ function openNotification(item: NotificationDto): void {
|
||||
</div>
|
||||
|
||||
<div class="stat-grid">
|
||||
<div v-for="card in statCards" :key="card.label" class="stat-card">
|
||||
<div class="stat-label">{{ card.label }}</div>
|
||||
<div class="stat-value">{{ card.value }}</div>
|
||||
<div class="stat-hint">{{ card.hint }}</div>
|
||||
</div>
|
||||
<StatCard
|
||||
v-for="(card, index) in statCards"
|
||||
:key="card.label"
|
||||
v-bind="card"
|
||||
class="ch-reveal"
|
||||
:style="revealStyle(index)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<el-row :gutter="12" class="mt-16">
|
||||
|
||||
@@ -623,14 +623,14 @@ onUnmounted(() => {
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
color: #909399;
|
||||
color: var(--ch-text-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.content-block {
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.7;
|
||||
background: #fafafa;
|
||||
background: var(--ch-surface-sunken);
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
margin: 0;
|
||||
@@ -659,7 +659,7 @@ onUnmounted(() => {
|
||||
.submission-list {
|
||||
max-height: 46vh;
|
||||
overflow-y: auto;
|
||||
border: 1px solid #eef0f5;
|
||||
border: 1px solid var(--ch-border);
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ async function submit(): Promise<void> {
|
||||
<div class="login-page">
|
||||
<div class="login-card">
|
||||
<div class="login-brand">
|
||||
<el-icon :size="30" color="#409eff"><School /></el-icon>
|
||||
<img class="login-logo" src="/logo.png" alt="" width="44" height="44" />
|
||||
<div>
|
||||
<h1 class="login-title">班级小助手</h1>
|
||||
<p class="login-subtitle">Web 管理端 · 教师 / 管理员登录</p>
|
||||
@@ -81,6 +81,13 @@ async function submit(): Promise<void> {
|
||||
border-radius: 14px;
|
||||
padding: 30px 28px 22px;
|
||||
box-shadow: 0 18px 40px rgba(15, 30, 50, 0.28);
|
||||
/*
|
||||
* 入场用 PANEL 弹簧(beUI 的 center-morph-modal 观感:从略小、略高处落下来)。
|
||||
* 登录页是整个应用里最"一次性"、最值得给一点分量的一屏 ——
|
||||
* 它不像弹窗那样会被反复开关,慢一点不会变成等待。
|
||||
* keyframes 定义在 styles/index.css 的动效层里(全局,scoped 样式也能引用)。
|
||||
*/
|
||||
animation: ch-panel-in var(--ch-spring-panel-dur) var(--ch-spring-panel) both;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@@ -105,6 +112,12 @@ async function submit(): Promise<void> {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
/* 品牌标:与应用图标同一份图(`public/logo.png`)。图自带圆角与透明边角,不要再加 border-radius。 */
|
||||
.login-logo {
|
||||
flex: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
font-size: 20px;
|
||||
margin: 0;
|
||||
@@ -113,7 +126,7 @@ async function submit(): Promise<void> {
|
||||
.login-subtitle {
|
||||
margin: 4px 0 0;
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
color: var(--ch-text-muted);
|
||||
}
|
||||
|
||||
.login-button {
|
||||
|
||||
@@ -352,7 +352,7 @@ async function submitCall(): Promise<void> {
|
||||
|
||||
.call-label {
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
color: var(--ch-text-secondary);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user