Compare commits

...
3 Commits
Author SHA1 Message Date
Henry_Du be2e979252 style(ui): 苹果风格二次打磨,统一圆角与材质并移除残留位移动效
Azure Static Web Apps CI/CD / Close Pull Request Job (push) Skipped
Azure Static Web Apps CI/CD / Build and Deploy Job (push) Failing after 18m55s
Build and Deploy / build (push) Failing after 18m56s
- 去除卡片内联硬编码圆角(6px/8px)与固定色值,统一走主题变量与 12px 圆角

- 笔记卡片取消上浮投影,改用按压与填充反馈;版权角标、滚动条、拖拽条改为随主题取色

- 全局补充:遮罩轻微虚化、输入框聚焦光晕、卡片标题排版、选中文本强调色

- 设置卡片的悬停投影改为描边反馈;修正 settings.scss 中无效的 rgb(a, x) 写法

- 服务选择入口去掉 2px 撞色描边与悬停投影,改为细描边与极淡渐变
2026-10-24 08:11:32 +08:00
Henry_Du 5cdfc70818 fix(dev): 读取本地 JSON 时剥离 UTF-8 BOM 并捕获解析异常
外部编辑器/同步工具写入的 data/*.json 带有 BOM,直接 JSON.parse 会抛错并导致 vite dev server 退出。现在统一剥离 BOM,解析失败时返回 500 而非中断进程。
2026-10-24 08:11:21 +08:00
Henry_Du 5aaa39d292 style(ui): 引入苹果风格主题与全局样式层
Azure Static Web Apps CI/CD / Close Pull Request Job (push) Skipped
Azure Static Web Apps CI/CD / Build and Deploy Job (push) Failing after 16s
Build and Deploy / build (push) Failing after 15m47s
新增 apple.scss 全局覆盖层:半透明材质顶栏/抽屉、细描边卡片、按压式按钮反馈、系统字体与尺寸相关字距;材质与描边均派生自 Vuetify 主题变量,浅色主题不受影响。

定义 Apple System Colors 暗色主题色板替代默认 Material 暗色;移除原有发光、径向高光与上浮悬停等装饰性动效,缓动曲线统一为 Apple 风格。
2026-10-24 01:49:28 +08:00
13 changed files with 557 additions and 338 deletions
+5 -4
View File
@@ -42,20 +42,21 @@ onMounted(() => {
@import "@/styles/index.scss"; @import "@/styles/index.scss";
@import "@/styles/transitions.scss"; @import "@/styles/transitions.scss";
@import "@/styles/global.scss"; @import "@/styles/global.scss";
@import "@/styles/apple.scss";
.md3-enter-active, .md3-enter-active,
.md3-leave-active { .md3-leave-active {
transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transition: opacity 0.28s cubic-bezier(0.32, 0.72, 0, 1),
transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
} }
.md3-enter-from { .md3-enter-from {
opacity: 0; opacity: 0;
transform: translateX(0.5vw); transform: scale(0.995);
} }
.md3-leave-to { .md3-leave-to {
opacity: 0; opacity: 0;
transform: translateX(-0.5vw); transform: scale(0.995);
} }
</style> </style>
+16 -8
View File
@@ -360,11 +360,18 @@ const openClassworksKV = () => {
.main-service-card { .main-service-card {
min-height: 100px; min-height: 100px;
cursor: pointer; cursor: pointer;
transition: all 0.3s ease; transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out),
transform 0.14s var(--apple-ease-out);
} }
.main-service-card:hover { .main-service-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; border-color: var(--apple-hairline-strong) !important;
}
.main-service-card:active {
transform: scale(0.995);
transition-duration: 0.08s;
} }
.main-service-card .v-card-item { .main-service-card .v-card-item {
@@ -386,19 +393,20 @@ const openClassworksKV = () => {
text-align: left; text-align: left;
} }
/* 三档入口:取自主题强调色,只做极淡的底色渐变与一道细描边 */
.gradient-new { .gradient-new {
background: linear-gradient(135deg, rgba(33, 150, 243, .12), rgba(103, 80, 164, 0.08) 60%); background-image: linear-gradient(135deg, rgba(var(--v-theme-primary), 0.12), transparent 70%);
border: 2px solid rgba(33, 150, 243, .2); border: 1px solid rgba(var(--v-theme-primary), 0.26);
} }
.gradient-registered { .gradient-registered {
background: linear-gradient(135deg, rgba(76, 175, 80, .12), rgba(0, 184, 212, 0.08) 60%); background-image: linear-gradient(135deg, rgba(var(--v-theme-success), 0.12), transparent 70%);
border: 2px solid rgba(76, 175, 80, .2); border: 1px solid rgba(var(--v-theme-success), 0.26);
} }
.gradient-kv { .gradient-kv {
background: linear-gradient(135deg, rgba(0, 184, 212, .12), rgba(33, 150, 243, 0.08) 60%); background-image: linear-gradient(135deg, rgba(var(--v-theme-info), 0.12), transparent 70%);
border: 2px solid rgba(0, 184, 212, .2); border: 1px solid rgba(var(--v-theme-info), 0.26);
} }
/* 其他选项 */ /* 其他选项 */
-2
View File
@@ -63,7 +63,6 @@
color="grey-darken-3" color="grey-darken-3"
class="glow-track" class="glow-track"
height="100%" height="100%"
style="border-radius: 6px !important"
@click="handleCardClick('dialog', item.key)" @click="handleCardClick('dialog', item.key)"
@mousemove="handleMouseMove" @mousemove="handleMouseMove"
@touchmove="handleTouchMove" @touchmove="handleTouchMove"
@@ -206,7 +205,6 @@
v-for="subject in unusedSubjects" v-for="subject in unusedSubjects"
:key="subject.name" :key="subject.name"
border border
style="border-radius: 6px !important"
class="empty-subject-card" class="empty-subject-card"
@click="handleCardClick('dialog', subject.name)" @click="handleCardClick('dialog', subject.name)"
> >
+13 -28
View File
@@ -237,7 +237,6 @@
<v-container <v-container
fluid fluid
class="fill-height pa-0" class="fill-height pa-0"
style="background-color: #121212;"
> >
<v-row <v-row
no-gutters no-gutters
@@ -252,7 +251,7 @@
<v-card <v-card
class="flex-grow-1 d-flex flex-column position-relative overflow-hidden" class="flex-grow-1 d-flex flex-column position-relative overflow-hidden"
variant="outlined" variant="outlined"
style="border-color: rgba(255,255,255,0.12); border-radius: 8px; background-color: #1E1E1E;" style="border-color: var(--apple-hairline); background-color: rgb(var(--v-theme-surface));"
> >
<div <div
class="flex-grow-1 position-relative overflow-hidden" class="flex-grow-1 position-relative overflow-hidden"
@@ -591,10 +590,10 @@
<!-- 拖拽条 --> <!-- 拖拽条 -->
<div <div
class="resizer-handle" class="resizer-handle"
style="width: 8px; cursor: col-resize; background-color: rgba(255,255,255,0.05); display: flex; justify-content: center; align-items: center; z-index: 10;" style="width: 8px; cursor: col-resize; background-color: rgba(var(--v-theme-on-surface), 0.05); display: flex; justify-content: center; align-items: center; z-index: 10;"
@mousedown.prevent="startNoteResize" @mousedown.prevent="startNoteResize"
> >
<div style="width: 2px; height: 30px; background-color: rgba(255,255,255,0.3); border-radius: 2px;" /> <div style="width: 2px; height: 30px; background-color: rgba(var(--v-theme-on-surface), 0.3); border-radius: 2px;" />
</div> </div>
<!-- 作业列表 (右侧) --> <!-- 作业列表 (右侧) -->
@@ -658,7 +657,7 @@
class="mb-3 glow-track cursor-pointer note-card" class="mb-3 glow-track cursor-pointer note-card"
variant="outlined" variant="outlined"
color="grey-darken-3" color="grey-darken-3"
style="border-radius: 8px !important; border-color: rgba(255,255,255,0.12);" style="border-color: var(--apple-hairline);"
@click="openDialog(item.name)" @click="openDialog(item.name)"
@mousemove="handleCardMouseMove" @mousemove="handleCardMouseMove"
@touchstart="handleCardMouseMove" @touchstart="handleCardMouseMove"
@@ -3004,20 +3003,19 @@ export default {
position: fixed; position: fixed;
bottom: 12px; bottom: 12px;
right: 16px; right: 16px;
color: rgba(255, 255, 255, 0.7); color: rgba(var(--v-theme-on-surface), 0.72);
font-size: 17px; font-size: 17px;
z-index: 100; z-index: 100;
pointer-events: none; pointer-events: none;
user-select: none; user-select: none;
font-family: "Microsoft YaHei", sans-serif;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
/* Box style */ /* 与顶栏同源的悬浮材质,随主题取色 */
border: 1px solid rgba(255, 255, 255, 0.2); border: 1px solid var(--apple-hairline);
background-color: rgba(0, 0, 0, 0.4); background-color: var(--apple-material);
padding: 4px 12px; padding: 4px 12px;
border-radius: 4px; border-radius: var(--apple-radius-sm);
backdrop-filter: blur(4px); -webkit-backdrop-filter: saturate(180%) blur(16px);
backdrop-filter: saturate(180%) blur(16px);
} }
.bloom-container { .bloom-container {
@@ -3025,19 +3023,6 @@ export default {
padding-bottom: 40px; padding-bottom: 40px;
} }
.note-card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.note-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}
.note-card:active {
transform: translateY(-2px);
}
.item-line-text { .item-line-text {
white-space: pre-line; white-space: pre-line;
} }
@@ -3052,12 +3037,12 @@ export default {
} }
.custom-scrollbar::-webkit-scrollbar-thumb { .custom-scrollbar::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.2); background-color: rgba(var(--v-theme-on-surface), 0.16);
border-radius: 3px; border-radius: 3px;
} }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { .custom-scrollbar::-webkit-scrollbar-thumb:hover {
background-color: rgba(255, 255, 255, 0.4); background-color: rgba(var(--v-theme-on-surface), 0.3);
} }
.resizer-handle { .resizer-handle {
+6 -4
View File
@@ -784,11 +784,13 @@ export default {
<style lang="scss"> <style lang="scss">
.settings-page { .settings-page {
.v-card { .v-card {
transition: transform 0.2s, box-shadow 0.2s; transition: background-color 0.2s var(--apple-ease-out),
border-color 0.2s var(--apple-ease-out);
&:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
} }
/* 仅可点击的卡片给出悬停反馈,静态设置卡片保持安静 */
.v-card.cursor-pointer:hover {
border-color: var(--apple-hairline-strong) !important;
} }
} }
</style> </style>
+42 -1
View File
@@ -9,11 +9,52 @@ import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles' import 'vuetify/styles'
// Composables // Composables
import {createVuetify} from 'vuetify' import { createVuetify } from 'vuetify'
/**
* 苹果风格暗色主题
* 参考 Apple Human Interface Guidelines 的 System Colors (Dark)
* 说明:仅替换色板,不改变任何组件行为或数据流
*/
const appleDark = {
dark: true,
colors: {
// 结构层
background: '#000000',
surface: '#1C1C1E',
'surface-variant': '#2C2C2E',
'surface-bright': '#3A3A3C',
'on-background': '#F5F5F7',
'on-surface': '#F5F5F7',
'on-surface-variant': '#C7C7CC',
// 语义色(Apple System Colors, Dark)
primary: '#0A84FF',
'primary-darken-1': '#0060DF',
secondary: '#98989D',
'secondary-darken-1': '#636366',
success: '#30D158',
'success-darken-1': '#248A3D',
warning: '#FF9F0A',
'warning-darken-1': '#C93400',
error: '#FF453A',
'error-darken-1': '#D70015',
info: '#64D2FF',
'info-darken-1': '#0A84FF',
// 覆盖默认灰阶,让描边卡片 / 分割线更接近系统灰
'grey-darken-2': '#48484A',
'grey-darken-3': '#3A3A3C',
'grey-darken-4': '#2C2C2E',
},
}
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides // https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({ export default createVuetify({
theme: { theme: {
defaultTheme: 'dark', defaultTheme: 'dark',
themes: {
dark: appleDark,
},
}, },
}) })
+353
View File
@@ -0,0 +1,353 @@
/**
* src/styles/apple.scss
*
* 苹果风格全局样式层(克制版)
* ---------------------------------------------------------------------------
* 只做视觉覆盖:材质、层次、圆角、排版、按压反馈。
* 不涉及任何组件逻辑、数据流或交互行为。
* 设计原则:去发光、去悬浮位移;用半透明材质表达层次;按压给即时物理反馈。
*
* 材质与描边均由 Vuetify 主题变量派生,因此暗色下即为苹果暗色规范,
* 浅色下会自动取到对应的浅色值,浅色主题保持原样不被破坏。
*/
/* ---------------------------------------------------------------------------
0. 设计变量
--------------------------------------------------------------------------- */
:root {
--apple-ease: cubic-bezier(0.32, 0.72, 0, 1); /* 近似 Apple 弹性缓出 */
--apple-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
/* 描边与材质:跟随主题取色,暗色下等价于 rgba(255,255,255,.08) / rgba(28,28,30,.72) */
--apple-hairline: rgba(var(--v-border-color), 0.08);
--apple-hairline-strong: rgba(var(--v-border-color), 0.18);
--apple-material: rgba(var(--v-theme-surface), 0.72);
--apple-material-thick: rgba(var(--v-theme-surface), 0.86);
--apple-fill-hover: rgba(var(--v-theme-on-surface), 0.05);
--apple-fill-active: rgba(var(--v-theme-on-surface), 0.09);
--apple-radius-sm: 8px;
--apple-radius: 12px;
--apple-radius-lg: 16px;
/* 悬浮层投影:仅暗色使用,浅色保留 Vuetify 原有的轻投影 */
--apple-shadow-card: 0 2px 6px rgba(0, 0, 0, 0.34), 0 12px 32px rgba(0, 0, 0, 0.26);
--apple-shadow-popover: 0 16px 40px rgba(0, 0, 0, 0.5);
--apple-shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.55);
}
/* ---------------------------------------------------------------------------
1. 排版:系统字体、抗锯齿、尺寸相关的字距与行高
--------------------------------------------------------------------------- */
.v-application {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
/* 字距随字号变化:大标题收紧,正文保持为 0(中文尤其不适合正字距) */
.v-application .text-h2 {
letter-spacing: -0.02em;
line-height: 1.12;
}
.v-application .text-h3 {
letter-spacing: -0.018em;
line-height: 1.15;
}
.v-application .text-h4 {
letter-spacing: -0.016em;
line-height: 1.2;
}
.v-application .text-h5,
.v-application .text-h6 {
letter-spacing: -0.012em;
line-height: 1.25;
}
/* 卡片标题:系统标题字重,避免 Material 默认的宽字距 */
.v-application .v-card-title {
font-weight: 600;
letter-spacing: -0.01em;
line-height: 1.3;
}
.v-application .v-card-subtitle {
letter-spacing: 0;
opacity: 0.72;
}
/* 列表项标题保持中等字重,与系统侧边栏一致 */
.v-application .v-list-item-title {
font-weight: 500;
letter-spacing: 0;
}
/* 选中文本使用主题强调色,与系统高亮一致 */
::selection {
background: rgba(var(--v-theme-primary), 0.32);
}
/* ---------------------------------------------------------------------------
2. 顶栏与抽屉:半透明材质,内容可从下方穿过
--------------------------------------------------------------------------- */
.v-app-bar.v-toolbar {
background: var(--apple-material) !important;
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
box-shadow: none !important;
border-bottom: 1px solid var(--apple-hairline);
transition: background-color 0.3s var(--apple-ease-out);
}
.v-app-bar .v-toolbar-title {
font-weight: 600;
letter-spacing: -0.01em;
}
.v-navigation-drawer {
background: var(--apple-material-thick) !important;
-webkit-backdrop-filter: saturate(180%) blur(24px);
backdrop-filter: saturate(180%) blur(24px);
border-right: 1px solid var(--apple-hairline) !important;
box-shadow: none !important;
}
/* ---------------------------------------------------------------------------
3. 卡片:细描边 + 极浅投影,悬停只做轻微提亮,不做位移
--------------------------------------------------------------------------- */
.v-card {
border-radius: var(--apple-radius);
transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out),
box-shadow 0.22s var(--apple-ease-out);
}
/* 重投影只在暗色下使用,浅色主题保持原有阴影不变 */
.v-theme--dark.v-card--variant-elevated {
box-shadow: var(--apple-shadow-card) !important;
}
.v-card--variant-tonal {
border: 1px solid var(--apple-hairline);
}
/* 可点击卡片的悬停反馈:提亮填充 + 描边加深,替代原来的上浮与发光 */
.v-card.cursor-pointer,
.v-card[class*='cursor-pointer'] {
cursor: pointer;
}
.v-card.cursor-pointer:hover {
background-color: var(--apple-fill-hover) !important;
border-color: var(--apple-hairline-strong) !important;
}
.v-card.cursor-pointer:active {
background-color: var(--apple-fill-active) !important;
transition-duration: 0.08s;
}
.v-card.cursor-not-allowed {
opacity: 0.6;
}
/* ---------------------------------------------------------------------------
4. 按钮与芯片:即时按压反馈,去掉大写转换与宽字距
--------------------------------------------------------------------------- */
.v-btn {
text-transform: none;
letter-spacing: 0;
font-weight: 500;
border-radius: 10px;
transition: transform 0.14s var(--apple-ease-out),
background-color 0.2s var(--apple-ease-out),
box-shadow 0.2s var(--apple-ease-out),
opacity 0.2s var(--apple-ease-out);
}
.v-btn:active {
transform: scale(0.97);
transition-duration: 0.08s;
}
.v-theme--dark.v-btn--variant-elevated {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32) !important;
}
.v-btn-group,
.v-btn-toggle {
border-radius: 12px;
overflow: hidden;
}
/* 芯片本身已是胶囊形,这里只统一字重与字距,避免覆盖组件内自定义圆角 */
.v-chip {
font-weight: 500 !important;
letter-spacing: 0 !important;
}
/* ---------------------------------------------------------------------------
5. 对话框、菜单与提示:材质化 + 轻量分隔
--------------------------------------------------------------------------- */
/* 注意:Vuetify 的悬浮层结构为 .v-overlay > .v-overlay__content > 内容 */
.v-dialog > .v-overlay__content > .v-card,
.v-dialog > .v-overlay__content > .v-sheet {
border-radius: var(--apple-radius-lg) !important;
border: 1px solid var(--apple-hairline);
}
.v-dialog.v-theme--dark > .v-overlay__content > .v-card,
.v-dialog.v-theme--dark > .v-overlay__content > .v-sheet {
box-shadow: var(--apple-shadow-modal) !important;
}
.v-menu > .v-overlay__content > .v-sheet,
.v-menu > .v-overlay__content > .v-list,
.v-select__content.v-overlay__content > .v-sheet,
.v-select__content.v-overlay__content > .v-list {
background: var(--apple-material-thick) !important;
-webkit-backdrop-filter: saturate(180%) blur(24px);
backdrop-filter: saturate(180%) blur(24px);
border: 1px solid var(--apple-hairline);
border-radius: var(--apple-radius) !important;
}
.v-menu.v-theme--dark > .v-overlay__content > .v-sheet,
.v-menu.v-theme--dark > .v-overlay__content > .v-list,
.v-overlay.v-theme--dark > .v-overlay__content.v-select__content > .v-sheet,
.v-overlay.v-theme--dark > .v-overlay__content.v-select__content > .v-list {
box-shadow: var(--apple-shadow-popover) !important;
}
/* 遮罩层轻微虚化底层内容,营造系统的层次纵深 */
.v-overlay__scrim {
-webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
}
/* 提示气泡在明暗两套主题下都保持深色,与系统行为一致 */
.v-tooltip > .v-overlay__content {
border-radius: var(--apple-radius-sm) !important;
background: rgba(58, 58, 60, 0.94) !important;
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
font-size: 0.8rem;
letter-spacing: 0;
}
.v-alert {
border-radius: var(--apple-radius) !important;
}
/* 色块型提示加一道极细描边,边界更利落(描边款自带边框,不重复处理) */
.v-alert--variant-tonal {
border: 1px solid var(--apple-hairline);
}
.v-divider {
border-color: var(--apple-hairline) !important;
opacity: 1 !important;
}
/* 输入类控件:圆角与描边统一 */
.v-field {
border-radius: 10px !important;
}
/* 聚焦时给输入框一圈柔和的强调色光晕,替代 Material 的整圈描边闪变 */
.v-field--focused {
box-shadow: 0 0 0 3px rgba(var(--v-theme-primary), 0.16);
}
.v-snackbar__wrapper > .v-sheet {
border-radius: var(--apple-radius) !important;
border: 1px solid var(--apple-hairline);
}
/* ---------------------------------------------------------------------------
6. 滚动条:细、半透明、悬停才明显
--------------------------------------------------------------------------- */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background-color: rgba(var(--v-theme-on-surface), 0.16);
border: 3px solid transparent;
background-clip: content-box;
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(var(--v-theme-on-surface), 0.3);
}
::-webkit-scrollbar-corner {
background: transparent;
}
/* ---------------------------------------------------------------------------
7. 键盘可达性:仅在键盘聚焦时显示柔和焦点环
--------------------------------------------------------------------------- */
.v-btn:focus-visible,
.v-chip:focus-visible,
a:focus-visible {
outline: 3px solid rgba(10, 132, 255, 0.55);
outline-offset: 2px;
}
/* ---------------------------------------------------------------------------
8. 无障碍:减弱动效 / 减弱透明 / 提高对比
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
.v-btn:active,
.v-card.cursor-pointer:active {
transform: none !important;
}
.v-card,
.v-btn {
transition: background-color 0.15s linear, border-color 0.15s linear !important;
}
}
@media (prefers-reduced-transparency: reduce) {
.v-app-bar.v-toolbar,
.v-navigation-drawer {
background: rgb(var(--v-theme-surface)) !important;
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.v-menu > .v-overlay__content > .v-sheet,
.v-menu > .v-overlay__content > .v-list,
.v-select__content.v-overlay__content > .v-sheet,
.v-select__content.v-overlay__content > .v-list {
background: rgb(var(--v-theme-surface)) !important;
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.v-overlay__scrim {
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
}
@media (prefers-contrast: more) {
.v-app-bar.v-toolbar,
.v-navigation-drawer {
background: rgb(var(--v-theme-surface)) !important;
border-color: rgba(var(--v-border-color), 0.32) !important;
}
}
+6 -13
View File
@@ -1,18 +1,17 @@
// 全局 UI 美化样式 // 全局 UI 美化样式
// 卡片悬浮效果 // 卡片悬停效果(克制:只提亮,不位移)
.hover-card { .hover-card {
transition: transform 0.2s ease, box-shadow 0.3s ease; transition: background-color 0.22s var(--apple-ease-out),
will-change: transform, box-shadow; border-color 0.22s var(--apple-ease-out);
&:hover, &:focus { &:hover, &:focus {
transform: translateY(-4px); background-color: var(--apple-fill-hover);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important; border-color: var(--apple-hairline-strong);
} }
&:active { &:active {
transform: translateY(-2px); background-color: rgba(255, 255, 255, 0.09);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
} }
} }
@@ -78,12 +77,6 @@ html {
// 全屏模式样式 // 全屏模式样式
.fullscreen-mode { .fullscreen-mode {
.v-app-bar {
background-color: rgba(var(--v-theme-surface-variant), 0.85) !important;
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
.main-window { .main-window {
padding-top: 16px; padding-top: 16px;
padding-bottom: 16px; padding-bottom: 16px;
+13 -12
View File
@@ -1,28 +1,29 @@
// 悬停反馈:以轻微提亮替代发光(保留类名,避免影响引用方)
.glow-effect { .glow-effect {
transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out; transition: background-color 0.22s var(--apple-ease-out), transform 0.14s var(--apple-ease-out);
&:hover { &:hover {
box-shadow: 0 0 15px rgba(var(--v-theme-primary), 0.5); background-color: var(--apple-fill-hover);
transform: translateY(-2px); }
&:active {
transform: scale(0.98);
} }
} }
.glow-text { .glow-text {
text-shadow: 0 0 5px rgba(var(--v-theme-primary), 0.5); color: rgb(var(--v-theme-on-surface));
} }
.bloom-container { .bloom-container {
.v-card { .v-card {
transition: box-shadow 0.3s ease; transition: background-color 0.22s var(--apple-ease-out),
&:hover { border-color 0.22s var(--apple-ease-out);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(var(--v-theme-primary), 0.3) !important;
}
} }
.v-btn { .v-btn {
transition: box-shadow 0.3s ease; transition: background-color 0.2s var(--apple-ease-out),
&:hover { transform 0.14s var(--apple-ease-out);
box-shadow: 0 0 10px rgba(var(--v-theme-primary), 0.4);
}
} }
} }
+62 -233
View File
@@ -1,105 +1,37 @@
@use 'glow.scss'; @use 'glow.scss';
// 添加卡片发光效果 // 数据更新高亮:柔和的聚焦环,替代原来的霓虹发光
.glow-track { .glow-track {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
transition: all 0.3s ease; transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out);
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
rgba(255, 255, 255, 0.15) 0%,
rgba(255, 255, 255, 0) 70%);
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
z-index: 1;
}
&:hover::before {
opacity: 1;
}
} }
// 数据更新高亮效果
.glow-highlight { .glow-highlight {
animation: glow-pulse 3s ease-in-out; animation: highlight-fade 2.4s var(--apple-ease-out);
box-shadow: 0 0 20px rgba(33, 150, 243, 0.6), border-color: rgba(10, 132, 255, 0.75) !important;
0 0 40px rgba(33, 150, 243, 0.4),
0 0 60px rgba(33, 150, 243, 0.2) !important;
} }
@keyframes glow-pulse { @keyframes highlight-fade {
0%, 100% {
box-shadow: 0 0 20px rgba(33, 150, 243, 0.6),
0 0 40px rgba(33, 150, 243, 0.4),
0 0 60px rgba(33, 150, 243, 0.2);
}
50% {
box-shadow: 0 0 30px rgba(33, 150, 243, 0.8),
0 0 60px rgba(33, 150, 243, 0.6),
0 0 90px rgba(33, 150, 243, 0.4);
}
}
// 添加卡片悬浮效果
.grid-item .v-card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
&:hover {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}
&:active {
transform: translateY(-2px);
}
}
// 添加空科目卡片样式
.empty-subject-card {
transition: all 0.3s ease;
opacity: 0.8;
&:hover {
opacity: 1;
transform: translateY(-4px);
}
}
// 修改防烧屏提示卡片,使用 tonal 样式减少信息密度
.anti-burn-card {
animation: subtle-glow 4s infinite alternate;
transition: all 0.3s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}
}
@keyframes subtle-glow {
0% { 0% {
box-shadow: 0 0 5px rgba(33, 150, 243, 0.1); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.45);
}
60% {
box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.35);
} }
100% { 100% {
box-shadow: 0 0 15px rgba(33, 150, 243, 0.3); box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
} }
} }
// 出勤管理对话框样式 // 防烧屏提示卡片:静态呈现,不再呼吸发光
.attendance-stat { .anti-burn-card {
height: 100%; transition: background-color 0.22s var(--apple-ease-out);
} }
// 搜索建议按钮 // 搜索建议按钮
.suggestion-btn { .suggestion-btn {
margin: 2px; margin: 2px;
@@ -111,25 +43,6 @@
} }
} }
// 适配触摸屏
@media (hover: none) {
.student-card .attendance-actions {
opacity: 1;
}
}
// 小屏幕适配
@media (max-width: 600px) {
.student-card {
.attendance-actions .v-btn {
margin: 0 1px;
min-width: 28px;
width: 28px;
height: 28px;
}
}
}
// 过滤器芯片 // 过滤器芯片
.filter-chip { .filter-chip {
cursor: pointer; cursor: pointer;
@@ -140,6 +53,7 @@
} }
} }
// 网格瀑布流布局(功能相关,勿改数值)
.grid-masonry { .grid-masonry {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
@@ -152,18 +66,31 @@
.grid-item { .grid-item {
width: 100%; width: 100%;
transition: all 0.2s ease;
} }
.empty-card { // 空科目卡片
transform: scale(0.9); .empty-subject-card {
opacity: 0.8; cursor: pointer;
grid-row-end: span 1 !important; transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out);
opacity: 0.85;
} }
.empty-card:hover { .empty-subject-card:hover {
transform: scale(0.95);
opacity: 1; opacity: 1;
border-color: var(--apple-hairline-strong) !important;
}
.empty-subjects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
padding: 8px;
}
.empty-subjects {
border-top: 1px solid var(--apple-hairline);
padding-top: 1rem;
} }
.empty-subjects-container { .empty-subjects-container {
@@ -171,40 +98,6 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
@media (max-width: 1199px) {
.grid-masonry {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 799px) {
.grid-masonry {
grid-template-columns: 1fr;
}
.empty-card {
transform: scale(0.95);
}
}
/* 优化滚动条样式 */
.main-window::-webkit-scrollbar {
width: 8px;
}
.main-window::-webkit-scrollbar-track {
background: transparent;
}
.main-window::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 4px;
}
.main-window::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.3);
}
.no-data-message { .no-data-message {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -213,40 +106,35 @@
margin: 20px 0; margin: 20px 0;
} }
// 出勤抽屉
.attendance-drawer { .attendance-drawer {
border-left: 1px solid rgba(0, 0, 0, 0.12); border-left: 1px solid var(--apple-hairline);
} }
.attendance-drawer :deep(.v-navigation-drawer__content) { .attendance-drawer :deep(.v-navigation-drawer__content) {
overflow-y: auto; overflow-y: auto;
} }
/* 优化滚动条样式 */ .attendance-card {
.attendance-drawer :deep(.v-navigation-drawer__content::-webkit-scrollbar) { display: flex;
width: 8px; flex-direction: column;
} }
.attendance-drawer .attendance-numbers {
:deep(.v-navigation-drawer__content::-webkit-scrollbar-track) { padding: 20px 0;
background: transparent;
} }
.attendance-drawer .total-number {
:deep(.v-navigation-drawer__content::-webkit-scrollbar-thumb) { border-bottom: 1px solid var(--apple-hairline);
background-color: rgba(0, 0, 0, 0.2); padding-bottom: 20px;
border-radius: 4px;
} }
.attendance-drawer .status-number {
:deep(.v-navigation-drawer__content::-webkit-scrollbar-thumb:hover) { flex: 1;
background-color: rgba(0, 0, 0, 0.3);
} }
/* 响应式调整 */ .attendance-stat {
@media (max-width: 960px) { height: 100%;
.attendance-drawer {
display: none;
}
} }
.text-success { .text-success {
@@ -261,71 +149,22 @@
color: rgb(var(--v-theme-warning)); color: rgb(var(--v-theme-warning));
} }
.attendance-card { // 响应式调整
display: flex; @media (max-width: 1199px) {
flex-direction: column; .grid-masonry {
grid-template-columns: repeat(2, 1fr);
}
} }
.attendance-numbers { @media (max-width: 960px) {
padding: 20px 0; .attendance-drawer {
display: none;
}
} }
.total-number { @media (max-width: 799px) {
border-bottom: 1px solid rgba(0, 0, 0, 0.12); .grid-masonry {
padding-bottom: 20px; grid-template-columns: 1fr;
}
.status-number {
flex: 1;
}
.text-h2,
.text-h3 {
line-height: 1.2;
}
.empty-subjects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
padding: 8px;
}
.empty-subject-card {
cursor: pointer;
transition: all 0.2s ease;
opacity: 0.8;
}
.empty-subject-card:hover {
transform: scale(1.02);
opacity: 1;
}
.empty-subjects {
border-top: 1px solid rgba(0, 0, 0, 0.12);
padding-top: 1rem;
}
.empty-subject-card:not(:disabled):hover {
opacity: 1;
transform: scale(1.02);
}
// 出勤管理对话框样式
.attendance-stat {
height: 100%;
}
// 搜索建议按钮
.suggestion-btn {
margin: 2px;
min-width: 0;
padding: 0 6px;
&:active {
transform: scale(0.95);
} }
} }
@@ -347,13 +186,3 @@
} }
} }
} }
// 过滤器芯片
.filter-chip {
cursor: pointer;
margin: 2px;
&:active {
transform: scale(0.95);
}
}
+4 -3
View File
@@ -10,11 +10,12 @@
// ); // );
.student-card { .student-card {
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); transition: background-color 0.2s var(--apple-ease-out),
border-color 0.2s var(--apple-ease-out);
} }
.bg-primary-subtle { .bg-primary-subtle {
background-color: rgb(var(--v-theme-primary), 0.05); background-color: rgba(var(--v-theme-primary), 0.05);
} }
.action-buttons { .action-buttons {
@@ -77,5 +78,5 @@
} }
.student-card:active { .student-card:active {
background-color: rgb(var(--v-theme-primary), 0.05); background-color: rgba(var(--v-theme-primary), 0.05);
} }
+27 -26
View File
@@ -1,9 +1,9 @@
// Material Design 3 动画曲线 // Apple 风格缓动曲线:收敛、平稳、无回弹
$emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1.0); $emphasized-decelerate: cubic-bezier(0.16, 1, 0.3, 1);
$emphasized-accelerate: cubic-bezier(0.3, 0.0, 0.8, 0.15); $emphasized-accelerate: cubic-bezier(0.4, 0.0, 0.7, 1);
$standard-easing: cubic-bezier(0.2, 0.0, 0, 1.0); $standard-easing: cubic-bezier(0.32, 0.72, 0, 1);
$standard-decelerate: cubic-bezier(0.0, 0.0, 0.0, 1.0); $standard-decelerate: cubic-bezier(0.16, 1, 0.3, 1);
$standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0); $standard-accelerate: cubic-bezier(0.4, 0.0, 1.0, 1.0);
// 网格项目的进入和离开动画 // 网格项目的进入和离开动画
.grid-item { .grid-item {
@@ -37,11 +37,12 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// 空科目卡片动画 // 空科目卡片动画
.empty-subject-card { .empty-subject-card {
transition: all 250ms $standard-easing; transition: background-color 250ms $standard-easing,
border-color 250ms $standard-easing;
&:hover { &:active {
transform: translateY(-4px) scale(1.02); transform: scale(0.99);
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12); transition-duration: 90ms;
} }
} }
@@ -57,7 +58,7 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
.v-list-enter-from, .v-list-enter-from,
.v-list-leave-to { .v-list-leave-to {
opacity: 0; opacity: 0;
transform: translateX(-24px); transform: translateX(-10px);
} }
// 出勤数据变化动画 // 出勤数据变化动画
@@ -169,55 +170,55 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// 网格项目过渡 // 网格项目过渡
.grid-enter-active, .grid-enter-active,
.grid-leave-active { .grid-leave-active {
transition: all 0.5s ease; transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
} }
.grid-enter-from { .grid-enter-from {
opacity: 0; opacity: 0;
transform: translateY(20px); transform: translateY(8px);
} }
.grid-leave-to { .grid-leave-to {
opacity: 0; opacity: 0;
transform: translateY(-20px); transform: translateY(-8px);
} }
// 列表项目过渡 // 列表项目过渡
.v-list-enter-active, .v-list-enter-active,
.v-list-leave-active { .v-list-leave-active {
transition: all 0.3s ease; transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
} }
.v-list-enter-from { .v-list-enter-from {
opacity: 0; opacity: 0;
transform: translateX(-20px); transform: translateX(-10px);
} }
.v-list-leave-to { .v-list-leave-to {
opacity: 0; opacity: 0;
transform: translateX(20px); transform: translateX(10px);
} }
// 页面过渡 // 页面过渡
.page-enter-active, .page-enter-active,
.page-leave-active { .page-leave-active {
transition: opacity 0.3s, transform 0.3s; transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
} }
.page-enter-from { .page-enter-from {
opacity: 0; opacity: 0;
transform: translateY(20px); transform: translateY(8px);
} }
.page-leave-to { .page-leave-to {
opacity: 0; opacity: 0;
transform: translateY(-20px); transform: translateY(-8px);
} }
// 淡入淡出 // 淡入淡出
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity 0.3s; transition: opacity 0.3s $standard-easing;
} }
.fade-enter-from, .fade-enter-from,
@@ -228,27 +229,27 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// 缩放过渡 // 缩放过渡
.scale-enter-active, .scale-enter-active,
.scale-leave-active { .scale-leave-active {
transition: all 0.3s; transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
} }
.scale-enter-from, .scale-enter-from,
.scale-leave-to { .scale-leave-to {
opacity: 0; opacity: 0;
transform: scale(0.9); transform: scale(0.96);
} }
// Slide X Transition // Slide X Transition
.slide-x-transition-enter-active, .slide-x-transition-enter-active,
.slide-x-transition-leave-active { .slide-x-transition-leave-active {
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), opacity 0.3s ease; transition: transform 0.3s $standard-easing, opacity 0.3s $standard-easing;
} }
.slide-x-transition-enter-from { .slide-x-transition-enter-from {
transform: translateX(15px); transform: translateX(10px);
opacity: 0; opacity: 0;
} }
.slide-x-transition-leave-to { .slide-x-transition-leave-to {
transform: translateX(-15px); transform: translateX(-10px);
opacity: 0; opacity: 0;
} }
+8 -2
View File
@@ -103,9 +103,15 @@ const localFileStoragePlugin = () => {
const filePath = path.join(dataDir, `${safeKey}.json`); const filePath = path.join(dataDir, `${safeKey}.json`);
if (fs.existsSync(filePath)) { if (fs.existsSync(filePath)) {
const data = fs.readFileSync(filePath, 'utf-8'); try {
// 文件可能带 UTF-8 BOM(外部编辑器/同步工具写入),解析前需剥离,否则 JSON.parse 抛错
const raw = fs.readFileSync(filePath, 'utf-8').replace(/^\uFEFF/, '');
res.setHeader('Content-Type', 'application/json'); res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify({ success: true, data: JSON.parse(data) })); res.end(JSON.stringify({ success: true, data: JSON.parse(raw) }));
} catch (e) {
res.statusCode = 500;
res.end(JSON.stringify({ success: false, error: e.message }));
}
} else { } else {
res.statusCode = 404; res.statusCode = 404;
res.end(JSON.stringify({ success: false, error: 'Not found' })); res.end(JSON.stringify({ success: false, error: 'Not found' }));