v2.0.0: 主题系统+SSH私钥解析修复+会话持久化+连接池优化+UI打磨
核心修复:
- ssh-service.ts: 新增 resolvePrivateKey(),将私钥文件路径(~/.ssh/id_rsa)解析为内容后传给 ssh2,
解决 'Cannot parse privateKey: Unsupported key format' 错误
- useTerminalConnection.ts + sessionHelper.ts: 根据 authType 过滤字段,password/agent 认证不再传 privateKey
- sessionStore.ts: addSession() 现在先调用 sessionCreate() 持久化到 SQLite,解决恢复标签'无可用连接信息'问题
- database-service.ts: updateSession() 补充 private_key_path 字段持久化
- SessionDialog.tsx: 默认 username='root'、privateKey='~/.ssh/id_rsa'
UI/UX:
- 语义化主题系统(app-theme.ts),强制深色模式,全局无边框设计
- macOS 标题栏支持双击最大化(window:toggleMaximize IPC)
- macOS 菜单栏('OpsXShell' 应用菜单 + Settings Cmd+,)
- WelcomeView 4卡片布局,移除 Settings 按钮
- TabBar/TabItem 背景色统一(bg-dark-800/900),消除白色边框线
架构优化:
- SFTP 生命周期修复(useSFTP.ts useRef + autoConnectAttempted guard)
- 连接池竞态修复,支持快速多标签连接
- IPC 接口规范化,安全错误处理
- Vite 代码分割优化
质量: lint零错误 | tsc零错误 | build成功 | 49 tests pass
This commit is contained in:
1 parent
37e65be823
commit
514d62644e
77 files changed
+2563
-931
No files matched your search
+66
-5
@@ -4,21 +4,82 @@ export default {
|
||||
"./index.html",
|
||||
"./src/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
// Background surfaces — driven by CSS custom properties set per theme
|
||||
// Semantic color tokens — driven by CSS custom properties set per theme
|
||||
surface: {
|
||||
base: 'var(--color-surface-base)',
|
||||
raised: 'var(--color-surface-raised)',
|
||||
overlay: 'var(--color-surface-overlay)',
|
||||
inset: 'var(--color-surface-inset)',
|
||||
},
|
||||
// Legacy dark-* aliases for backward compatibility
|
||||
dark: {
|
||||
900: 'var(--color-dark-900)',
|
||||
800: 'var(--color-dark-800)',
|
||||
700: 'var(--color-dark-700)',
|
||||
600: 'var(--color-dark-600)',
|
||||
900: 'var(--color-surface-base)',
|
||||
800: 'var(--color-surface-raised)',
|
||||
700: 'var(--color-surface-overlay)',
|
||||
600: 'var(--color-surface-inset)',
|
||||
},
|
||||
accent: {
|
||||
blue: 'var(--color-accent-blue)',
|
||||
green: 'var(--color-accent-green)',
|
||||
purple: 'var(--color-accent-purple)',
|
||||
orange: 'var(--color-accent-orange)',
|
||||
red: 'var(--color-accent-red)',
|
||||
},
|
||||
content: {
|
||||
primary: 'var(--color-content-primary)',
|
||||
secondary: 'var(--color-content-secondary)',
|
||||
tertiary: 'var(--color-content-tertiary)',
|
||||
inverse: 'var(--color-content-inverse)',
|
||||
},
|
||||
border: {
|
||||
DEFAULT: 'var(--color-border)',
|
||||
strong: 'var(--color-border-strong)',
|
||||
},
|
||||
},
|
||||
fontFamily: {
|
||||
sans: [
|
||||
'Inter',
|
||||
'-apple-system',
|
||||
'BlinkMacSystemFont',
|
||||
'"Segoe UI"',
|
||||
'Roboto',
|
||||
'"Helvetica Neue"',
|
||||
'Arial',
|
||||
'"Noto Sans SC"',
|
||||
'"PingFang SC"',
|
||||
'"Microsoft YaHei"',
|
||||
'sans-serif',
|
||||
],
|
||||
mono: [
|
||||
'Menlo',
|
||||
'Monaco',
|
||||
'Consolas',
|
||||
'"Liberation Mono"',
|
||||
'"Courier New"',
|
||||
'monospace',
|
||||
],
|
||||
},
|
||||
animation: {
|
||||
'fade-in': 'fadeIn 0.15s ease-out',
|
||||
'slide-up': 'slideUp 0.2s ease-out',
|
||||
'scale-in': 'scaleIn 0.15s ease-out',
|
||||
},
|
||||
keyframes: {
|
||||
fadeIn: {
|
||||
'0%': { opacity: '0' },
|
||||
'100%': { opacity: '1' },
|
||||
},
|
||||
slideUp: {
|
||||
'0%': { opacity: '0', transform: 'translateY(8px)' },
|
||||
'100%': { opacity: '1', transform: 'translateY(0)' },
|
||||
},
|
||||
scaleIn: {
|
||||
'0%': { opacity: '0', transform: 'scale(0.96)' },
|
||||
'100%': { opacity: '1', transform: 'scale(1)' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user