Skip to content

Commit cff2659

Browse files
committed
feat(ios): refresh onboarding setup flow
1 parent 927bbeb commit cff2659

16 files changed

Lines changed: 1970 additions & 944 deletions

apps/.i18n/native-source.json

Lines changed: 313 additions & 225 deletions
Large diffs are not rendered by default.

apps/ios/Resources/Localizable.xcstrings

Lines changed: 134 additions & 134 deletions
Large diffs are not rendered by default.

apps/ios/Sources/Design/OpenClawBrand.swift

Lines changed: 324 additions & 4 deletions
Large diffs are not rendered by default.

apps/ios/Sources/Design/OpenClawProComponents.swift

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ enum OpenClawRadius {
2121
static let xs: CGFloat = 8
2222
static let sm: CGFloat = 10
2323
static let md: CGFloat = 12
24-
static let lg: CGFloat = 16
2524
}
2625

2726
struct OpenClawProBackground: View {
@@ -561,62 +560,6 @@ struct OpenClawStatusBadge: View {
561560
}
562561
}
563562

564-
struct OpenClawPrimaryButtonStyle: ButtonStyle {
565-
@Environment(\.isEnabled) private var isEnabled
566-
567-
func makeBody(configuration: Configuration) -> some View {
568-
configuration.label
569-
.font(OpenClawType.headline)
570-
.foregroundStyle(self.isEnabled ? Color.white : OpenClawBrand.textSecondary)
571-
.frame(maxWidth: .infinity, minHeight: 48)
572-
.background {
573-
RoundedRectangle(cornerRadius: OpenClawRadius.sm, style: .continuous)
574-
.fill(
575-
!self.isEnabled
576-
? Color(uiColor: .tertiarySystemFill)
577-
: configuration.isPressed
578-
? OpenClawBrand.accentPressed
579-
: OpenClawBrand.accent)
580-
}
581-
.animation(.easeOut(duration: 0.15), value: configuration.isPressed)
582-
.animation(.easeOut(duration: 0.15), value: self.isEnabled)
583-
}
584-
}
585-
586-
struct OpenClawSecondaryButtonStyle: ButtonStyle {
587-
@Environment(\.isEnabled) private var isEnabled
588-
589-
func makeBody(configuration: Configuration) -> some View {
590-
configuration.label
591-
.font(OpenClawType.headline)
592-
.foregroundStyle(self.isEnabled ? OpenClawBrand.textPrimary : OpenClawBrand.textSecondary.opacity(0.68))
593-
.frame(maxWidth: .infinity, minHeight: 48)
594-
.background {
595-
RoundedRectangle(cornerRadius: OpenClawRadius.sm, style: .continuous)
596-
.fill(Color(uiColor: self.isEnabled ? .secondarySystemBackground : .tertiarySystemFill))
597-
.overlay {
598-
RoundedRectangle(cornerRadius: OpenClawRadius.sm, style: .continuous)
599-
.strokeBorder(
600-
Color(uiColor: .separator).opacity(self.isEnabled ? 0.35 : 0.20),
601-
lineWidth: 1)
602-
}
603-
}
604-
.opacity(!self.isEnabled ? 0.74 : configuration.isPressed ? 0.82 : 1)
605-
.animation(.easeOut(duration: 0.15), value: configuration.isPressed)
606-
.animation(.easeOut(duration: 0.15), value: self.isEnabled)
607-
}
608-
}
609-
610-
extension View {
611-
func openClawPrimaryButton() -> some View {
612-
self.buttonStyle(OpenClawPrimaryButtonStyle())
613-
}
614-
615-
func openClawSecondaryButton() -> some View {
616-
self.buttonStyle(OpenClawSecondaryButtonStyle())
617-
}
618-
}
619-
620563
struct ProStatusDot: View {
621564
var color: Color
622565

apps/ios/Sources/Design/OpenClawTypography.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ enum OpenClawType {
129129
scaledMono(name: Mono.regular, size: 13, relativeTo: .footnote)
130130
}
131131

132-
static var monoHeadline: Font {
133-
scaledMono(name: Mono.medium, size: 17, relativeTo: .headline)
134-
}
135-
136132
/// PostScript names for bundled fonts. Keep aligned with `UIAppFonts` in `project.yml`.
137133
static let registeredPostScriptNames: [String] = [
138134
Display.postScriptName,

apps/ios/Sources/Design/TalkSiriWave.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ struct TalkSiriWaveView: View {
8585
// across the line instead of scrolling off-screen.
8686
let lobes: [(A: Double, k: Double, t: Double)] = (0..<3).map { index in
8787
let f = Double(index)
88-
let amp = 0.30 + 0.70 * (0.5 + 0.5 * sin(time * (0.9 + 0.23 * f) + seed * 2.4 + f * 2.1))
88+
let ampFrequency = 0.9 + 0.23 * f
89+
let ampPhase = time * ampFrequency + seed * 2.4 + f * 2.1
90+
let amp = 0.30 + 0.70 * (0.5 + 0.5 * sin(ampPhase))
8991
let k = 0.62 + 0.11 * f
90-
let t = 2.8 * sin(time * (0.45 + 0.17 * f) + seed + f * 1.9)
92+
let driftFrequency = 0.45 + 0.17 * f
93+
let driftPhase = time * driftFrequency + seed + f * 1.9
94+
let t = 2.8 * sin(driftPhase)
9195
return (A: amp, k: k, t: t)
9296
}
9397

0 commit comments

Comments
 (0)