From d36deb6922d564dd29befe1c7277aeb3094be3f9 Mon Sep 17 00:00:00 2001 From: Yaojia Wang Date: Mon, 6 Jul 2026 08:10:34 +0200 Subject: [PATCH] fix(ios): dark-appearance-first + readable dirty badge (gold-on-light contrast) Amber-gold accent is designed for the desktop's warm-dark background; on light mode gold text/badges wash out. Match the desktop (dark theme by default): .preferredColorScheme(.dark) at the root. DirtyBadge becomes a soft filled capsule (amber on amber-18%) instead of amber-on-quaternary, readable in any mode. --- ios/App/WebTerm/Screens/ProjectDetailScreen.swift | 5 +++-- ios/App/WebTerm/Wiring/RootView.swift | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ios/App/WebTerm/Screens/ProjectDetailScreen.swift b/ios/App/WebTerm/Screens/ProjectDetailScreen.swift index c4b719d..8ee37d9 100644 --- a/ios/App/WebTerm/Screens/ProjectDetailScreen.swift +++ b/ios/App/WebTerm/Screens/ProjectDetailScreen.swift @@ -259,11 +259,12 @@ struct ProjectDetailScreen: View { struct DirtyBadge: View { var body: some View { Text(ProjectsCopy.dirtyBadge) - .font(DS.Typography.caption) + .font(DS.Typography.caption.weight(.medium)) + // 软填充胶囊:amber 字 + amber 淡底(非浅灰底),明暗两态都清晰。 .foregroundStyle(DS.Palette.statusWaiting) .padding(.horizontal, DS.Space.sm8) .padding(.vertical, DS.Space.xs2) - .background(.quaternary, in: Capsule()) + .background(DS.Palette.statusWaiting.opacity(0.18), in: Capsule()) } } diff --git a/ios/App/WebTerm/Wiring/RootView.swift b/ios/App/WebTerm/Wiring/RootView.swift index 86e6486..eaa32eb 100644 --- a/ios/App/WebTerm/Wiring/RootView.swift +++ b/ios/App/WebTerm/Wiring/RootView.swift @@ -24,6 +24,10 @@ struct RootView: View { // DS:唯一的根 tint 注入点(Tokens.swift 头注约定)。子树若需别的 // 语义色(gate 的 amber、终端的 orange)在各自局部 `.tint` 覆盖。 .tint(DS.Palette.accent) + // 深色优先 —— 对齐桌面 web 主题(DEFAULT_SETTINGS.theme = 'dark')。 + // 琥珀金强调色是为暖深色背景设计的(桌面 --bg #100F0D);浅色底上 + // 金字对比不足。深色下 accent/status 全部高对比,且与桌面观感一致。 + .preferredColorScheme(.dark) } }