From 844368b4a3414fa051677daaee489a1efd796ae7 Mon Sep 17 00:00:00 2001 From: cimorn Date: Fri, 6 Nov 2026 22:43:33 -0800 Subject: [PATCH 1/2] style: refine DataBack ledger interface Fixes #13 --- web/src/bulk-records.css | 18 ++-- web/src/features/Overview.tsx | 4 +- web/src/styles.css | 186 ++++++++++++++++++---------------- 3 files changed, 111 insertions(+), 97 deletions(-) diff --git a/web/src/bulk-records.css b/web/src/bulk-records.css index deb128a..3ed44f5 100644 --- a/web/src/bulk-records.css +++ b/web/src/bulk-records.css @@ -1,15 +1,15 @@ .bulk-backup-form { min-width: 0; } .bulk-backup-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; } -.bulk-mode-switch { display: flex; gap: 4px; padding: 4px; background: #f2f5fa; border-radius: 8px; } -.bulk-mode-switch button { border: 0; flex: 1; padding: 8px 12px; border-radius: 6px; background: transparent; color: #64748b; } -.bulk-mode-switch button[aria-pressed="true"] { color: var(--accent); background: #fff; box-shadow: 0 1px 4px #172b4d12; font-weight: 600; } +.bulk-mode-switch { display: flex; gap: 4px; padding: 4px; background: var(--raised); border-radius: 8px; } +.bulk-mode-switch button { border: 0; flex: 1; padding: 8px 12px; border-radius: 6px; background: transparent; color: var(--secondary); } +.bulk-mode-switch button[aria-pressed="true"] { color: var(--accent); background: var(--paper); box-shadow: inset 0 0 0 1px var(--border); font-weight: 600; } .bulk-picker-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 13px; } -.bulk-picker-heading strong { color: #344969; } +.bulk-picker-heading strong { color: var(--text); } .bulk-picker-actions { display: flex; gap: 18px; margin-top: -5px; } .bulk-asset-list { border: 1px solid var(--border); border-radius: 8px; max-height: 190px; overflow-y: auto; overscroll-behavior: contain; } -.bulk-asset-option { display: flex; align-items: center; gap: 10px; padding: 9px 12px; min-height: 38px; cursor: pointer; } -.bulk-asset-option + .bulk-asset-option { border-top: 1px solid #f0f3f8; } -.bulk-asset-option:hover { background: #f7f9fe; } +.bulk-asset-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 36px; cursor: pointer; } +.bulk-asset-option + .bulk-asset-option { border-top: 1px solid var(--border); } +.bulk-asset-option:hover { background: var(--page); } .bulk-asset-option span { min-width: 0; overflow-wrap: anywhere; } .bulk-shared-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 4px; } .bulk-shared-fields .field:last-child { grid-column: 1 / -1; } @@ -18,7 +18,7 @@ .bulk-preview { min-width: 0; margin-top: 18px; display: grid; gap: 10px; } .bulk-preview .table-scroll { max-height: 280px; border: 1px solid var(--border); border-radius: 8px; overscroll-behavior: contain; } .bulk-preview-table { table-layout: fixed; font-size: 12px; } -.bulk-preview-table th { position: sticky; top: 0; background: #f7f9fd; padding: 10px 12px; } +.bulk-preview-table th { position: sticky; top: 0; background: var(--raised); padding: 10px 12px; } .bulk-preview-table td { padding: 10px 12px; overflow-wrap: anywhere; vertical-align: top; } .bulk-preview-table th:nth-child(1) { width: 29%; } .bulk-preview-table th:nth-child(2) { width: 26%; } @@ -39,5 +39,5 @@ .bulk-preview-table tr { padding: 8px 10px; border-bottom: 1px solid var(--border); } .bulk-preview-table tr:last-child { border-bottom: 0; } .bulk-preview-table td { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 3px 0; border: 0; } - .bulk-preview-table td::before { content: attr(data-label); color: #7283a0; } + .bulk-preview-table td::before { content: attr(data-label); color: var(--muted); } } diff --git a/web/src/features/Overview.tsx b/web/src/features/Overview.tsx index 0e5b527..a2dd85a 100644 --- a/web/src/features/Overview.tsx +++ b/web/src/features/Overview.tsx @@ -115,9 +115,9 @@ export function Overview(actions: OverviewActions) { }; return <>{actions.onBulk&&!showingRecords?bulkSelecting?<>{actions.onPaste?:null}::null}{!bulkSelecting?<>:null} : undefined} />
- {showingRecords ? null :
}
+ {showingRecords ? null :
} {orderError ?
{orderError}
: null} - {showingRecords ? actions.onEditRecords(folder.id)} onAddRecord={() => actions.onAddRecord(folder.id)} /> :
{!rows.length ? keyword ? { setKeyword(''); setSelected([]); }}>清除搜索} /> :
: undefined} /> : + {showingRecords ? actions.onEditRecords(folder.id)} onAddRecord={() => actions.onAddRecord(folder.id)} /> :
{!rows.length ? keyword ? { setKeyword(''); setSelected([]); }}>清除搜索} /> :
: undefined} /> :
diff --git a/web/src/styles.css b/web/src/styles.css index 968e645..9ea33da 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -1,17 +1,26 @@ +/* Visual audit: Unslop by Damir Sokolovsky (heydamir.design/unslop). */ :root { font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; - color: #172b4d; - background: #f6f8fc; + color: var(--text); + background: var(--page); font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; - --accent: #4169e1; - --accent-soft: #eaf1ff; - --border: #e7ecf3; - --muted: #7b879b; - --radius: 12px; + --page: #fafaf9; + --paper: #fff; + --raised: #f3f3f1; + --border: #e2e2de; + --control-border: #d2d3cf; + --text: #24262a; + --secondary: #4f535a; + --muted: #696d74; + --accent: #315bc6; + --accent-hover: #284ba6; + --accent-soft: #edf1fb; + --floating-shadow: 0 8px 24px rgb(36 38 42 / 12%); + --radius: 8px; } * { box-sizing: border-box; } body { margin: 0; min-width: 0; font-size: 13px; } @@ -21,74 +30,73 @@ button { cursor: pointer; color: inherit; } button:disabled, input:disabled, select:disabled, .disabled { cursor: not-allowed; opacity: .55; } button, input, select, textarea { outline-offset: 3px; } :focus-visible { outline: 2px solid var(--accent); } -input, select, textarea { color: #172b4d; border: 1px solid #dfe6f1; border-radius: 7px; background: #fff; padding: 9px 12px; min-width: 0; width: 100%; min-height: 38px; } -input::placeholder, textarea::placeholder { color: #8d99ad; } +input, select, textarea { color: var(--text); border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--paper); padding: 8px 12px; min-width: 0; width: 100%; min-height: 36px; } +input::placeholder, textarea::placeholder { color: var(--muted); } select { padding-right: 28px; } textarea { resize: vertical; min-height: 86px; } input[type="checkbox"] { accent-color: var(--accent); width: 16px; min-height: 16px; height: 16px; margin: 0; flex: 0 0 16px; } h1, h2, h3, p { margin-top: 0; } -h1 { font-size: 24px; line-height: 1.4; font-weight: 600; margin-bottom: 0; letter-spacing: -.3px; } +h1 { font-size: 24px; line-height: 1.4; font-weight: 600; margin-bottom: 0; } h2 { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 0; overflow-wrap: anywhere; } h3 { font-size: 15px; font-weight: 600; } p { line-height: 1.7; } small { font-size: 12px; } .app-shell { display: flex; min-height: 100dvh; } -.sidebar { width: 208px; background: #fff; border-right: 1px solid var(--border); padding: 26px 12px; position: fixed; inset: 0 auto 0 0; z-index: 5; } -.brand { display: flex; align-items: center; gap: 11px; padding: 0 11px; margin-bottom: 30px; } -.brand strong { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.4px; white-space: nowrap; } -.brand-icon { display: block; width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; } -.sidebar nav { display: grid; gap: 5px; } -.nav-item { width: 100%; background: transparent; border: 0; border-radius: 8px; padding: 13px 15px; display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 500; text-align: left; min-height: 48px; } -.nav-item > svg { width: 20px; height: 20px; color: #7183a1; } -.nav-item:hover { background: #f6f8fc; } -.nav-item.active { color: var(--accent); background: var(--accent-soft); } +.sidebar { width: 208px; background: var(--paper); border-right: 1px solid var(--border); padding: 24px 12px; position: fixed; inset: 0 auto 0 0; z-index: 5; } +.brand { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 24px; } +.brand strong { display: block; font-size: 18px; font-weight: 600; white-space: nowrap; } +.brand-icon { display: block; width: 32px; height: 32px; flex-shrink: 0; object-fit: contain; } +.sidebar nav { display: grid; gap: 4px; } +.nav-item { width: 100%; background: transparent; border: 0; border-radius: 6px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; text-align: left; min-height: 36px; } +.nav-item > svg { width: 16px; height: 16px; stroke-width: 1.5; color: var(--muted); } +.nav-item:hover { background: var(--raised); } +.nav-item.active { color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); } .nav-item.active > svg { color: var(--accent); } .main-content { margin-left: 208px; padding: 24px 28px 40px; width: calc(100% - 208px); min-width: 0; } -.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; min-height: 38px; } -.heading-actions { display: flex; gap: 12px; flex-shrink: 0; } -.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 7px; min-height: 38px; padding: 8px 18px; font-size: 14px; line-height: 1.4; font-weight: 550; white-space: nowrap; text-decoration: none; } +.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; min-height: 36px; } +.heading-actions { display: flex; gap: 8px; flex-shrink: 0; } +.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius); min-height: 36px; padding: 8px 12px; font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; text-decoration: none; } +.button > svg, .icon-button > svg, .search-field > svg { width: 16px; height: 16px; stroke-width: 1.5; flex-shrink: 0; } .button.primary { background: var(--accent); color: #fff; border-color: var(--accent); } -.button.primary:hover:not(:disabled) { background: #345acb; border-color: #345acb; } -.button.secondary { background: #fff; color: var(--accent); border-color: #8ba4ee; } -.button.secondary:hover:not(:disabled) { background: #f2f6ff; } +.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); } +.button.secondary { background: var(--paper); color: var(--text); border-color: var(--control-border); } +.button.secondary:hover:not(:disabled) { background: var(--raised); } .button.compact { padding: 6px 12px; min-height: 34px; font-size: 13px; } .button.danger { background: #bf454d; color: #fff; } .text-button { display: inline-flex; gap: 6px; align-items: center; border: 0; background: transparent; color: var(--accent); padding: 4px 0; font-size: 13px; white-space: nowrap; } .text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; } -.icon-button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; width: 30px; height: 30px; border-radius: 6px; color: #7283a0; flex-shrink: 0; } -.icon-button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); } +.icon-button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; width: 32px; height: 32px; border-radius: 6px; color: var(--secondary); flex-shrink: 0; } +.icon-button:hover:not(:disabled) { background: var(--raised); color: var(--text); } .icon-button.small { width: 28px; height: 28px; } .danger-text { color: #b7444d; } .muted { color: var(--muted); } .teal { color: var(--accent); } .path { overflow-wrap: anywhere; word-break: break-word; } .small-copy { font-size: 12px; margin: 0 0 14px; } -.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 16px; min-height: 58px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; } +.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; } .breadcrumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 14px; } .breadcrumbs > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; } -.breadcrumbs button { border: 0; background: transparent; padding: 5px 2px; color: #53698b; text-align: left; overflow-wrap: anywhere; } +.breadcrumbs button { border: 0; background: transparent; padding: 4px 2px; color: var(--secondary); text-align: left; overflow-wrap: anywhere; } .breadcrumbs button:hover:not(:disabled) { color: var(--accent); } .breadcrumbs strong { font-weight: 500; } -.breadcrumbs svg { color: #96a3b8; flex-shrink: 0; } +.breadcrumbs svg { color: var(--muted); flex-shrink: 0; } .breadcrumbs .up-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 6px; flex-shrink: 0; } .toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; } -.search-field { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; background: #f9fbff; border: 1px solid #dfe6f1; border-radius: 7px; padding: 0 11px; min-height: 38px; color: #8694ad; } -.search-field > svg { flex-shrink: 0; } +.search-field { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; background: var(--paper); border: 1px solid var(--control-border); border-radius: 7px; padding: 0 12px; min-height: 36px; color: var(--muted); } .search-field input { border: 0; background: transparent; padding: 8px 0; outline: none; min-width: 0; } .search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; } .toolbar select { width: 158px; } .explorer-toolbar { margin: 0; flex: 0 0 auto; } .explorer-toolbar .search-field { width: 230px; } -.explorer-toolbar select { border-left: 1px solid #dfe6f1; } -.surface { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } +.surface { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } .explorer-surface { overflow: visible; } .table-scroll { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; } -thead { background: #f7f9fd; } -th { color: #63769a; font-size: 12px; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; } -td { padding: 16px; border-bottom: 1px solid var(--border); line-height: 1.5; vertical-align: middle; } +thead { background: var(--raised); } +th { color: var(--secondary); font-size: 12px; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; } +td { padding: 12px 16px; border-bottom: 1px solid var(--border); line-height: 1.5; vertical-align: middle; } tbody tr:last-child td { border-bottom: 0; } -tbody tr:hover { background: #fcfdff; } +tbody tr:hover { background: var(--page); } .explorer-table { table-layout: fixed; } .directory-sort-heading { display: flex; align-items: center; justify-content: center; gap: 8px; } .explorer-table th:first-child .directory-sort-heading { justify-content: flex-start; } @@ -98,18 +106,21 @@ tbody tr:hover { background: #fcfdff; } .explorer-table th[aria-sort="ascending"] .directory-sort-button svg, .explorer-table th[aria-sort="descending"] .directory-sort-button svg { color: currentColor; } .directory-sort-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; } .directory-sort-button:disabled { opacity: .5; cursor: wait; } -.explorer-table th:first-child { border-radius: 12px 0 0 0; } -.explorer-table th:last-child { border-radius: 0 12px 0 0; } +.explorer-table th:first-child { border-radius: var(--radius) 0 0 0; } +.explorer-table th:last-child { border-radius: 0 var(--radius) 0 0; } .explorer-table td { padding: 10px 14px; height: 48px; } .explorer-identity { display: flex; align-items: center; gap: 14px; min-width: 0; } -.explorer-identity > svg { width: 28px; height: 28px; flex-shrink: 0; } +.explorer-identity > svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.5; } .explorer-identity > div { flex: 1; min-width: 0; } -.folder-icon { color: #74aaff; fill: #8bbbff; stroke-width: 1.25; } -.file-icon { color: #869bbb; } -.asset-name { display: block; border: 0; background: transparent; text-align: left; color: #172b4d; font-weight: 500; font-size: 13px; padding: 0; overflow-wrap: anywhere; } +.folder-icon { color: var(--secondary); } +.file-icon { color: var(--muted); } +.asset-name { display: block; border: 0; background: transparent; text-align: left; color: var(--text); font-weight: 500; font-size: 13px; padding: 0; overflow-wrap: anywhere; } .asset-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } .explorer-identity small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; } -.explorer-table time { font-size: 11px; color: #7485a2; } +time { font-variant-numeric: tabular-nums; } +time[datetime] { color: var(--secondary); } +.explorer-table time { font-size: 12px; } +.explorer-table time:not([datetime]) { color: var(--muted); } .explorer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; } .row-actions { display: flex; align-items: center; gap: 4px; } .status { display: inline-block; font-size: 12px; padding: 4px 7px; border-radius: 5px; white-space: nowrap; } @@ -118,24 +129,25 @@ tbody tr:hover { background: #fcfdff; } .explorer-table .reminder-status > svg { flex-shrink: 0; } .reminder-status.current { color: #23835f; background: #edf8f1; } .reminder-status.never, .reminder-status.due { color: #ac790f; background: #fff6e5; } -.reminder-status.disabled { color: #7b879b; background: #f0f3f8; } -.reminder-status.ordinary { color: #7b8cab; background: transparent; padding: 0; font-size: 13px; } +.reminder-status.disabled { color: var(--muted); background: var(--raised); } +.reminder-status.ordinary { color: var(--muted); background: transparent; padding: 0; font-size: 13px; } .add-child-menu { position: relative; flex: 0 0 auto; } -.add-child-menu > summary { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: #7283a0; cursor: pointer; list-style: none; } +.add-child-menu > summary { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--secondary); cursor: pointer; list-style: none; } .add-child-menu > summary::-webkit-details-marker { display: none; } .add-child-menu > summary:hover, .add-child-menu[open] > summary { background: var(--accent-soft); color: var(--accent); } -.add-child-options { position: absolute; top: calc(100% + 5px); right: 0; z-index: 10; display: grid; min-width: 114px; gap: 3px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px #172b4d14; } +.add-child-options { position: absolute; top: calc(100% + 5px); right: 0; z-index: 10; display: grid; min-width: 114px; gap: 3px; padding: 6px; background: var(--paper); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--floating-shadow); } .add-child-options .text-button { padding: 7px 10px; border-radius: 4px; } .add-child-options .text-button:hover { background: var(--accent-soft); text-decoration: none; } -.empty-state { padding: 48px 24px; text-align: center; } -.empty-state h3 { color: var(--muted); font-weight: 400; margin-bottom: 20px; } +.empty-state { padding: 32px 24px; text-align: center; } +.empty-state h3 { color: var(--muted); font-weight: 400; margin-bottom: 0; } +.empty-state h3:has(+ *) { margin-bottom: 16px; } .empty-state p { color: var(--muted); margin-bottom: 20px; } .empty-actions { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; } .due-actions { display: flex; flex-wrap: wrap; gap: 7px 12px; } .due-targets { display: grid; gap: 10px; } .due-targets strong { font-size: 13px; font-weight: 500; } .due-targets small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; } -.detail-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 18px; } +.detail-panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 16px; } .detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; } .detail-source { font-size: 12px; color: var(--muted); margin: 6px 0 14px; } .backup-summary { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } @@ -159,40 +171,40 @@ tbody tr:hover { background: #fcfdff; } .version-list strong { font-size: 13px; font-weight: 500; } .version-list small { display: block; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; } .location-name { display: flex; gap: 10px; align-items: center; min-width: 130px; } -.location-name svg { color: #788dac; } +.location-name svg { color: var(--muted); } .location-name strong { font-weight: 500; } .table-subtext { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; } -.history-filters { padding: 16px; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; overflow: visible; } +.history-filters { padding: 12px; display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; overflow: visible; } .history-filters .search-field { grid-column: 1 / -1; } .history-filters .field > label { color: var(--muted); font-size: 12px; font-weight: 400; } .history-filters > .text-button { justify-self: start; } .history-table { min-width: 830px; } .history-table td:nth-child(3) { white-space: nowrap; } .history-table td:nth-child(4) { max-width: 260px; } -.modal { width: min(540px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 12px; padding: 0; color: #172b4d; background: #fff; max-height: calc(100dvh - 48px); box-shadow: 0 24px 80px #172b4d29; overflow: auto; } +.modal { width: min(540px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 12px; padding: 0; color: var(--text); background: var(--paper); max-height: calc(100dvh - 48px); box-shadow: var(--floating-shadow); overflow: auto; } .modal-wide { width: min(820px, calc(100vw - 32px)); } -.modal::backdrop { background: #172b4d66; backdrop-filter: blur(2px); } -.modal-header { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); padding: 18px 22px; } -.form-body { padding: 22px; display: grid; gap: 17px; } +.modal::backdrop { background: rgb(36 38 42 / 32%); } +.modal-header { position: sticky; top: 0; z-index: 2; background: var(--paper); display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); padding: 12px 20px; } +.form-body { padding: 20px; display: grid; gap: 16px; } .field { display: flex; flex-direction: column; gap: 7px; min-width: 0; } .field > label { font-size: 13px; font-weight: 500; } .field small { color: var(--muted); line-height: 1.6; } .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } -.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 2px; } +.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); padding-top: 16px; } .error-message, .success-message, .connection-error { font-size: 13px; line-height: 1.7; border: 1px solid #efd2d2; border-radius: 7px; background: #fff6f6; color: #a84141; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; } .error-message { margin-bottom: 0; } .success-message { background: #eef8f4; border-color: #cde5dc; color: #28785e; margin: 0 0 17px; } .connection-error { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; } -.toast { background: #fff; border: 1px solid #cde5dc; color: #28785e; box-shadow: 0 4px 20px #172b4d0d; border-radius: 7px; position: fixed; top: 16px; right: 22px; padding: 12px 22px; font-size: 13px; z-index: 20; } +.toast { background: var(--paper); border: 1px solid #cde5dc; color: #28785e; box-shadow: var(--floating-shadow); border-radius: 7px; position: fixed; top: 16px; right: 22px; padding: 12px 22px; font-size: 13px; z-index: 20; } .initial-state { padding: 48px 0; } .initial-state p { color: var(--muted); } -.prerequisite { background: #f7f9fd; padding: 18px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; } +.prerequisite { background: var(--raised); padding: 18px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; } .prerequisite p { margin-bottom: 12px; } .destination-fieldset, .policy-targets { padding: 0; margin: 0; border: 0; min-width: 0; } .destination-fieldset legend, .policy-targets legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 500; } .destination-fieldset legend span { font-weight: 400; margin-left: 8px; } .destination { border: 1px solid var(--border); border-radius: 8px; padding: 14px 15px; margin-bottom: 10px; } -.destination.selected { border-color: #9bb2ef; background: #f8faff; } +.destination.selected { border-color: var(--accent); background: var(--accent-soft); } .checkbox-label { display: flex; gap: 10px; align-items: center; font-size: 13px; } .checkbox-label > .path { font-size: 12px; flex: 1; } .destination-fields { display: grid; gap: 13px; margin-top: 15px; } @@ -200,15 +212,15 @@ tbody tr:hover { background: #fcfdff; } .backup-target + p { margin-top: -9px; margin-bottom: 0; } .backup-policy { display: grid; gap: 17px; min-width: 0; margin: 0; padding: 15px; border: 1px solid var(--border); border-radius: 8px; } .backup-policy > legend { font-size: 13px; font-weight: 500; padding: 0 6px; } -.backup-policy:disabled { color: #8d99ad; background: #fafbfe; } -.backup-policy:disabled input { background: #f3f5f9; color: #8d99ad; } +.backup-policy:disabled { color: var(--muted); background: var(--page); } +.backup-policy:disabled input { background: var(--raised); color: var(--muted); } .delete-description { margin-bottom: 0; } .session-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; } -.session-card { width: min(100%, 400px); padding: 30px; } -.session-brand { display: flex; align-items: center; gap: 12px; color: var(--accent); margin-bottom: 26px; } -.session-brand .brand-icon { width: 44px; height: 44px; } -.session-brand strong { color: #172b4d; font-size: 23px; } -.session-card h1 { font-size: 22px; margin-bottom: 22px; } +.session-card { width: min(100%, 400px); padding: 24px; } +.session-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; } +.session-brand .brand-icon { width: 36px; height: 36px; } +.session-brand strong { font-size: 18px; font-weight: 600; } +.session-card h1 { font-size: 20px; margin-bottom: 16px; } .session-card .error-message { margin-bottom: 18px; } .session-form { display: grid; gap: 20px; } @media (min-width: 1280px) { @@ -225,17 +237,16 @@ tbody tr:hover { background: #fcfdff; } .sidebar { position: static; width: 100%; border-right: 0; border-bottom: 1px solid var(--border); padding: 16px 12px 10px; } .brand { padding: 0 4px; margin-bottom: 14px; gap: 9px; } .brand strong { font-size: 20px; } - .brand > .brand-icon { width: 30px; height: 30px; } + .brand > .brand-icon { width: 32px; height: 32px; } .sidebar nav { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; } .nav-item { flex: 0 0 auto; width: auto; justify-content: center; min-height: 40px; padding: 9px 10px; font-size: 12px; gap: 5px; } - .nav-item > svg { width: 16px; height: 16px; } .main-content { width: 100%; margin-left: 0; padding: 16px 12px 28px; } h1 { font-size: 20px; } h2 { font-size: 16px; } .page-heading { gap: 14px; flex-wrap: wrap; margin-bottom: 16px; } .heading-actions { width: 100%; gap: 9px; } .heading-actions .button { flex: 1; padding: 8px 10px; font-size: 12px; } - .directory-toolbar { gap: 12px; flex-direction: column; align-items: stretch; padding: 12px; } + .directory-toolbar { gap: 12px; flex-direction: column; align-items: stretch; } .breadcrumbs { font-size: 12px; gap: 6px; } .breadcrumbs > span { gap: 6px; } .explorer-toolbar { gap: 8px; flex-wrap: wrap; } @@ -255,7 +266,6 @@ tbody tr:hover { background: #fcfdff; } .explorer-table td[data-label="操作"]::before { content: none; } .explorer-table td[data-label="备份说明"] { grid-column: 1 / -1; grid-row: 3; align-items: flex-start; } .explorer-identity { width: 100%; gap: 8px; } - .explorer-identity > svg { width: 24px; height: 24px; } .explorer-table .asset-name { font-size: 12px; line-height: 1.4; } .explorer-table .action-menu-trigger { min-height: 28px; font-size: 12px; } .explorer-table time { white-space: nowrap; } @@ -274,28 +284,33 @@ tbody tr:hover { background: #fcfdff; } .history-filters .search-field { grid-column: 1 / -1; } .form-grid { grid-template-columns: 1fr; } .modal { max-height: calc(100dvh - 26px); width: calc(100vw - 20px); } - .modal-header { padding: 15px 17px; } - .form-body { padding: 18px 17px; gap: 15px; } + .modal-header { padding: 12px 16px; } + .form-body { padding: 16px; } .destination { padding: 13px; } .checkbox-label { flex-wrap: wrap; } .checkbox-label > .path { flex-basis: calc(100% - 28px); margin-left: 26px; } .connection-error { flex-direction: column; align-items: flex-start; } .toast { right: 12px; left: 12px; text-align: center; } - .session-page { padding: 18px; } - .session-card { padding: 25px 21px; } + .session-page { padding: 16px; } + .session-card { padding: 24px 20px; } +} +@media (prefers-reduced-motion: no-preference) { + .button, .nav-item, .icon-button { transition: color 120ms ease-out, background-color 120ms ease-out, border-color 120ms ease-out; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } } /* Compact directory controls and complete record history. */ .action-menu { display: inline-flex; } -.action-menu-trigger { white-space: nowrap; gap: 4px; } -.action-menu-options { position: fixed; z-index: 80; width: 190px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: white; box-shadow: 0 8px 28px #22304b24; } +.action-menu-trigger { white-space: nowrap; gap: 4px; color: var(--secondary); } +.action-menu-trigger[aria-expanded="true"] { color: var(--accent); } +.action-menu-options { position: fixed; z-index: 80; width: 190px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--floating-shadow); } .action-menu-options[hidden] { display: none; } .action-menu-options button { display: block; width: 100%; border: 0; border-radius: 5px; background: transparent; text-align: left; padding: 9px 11px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; } -.action-menu-options button:hover, .action-menu-options button:focus-visible { background: #edf3fb; outline: none; } +.action-menu-options button:hover, .action-menu-options button:focus-visible { background: var(--raised); } +.action-menu-options button:focus-visible { outline-offset: -2px; } .action-menu-options button:disabled { opacity: .4; cursor: default; } .action-menu-options button.danger { color: #ba3a3a; } -.drag-handle { border: 0; background: transparent; color: #8f9bad; padding: 3px; display: flex; flex-shrink: 0; cursor: grab; } +.drag-handle { border: 0; background: transparent; color: var(--muted); padding: 3px; display: flex; flex-shrink: 0; cursor: grab; } .drag-handle:disabled { opacity: .3; cursor: default; } @media (min-width: 1001px) { .explorer-table col { width: 33.333333%; } @@ -306,7 +321,6 @@ tbody tr:hover { background: #fcfdff; } .explorer-table th { padding: 8px 12px; } .explorer-table td { padding: 6px 12px; height: 40px; } .explorer-identity { gap: 10px; } - .explorer-identity > svg { width: 24px; height: 24px; } } .directory-backup-notes { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; } .record-table-scroll { margin-top: 12px; } @@ -328,16 +342,16 @@ tbody tr:hover { background: #fcfdff; } .drag-handle { touch-action: none; user-select: none; } .sorting-source { opacity: .6; } -.sorting-target { box-shadow: inset 0 2px #4382d8; background: #f4f8fe; } +.sorting-target { box-shadow: inset 0 2px var(--accent); background: var(--accent-soft); } /* Secondary workflows stay inside existing forms and data management. */ .toast { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: calc(100vw - 24px); } -.directory-create-modes { display: flex; gap: 4px; padding: 4px; width: fit-content; border-radius: 8px; background: #f0f4fa; } +.directory-create-modes { display: flex; gap: 4px; padding: 4px; width: fit-content; border-radius: 8px; background: var(--raised); } .directory-create-modes button { border: 0; padding: 7px 22px; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; } -.directory-create-modes button[aria-selected="true"] { background: #fff; color: var(--accent); box-shadow: 0 1px 4px #172b4d10; } +.directory-create-modes button[aria-selected="true"] { background: var(--paper); color: var(--accent); box-shadow: inset 0 0 0 1px var(--border); } .directory-create-modes button:disabled { cursor: default; opacity: .6; } .directory-batch-preview { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; } -.directory-batch-summary { padding: 10px 14px; background: #f7f9fd; color: var(--muted); font-size: 12px; } +.directory-batch-summary { padding: 10px 14px; background: var(--raised); color: var(--muted); font-size: 12px; } .directory-batch-rows { overflow: auto; max-height: 260px; } .directory-batch-rows table { min-width: 0; table-layout: fixed; width: 100%; } .directory-batch-rows th:first-child { width: 60%; } From 10e2d40293e72d3f72bb862413152901046f0e97 Mon Sep 17 00:00:00 2001 From: cimorn Date: Fri, 6 Nov 2026 22:48:35 -0800 Subject: [PATCH 2/2] style: restore file and folder icon colors Refs #13 --- web/src/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/styles.css b/web/src/styles.css index 9ea33da..842a745 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -112,8 +112,8 @@ tbody tr:hover { background: var(--page); } .explorer-identity { display: flex; align-items: center; gap: 14px; min-width: 0; } .explorer-identity > svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.5; } .explorer-identity > div { flex: 1; min-width: 0; } -.folder-icon { color: var(--secondary); } -.file-icon { color: var(--muted); } +.folder-icon { color: #74aaff; fill: #8bbbff; } +.file-icon { color: #869bbb; } .asset-name { display: block; border: 0; background: transparent; text-align: left; color: var(--text); font-weight: 500; font-size: 13px; padding: 0; overflow-wrap: anywhere; } .asset-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; } .explorer-identity small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }