mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-05 09:31:39 +00:00
* feat(ios): unify navigation on a black overlay sidebar and drop the phone tab bar * test(ios): rework navigation tests and snapshot UITests for the sidebar shell * chore(i18n): sync derived native catalogs for sidebar strings * feat(ios): reveal the sidebar beneath a push-away rounded content card * feat(ios): web-parity sidebar — agent switcher, pinned pages, sessions vocabulary, uniform content card * chore(i18n): translate sidebar and session strings across native catalogs * fix(ios): sidebar footer shows connection dot only when degraded, like the web * feat(ios): sidebar toggle top-left with edge-swipe open; card surface owns the drawer chrome * fix(ios): single sidebar refresh owner, alias-aware Home badges, RM tap-close, user pin order, drop vestigial idiom shims * feat(ios): align sidebar with the mobile prototype — agent roster, theme-following palette, web session subtitles, row badges * chore(i18n): translate agent roster and Recent strings across native catalogs * feat(ios): frosted-glass agent picker with uniform drawer insets * fix(ios): address sidebar review findings — settings toggle edge, per-agent scoping, alias-aware selection, cron paging, refresh cadence * fix(ios): clear landing CI blockers
32 lines
1.3 KiB
Swift
32 lines
1.3 KiB
Swift
import SwiftUI
|
|
import UIKit
|
|
|
|
/// Sidebar surface tokens mirroring the mobile-exp prototype palette; the
|
|
/// drawer follows the app appearance (owner decision superseding always-dark).
|
|
enum OpenClawSidebarPalette {
|
|
static let background = adaptive(light: 0xFAFAFA, dark: 0x000000)
|
|
static let elevated = adaptive(light: 0xF2F2F2, dark: 0x1A1A1A)
|
|
static let selection = adaptive(light: 0xEDEDED, dark: 0x232327)
|
|
static let text = adaptive(light: 0x171717, dark: 0xEDEDED)
|
|
static let textStrong = adaptive(light: 0x171717, dark: 0xEDEDED)
|
|
static let muted = adaptive(light: 0x8F8F8F, dark: 0x8F8F8F)
|
|
static let accent = OpenClawBrand.accent
|
|
|
|
static let hairline = Color(uiColor: UIColor { traits in
|
|
traits.userInterfaceStyle == .dark
|
|
? UIColor(white: 1, alpha: 0.14)
|
|
: UIColor(white: 0, alpha: 0.08)
|
|
})
|
|
|
|
private static func adaptive(light: UInt32, dark: UInt32) -> Color {
|
|
Color(uiColor: UIColor { traits in
|
|
let value = traits.userInterfaceStyle == .dark ? dark : light
|
|
return UIColor(
|
|
red: CGFloat((value >> 16) & 0xFF) / 255,
|
|
green: CGFloat((value >> 8) & 0xFF) / 255,
|
|
blue: CGFloat(value & 0xFF) / 255,
|
|
alpha: 1)
|
|
})
|
|
}
|
|
}
|