全面优化:暗色主题、文件监听、未保存提醒、滚动同步、分屏记忆、文件大小显示、删除死代码

This commit is contained in:
thzxx
2026-05-18 13:09:31 +08:00
parent dbbf1efc78
commit cb29c67f94
5 changed files with 403 additions and 157 deletions
+82 -1
View File
@@ -27,6 +27,24 @@
--font-mono: "Cascadia Code", "Fira Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}
/* ===== Dark Theme ===== */
:root.dark {
--primary: #8ab4f8;
--primary-light: #1a3a5c;
--primary-dark: #aecbfa;
--bg: #1e1e1e;
--bg-secondary: #252526;
--bg-tertiary: #2d2d2d;
--text: #d4d4d4;
--text-secondary: #9e9e9e;
--text-tertiary: #6e6e6e;
--border: #3e3e3e;
--border-light: #333333;
--code-bg: #2d2d2d;
--shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
--shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
}
html, body {
height: 100%;
font-family: var(--font-ui);
@@ -50,12 +68,14 @@ html, body {
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px;
flex-shrink: 0;
z-index: 10;
}
.toolbar-left {
.toolbar-left,
.toolbar-right {
display: flex;
align-items: center;
gap: 2px;
@@ -98,6 +118,55 @@ html, body {
margin: 0 6px;
}
/* ===== Modified Banner ===== */
#modified-banner {
display: flex;
align-items: center;
gap: 12px;
padding: 6px 12px;
background: #fff3cd;
border-bottom: 1px solid #ffc107;
font-size: 13px;
color: #856404;
flex-shrink: 0;
}
:root.dark #modified-banner {
background: #3a3000;
border-bottom-color: #665500;
color: #ffd54f;
}
#modified-banner.hidden {
display: none;
}
.banner-btn {
padding: 2px 10px;
border: 1px solid #ffc107;
border-radius: 4px;
background: transparent;
color: #856404;
font-size: 12px;
cursor: pointer;
font-family: var(--font-ui);
}
:root.dark .banner-btn {
border-color: #665500;
color: #ffd54f;
}
.banner-btn:hover {
background: #ffc107;
color: #000;
}
:root.dark .banner-btn:hover {
background: #665500;
color: #fff;
}
/* ===== Main Content ===== */
#main-content {
flex: 1;
@@ -298,6 +367,10 @@ html, body {
color: #e83e8c;
}
:root.dark .markdown-body code {
color: #f48fb1;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
@@ -370,6 +443,14 @@ html, body {
color: var(--border);
}
.status-size-divider {
display: none;
}
.status-size-divider.visible {
display: inline;
}
/* ===== Drop Overlay ===== */
#drop-overlay {
position: fixed;