Fix L49/L53/L59: error string newlines, dialog null-safety, shared theme constant

L49: Remove newline from missing-binary error message in download.ts; inline
     error spans render it as literal newline, now one sentence with period.
L53: backup.ts exportBackup/importBackup/showMessageBox no longer use win!
     non-null assertions -- each uses a guarded ternary (same pattern index.ts
     already used for chooseFolder).
L59: Extract PAGE_BACKGROUND to src/shared/theme.ts; main/index.ts and
     renderer/src/theme.ts both import from it -- no more "keep in sync" comment.

typecheck + 242 tests + eslint + prettier green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 13:42:22 -04:00
parent 72462cab1e
commit 9d816f0c86
6 changed files with 35 additions and 32 deletions
+2 -8
View File
@@ -1,3 +1,4 @@
import { PAGE_BACKGROUND } from '@shared/theme'
import {
createLightTheme,
createDarkTheme,
@@ -168,14 +169,7 @@ export function getTheme(accent: AccentColor, mode: 'light' | 'dark'): Theme {
return mode === 'dark' ? preset.dark : preset.light
}
// Page background behind the app shell. Light: a clean, barely-cool off-white.
// Dark: neutral charcoal. Intentionally accent-INDEPENDENT — the accent shows up
// only on buttons/links, so this stays neutral whichever preset is chosen.
// Keep light/dark in sync with THEME_BACKGROUND in src/main/index.ts.
export const pageBackground = {
light: '#f7f7f8',
dark: '#161618'
}
export const pageBackground = PAGE_BACKGROUND
// Per-kind thumbnail tints. Video vs audio differ by ramp DEPTH rather than a
// competing hue, keeping a monochrome look. Theme-aware (light/dark) but