优化: 溢出修复与视觉token收敛+三处小清理

- diff长行折行可读/任务描述与产出宽表格横滚/确认弹窗长路径折行
- 滚动条色抽token浅色主题可见/阶段徽章与优先级色对齐语义token
- git状态色与错误色替换散落硬编码
- alert残留换toast走i18n/分离窗口缺参数补错误态/dev路由生产守卫
This commit is contained in:
lxy
2026-09-29 14:58:48 +08:00
parent 864a03d2e1
commit 0168617503
13 changed files with 54 additions and 42 deletions
+11 -18
View File
@@ -1,10 +1,11 @@
<template>
<div class="fe-detached-shell">
<!-- 等待 projectId 参数加载 -->
<div v-if="!projectId" class="fe-detached-loading">
<span class="spinner"></span>
<!-- projectId 来自 URL query(同步可得),缺失时直接给错误态而非无限 spinner -->
<FileExplorer v-if="projectId" :project-id="projectId" />
<div v-else class="fe-detached-error">
<span class="fe-detached-error-icon">⚠️</span>
<p>缺少 projectId 参数,无法打开文件浏览器</p>
</div>
<FileExplorer v-else :project-id="projectId" />
</div>
</template>
@@ -29,27 +30,19 @@ const projectId = computed(() => (route.query.projectId as string) || '')
background: var(--df-bg);
}
.fe-detached-loading {
.fe-detached-error {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 12px;
height: 100%;
color: var(--df-text-dim);
font-size: 14px;
}
.spinner {
width: 20px;
height: 20px;
border: 2px solid var(--df-border, #444);
border-top-color: var(--df-accent, #3a8);
border-radius: 50%;
animation: df-spin 0.8s linear infinite;
display: inline-block;
margin-right: 8px;
}
@keyframes df-spin {
to { transform: rotate(360deg); }
.fe-detached-error-icon {
font-size: 40px;
opacity: 0.6;
}
</style>
+7 -6
View File
@@ -1427,13 +1427,14 @@ onUnmounted(() => {
border-radius: var(--df-radius-lg);
font-weight: 500;
}
.stage-planning { background: rgba(100,181,246,0.15); color: #64b5f6; }
/* 阶段色全走语义 token(对齐全站约定:releasing/completed=success,见 ActiveProjectsPanel dot-release) */
.stage-planning { background: var(--df-info-bg); color: var(--df-info); }
.stage-in_progress { background: var(--df-accent-soft); color: var(--df-accent); }
.stage-testing { background: rgba(255,193,7,0.15); color: #ffc107; }
.stage-releasing { background: rgba(156,39,176,0.15); color: #ce93d8; }
.stage-completed { background: rgba(100,200,100,0.15); color: #64c864; }
.stage-paused { background: rgba(158,158,158,0.15); color: #9e9e9e; }
.stage-cancelled { background: rgba(244,67,54,0.15); color: #f44336; }
.stage-testing { background: var(--df-warning-bg); color: var(--df-warning); }
.stage-releasing { background: var(--df-success-bg); color: var(--df-success); }
.stage-completed { background: var(--df-success-bg); color: var(--df-success); }
.stage-paused { background: rgba(158,158,158,0.15); color: var(--df-text-dim); }
.stage-cancelled { background: var(--df-danger-bg); color: var(--df-danger); }
/* .header-actions 已提取到 styles/global.css 全局 */
+2 -1
View File
@@ -874,7 +874,7 @@ onBeforeUnmount(() => {
border-radius: var(--df-radius-xs);
}
.priority-critical { background: rgba(255,107,107,0.2); color: var(--df-danger); }
.priority-high { background: rgba(255,152,0,0.2); color: #ff9800; }
.priority-high { background: rgba(255,152,0,0.2); color: var(--df-warning); }
.priority-medium { background: rgba(100,181,246,0.2); color: var(--df-info); }
.priority-low { background: rgba(90,99,128,0.2); color: var(--df-text-dim); }
@@ -916,6 +916,7 @@ onBeforeUnmount(() => {
.description-wrap {
position: relative;
overflow: hidden;
overflow-x: auto;
transition: max-height 0.25s var(--df-ease);
}
.desc-toggle {
+2 -2
View File
@@ -825,7 +825,7 @@ function openCreateModal(parent?: TaskRecord) {
}
async function confirmCreate() {
if (!newTaskProjectId.value) { alert('请选择项目'); return }
if (!newTaskProjectId.value) { showToast(t('tasks.err.selectProject'), 'error'); return }
if (!newTaskTitle.value.trim()) return
submitting.value = true
try {
@@ -1244,7 +1244,7 @@ onUnmounted(() => {
flex-shrink: 0;
}
.priority-critical { background: rgba(255,107,107,0.2); color: var(--df-danger); }
.priority-high { background: rgba(255,152,0,0.2); color: #ff9800; }
.priority-high { background: rgba(255,152,0,0.2); color: var(--df-warning); }
.priority-medium { background: rgba(100,181,246,0.2); color: var(--df-info); }
.priority-low { background: rgba(90,99,128,0.2); color: var(--df-text-dim); }