Compare commits

..
2 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
7 changed files with 93 additions and 49 deletions
+16 -8
View File
@@ -360,11 +360,18 @@ const openClassworksKV = () => {
.main-service-card {
min-height: 100px;
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 {
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 {
@@ -386,19 +393,20 @@ const openClassworksKV = () => {
text-align: left;
}
/* 三档入口:取自主题强调色,只做极淡的底色渐变与一道细描边 */
.gradient-new {
background: linear-gradient(135deg, rgba(33, 150, 243, .12), rgba(103, 80, 164, 0.08) 60%);
border: 2px solid rgba(33, 150, 243, .2);
background-image: linear-gradient(135deg, rgba(var(--v-theme-primary), 0.12), transparent 70%);
border: 1px solid rgba(var(--v-theme-primary), 0.26);
}
.gradient-registered {
background: linear-gradient(135deg, rgba(76, 175, 80, .12), rgba(0, 184, 212, 0.08) 60%);
border: 2px solid rgba(76, 175, 80, .2);
background-image: linear-gradient(135deg, rgba(var(--v-theme-success), 0.12), transparent 70%);
border: 1px solid rgba(var(--v-theme-success), 0.26);
}
.gradient-kv {
background: linear-gradient(135deg, rgba(0, 184, 212, .12), rgba(33, 150, 243, 0.08) 60%);
border: 2px solid rgba(0, 184, 212, .2);
background-image: linear-gradient(135deg, rgba(var(--v-theme-info), 0.12), transparent 70%);
border: 1px solid rgba(var(--v-theme-info), 0.26);
}
/* 其他选项 */
-2
View File
@@ -63,7 +63,6 @@
color="grey-darken-3"
class="glow-track"
height="100%"
style="border-radius: 6px !important"
@click="handleCardClick('dialog', item.key)"
@mousemove="handleMouseMove"
@touchmove="handleTouchMove"
@@ -206,7 +205,6 @@
v-for="subject in unusedSubjects"
:key="subject.name"
border
style="border-radius: 6px !important"
class="empty-subject-card"
@click="handleCardClick('dialog', subject.name)"
>
+13 -28
View File
@@ -237,7 +237,6 @@
<v-container
fluid
class="fill-height pa-0"
style="background-color: #121212;"
>
<v-row
no-gutters
@@ -252,7 +251,7 @@
<v-card
class="flex-grow-1 d-flex flex-column position-relative overflow-hidden"
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
class="flex-grow-1 position-relative overflow-hidden"
@@ -591,10 +590,10 @@
<!-- 拖拽条 -->
<div
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"
>
<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>
<!-- 作业列表 (右侧) -->
@@ -658,7 +657,7 @@
class="mb-3 glow-track cursor-pointer note-card"
variant="outlined"
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)"
@mousemove="handleCardMouseMove"
@touchstart="handleCardMouseMove"
@@ -3004,20 +3003,19 @@ export default {
position: fixed;
bottom: 12px;
right: 16px;
color: rgba(255, 255, 255, 0.7);
color: rgba(var(--v-theme-on-surface), 0.72);
font-size: 17px;
z-index: 100;
pointer-events: 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);
background-color: rgba(0, 0, 0, 0.4);
/* 与顶栏同源的悬浮材质,随主题取色 */
border: 1px solid var(--apple-hairline);
background-color: var(--apple-material);
padding: 4px 12px;
border-radius: 4px;
backdrop-filter: blur(4px);
border-radius: var(--apple-radius-sm);
-webkit-backdrop-filter: saturate(180%) blur(16px);
backdrop-filter: saturate(180%) blur(16px);
}
.bloom-container {
@@ -3025,19 +3023,6 @@ export default {
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 {
white-space: pre-line;
}
@@ -3052,12 +3037,12 @@ export default {
}
.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;
}
.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 {
+6 -4
View File
@@ -784,11 +784,13 @@ export default {
<style lang="scss">
.settings-page {
.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>
+44
View File
@@ -69,6 +69,29 @@
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. 顶栏与抽屉:半透明材质,内容可从下方穿过
--------------------------------------------------------------------------- */
@@ -201,6 +224,12 @@
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;
@@ -215,6 +244,11 @@
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;
@@ -225,6 +259,11 @@
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);
@@ -298,6 +337,11 @@ a:focus-visible {
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.v-overlay__scrim {
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
}
@media (prefers-contrast: more) {
+4 -3
View File
@@ -10,11 +10,12 @@
// );
.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 {
background-color: rgb(var(--v-theme-primary), 0.05);
background-color: rgba(var(--v-theme-primary), 0.05);
}
.action-buttons {
@@ -77,5 +78,5 @@
}
.student-card:active {
background-color: rgb(var(--v-theme-primary), 0.05);
background-color: rgba(var(--v-theme-primary), 0.05);
}
+9 -3
View File
@@ -103,9 +103,15 @@ const localFileStoragePlugin = () => {
const filePath = path.join(dataDir, `${safeKey}.json`);
if (fs.existsSync(filePath)) {
const data = fs.readFileSync(filePath, 'utf-8');
res.setHeader('Content-Type', 'application/json');
res.end(JSON.stringify({ success: true, data: JSON.parse(data) }));
try {
// 文件可能带 UTF-8 BOM(外部编辑器/同步工具写入),解析前需剥离,否则 JSON.parse 抛错
const raw = fs.readFileSync(filePath, 'utf-8').replace(/^\uFEFF/, '');
res.setHeader('Content-Type', 'application/json');
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 {
res.statusCode = 404;
res.end(JSON.stringify({ success: false, error: 'Not found' }));