diff --git a/index.html b/index.html index fa4ae58..fe901e8 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,12 @@ AI 写作工坊 - 结构化生成工具 - + + + + + + diff --git a/src/components/ComparePanel.vue b/src/components/ComparePanel.vue index 207097e..8ac9db3 100644 --- a/src/components/ComparePanel.vue +++ b/src/components/ComparePanel.vue @@ -1764,4 +1764,326 @@ const runCompare = async () => { writing-mode: vertical-rl; text-orientation: mixed; } + +/* ========== 使用设计令牌系统 ========== */ + +/* 页面容器 */ +.compare-page { + height: 100vh; + width: 100%; + display: flex; + flex-direction: column; + background: var(--bg-primary); +} + +/* 头部 */ +.compare-header { + padding: var(--space-4); + border-bottom: 1px solid var(--border-default); + background: var(--bg-secondary); + display: flex; + align-items: center; + justify-content: between; + flex-shrink: 0; +} + +.compare-header-title { + font-weight: var(--font-semibold); + font-size: var(--text-lg); + color: var(--text-primary); + display: flex; + align-items: center; + gap: var(--space-2); +} + +/* 范式上下文提示条 */ +.paradigm-bar { + padding: var(--space-2) var(--space-4); + background: var(--info-bg); + border-bottom: 1px solid var(--accent-primary); + display: flex; + align-items: center; + justify-content: space-between; + flex-shrink: 0; +} + +/* 主体内容区 */ +.compare-main { + flex: 1; + display: flex; + overflow: hidden; +} + +/* 面板区域 */ +.panel-section { + display: flex; + flex-direction: column; + min-width: 0; +} + +.panel-left { + width: 40%; + border-right: 1px solid var(--border-default); +} + +.panel-right { + flex: 1; +} + +/* 面板头部 */ +.panel-header { + padding: var(--space-3); + background: var(--bg-secondary); + border-bottom: 1px solid var(--border-default); + display: flex; + align-items: center; + justify-content: space-between; +} + +.panel-title { + font-size: var(--text-sm); + font-weight: var(--font-medium); + display: flex; + align-items: center; + gap: var(--space-2); +} + +.panel-title-left { + color: var(--accent-warning); +} + +.panel-title-right { + color: var(--accent-primary); +} + +/* 段落卡片 */ +.paragraph-card { + padding: var(--space-3); + border-radius: var(--radius-lg); + border: 1px solid var(--border-default); + cursor: pointer; + transition: all var(--transition-fast); +} + +.paragraph-card:hover { + border-color: var(--accent-primary); +} + +.paragraph-card-selected-left { + background: var(--warning-bg); + border-color: var(--accent-warning); + box-shadow: 0 0 0 2px var(--accent-warning); +} + +.paragraph-card-selected-right { + background: var(--info-bg); + border-color: var(--accent-primary); + box-shadow: 0 0 0 2px var(--accent-primary); +} + +/* 底部操作区 */ +.compare-footer { + padding: var(--space-4); + background: var(--bg-secondary); + border-top: 1px solid var(--border-default); + flex-shrink: 0; +} + +/* 按钮统一使用 .btn 类 */ +.btn-header { + font-size: var(--text-xs); + padding: var(--space-2) var(--space-3); + border-radius: var(--radius-md); + background: var(--bg-elevated); + color: var(--text-secondary); + transition: all var(--transition-fast); + border: none; + cursor: pointer; +} + +.btn-header:hover { + background: var(--bg-sunken); + color: var(--text-primary); +} + +.btn-primary { + background: var(--accent-primary); + color: var(--text-inverse); +} + +.btn-primary:hover { + background: var(--accent-primary-hover); +} + +.btn-secondary { + background: var(--bg-elevated); + color: var(--text-primary); +} + +/* 视图切换器 */ +.view-toggle-group { + display: flex; + background: var(--bg-primary); + padding: var(--space-1); + border-radius: var(--radius-lg); + gap: var(--space-1); +} + +.view-toggle-btn { + padding: var(--space-2) var(--space-3); + font-size: var(--text-xs); + font-weight: var(--font-medium); + border-radius: var(--radius-md); + color: var(--text-secondary); + transition: all var(--transition-fast); + cursor: pointer; + border: none; + background: transparent; +} + +.view-toggle-btn:hover { + color: var(--text-primary); +} + +.view-toggle-btn.active { + background: var(--bg-secondary); + color: var(--accent-primary); + box-shadow: var(--shadow-xs); +} + +/* 输入框 */ +.panel-textarea { + width: 100%; + height: 96px; + background: var(--bg-primary); + border: 1px solid var(--border-default); + border-radius: var(--radius-lg); + padding: var(--space-3); + font-size: var(--text-sm); + color: var(--text-primary); +} + +.panel-textarea:focus { + outline: none; + border-color: var(--accent-primary); + box-shadow: 0 0 0 2px var(--info-bg); +} + +/* 模态框 */ +.rewrite-modal-backdrop { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.6); + display: flex; + align-items: center; + justify-content: center; + z-index: var(--z-modal-backdrop); +} + +.rewrite-modal { + background: var(--bg-secondary); + border-radius: var(--radius-lg); + width: 900px; + max-height: 85vh; + display: flex; + flex-direction: column; + box-shadow: var(--shadow-lg); +} + +.rewrite-modal-header { + padding: var(--space-4); + border-bottom: 1px solid var(--border-default); + display: flex; + align-items: center; + justify-content: space-between; +} + +.rewrite-modal-body { + flex: 1; + overflow-y: auto; + min-height: 300px; +} + +.rewrite-modal-footer { + padding: var(--space-4); + border-top: 1px solid var(--border-default); + display: flex; + align-items: center; + justify-content: space-between; +} + +/* 差异对比区域 */ +.diff-box { + background: var(--bg-primary); + border-radius: var(--radius-lg); + padding: var(--space-3); + border: 1px solid var(--border-default); +} + +/* 差异片段样式 */ +.diff-unchanged { + color: var(--text-muted); +} + +.diff-removed { + background: var(--warning-bg); + color: var(--accent-warning); + padding: 2px 4px; + border-radius: var(--radius-sm); + text-decoration: line-through; +} + +.diff-added { + background: var(--success-bg); + color: var(--accent-success); + padding: 2px 4px; + border-radius: var(--radius-sm); +} + +.diff-modified { + background: var(--warning-bg); + color: var(--accent-warning); + padding: 2px 4px; + border-radius: var(--radius-sm); +} + +.diff-selected-left { + background: rgba(245, 158, 11, 0.4); + color: #fef3c7; + box-shadow: 0 0 0 2px var(--accent-warning); +} + +.diff-selected-right { + background: rgba(96, 165, 250, 0.4); + color: #dbeafe; + box-shadow: 0 0 0 2px var(--accent-primary); +} + +/* 检查结果状态 */ +.check-pass { + background: var(--success-bg); + color: var(--accent-success); +} + +.check-warning { + background: var(--warning-bg); + color: var(--accent-warning); +} + +.check-fail { + background: var(--danger-bg); + color: var(--accent-danger); +} + +/* 徽章 */ +.badge-count { + font-size: var(--text-xs); + color: var(--text-muted); +} + +/* 进度指示器 */ +.progress-text { + font-size: var(--text-xs); + color: var(--text-secondary); +} diff --git a/src/components/DiffAnnotationPanel.vue b/src/components/DiffAnnotationPanel.vue index 2eab3b0..7f54d20 100644 --- a/src/components/DiffAnnotationPanel.vue +++ b/src/components/DiffAnnotationPanel.vue @@ -437,3 +437,309 @@ const exportToWord = async () => { } } + + diff --git a/src/components/DocumentsPanel.vue b/src/components/DocumentsPanel.vue index a7a0f97..d880ec5 100644 --- a/src/components/DocumentsPanel.vue +++ b/src/components/DocumentsPanel.vue @@ -1,62 +1,56 @@