feat: Kisani rebrand, step-based onboarding flow, dark mode fixes

- Rename app to Kisani in all UI text and Face ID prompt
- Replace flat 2-state RootView with 5-step flow: ConnectView →
  LoginView → FolderSetupView → PhotoPermissionView → MainTabView
- Remove NavigationStack from LoginView (was causing nested-stack crash);
  drive navigation via ConnectionStore.isSessionActive
- Add FolderSetupView and PhotoPermissionView onboarding screens with
  step indicator (2/3, 3/3), spring entrance animations, and UGreen
  connection chip
- Fix dark mode button invisibility: PrimaryButtonStyle and PillButtonStyle
  now use AppTheme.inkInverse; GhostButtonStyle border uses ink.opacity(0.25)
- Add AppTheme.inkInverse adaptive token (dark bg ink on dark, white on light)
- Add ConnectionStore.isSessionActive (non-persisted) and
  onboardingPhotoShown (UserDefaults-persisted)
- Add os_log logging in LoginViewModel at auth start/success/failure
- Remove dead Help button from ConnectView
- UGreenCompatibilityBadge, KeychainStore, SavedConnections, extensions,
  PrivacyInfo.xcprivacy, unit test target and test stubs
- AppTheme: full UIColor dynamic provider tokens for dark/light adaptive color
- AppearanceMode enum + segmented picker in SettingsView
- BackupView: enlarged ring, removed options card and linear progress bar
- HistoryView: duration and bytes formatting, improved typography hierarchy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-05-16 16:20:53 +03:00
parent 03d63e60de
commit ae38f6e417
38 changed files with 1649 additions and 451 deletions

View File

@@ -1,6 +1,6 @@
import SwiftUI
// MARK: Primary (black fill)
// MARK: Primary (ink fill)
struct PrimaryButtonStyle: ButtonStyle {
var color: Color = AppTheme.ink
var height: CGFloat = 50
@@ -8,7 +8,7 @@ struct PrimaryButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
.font(.system(size: 15, weight: .medium))
.foregroundColor(.white)
.foregroundStyle(AppTheme.inkInverse)
.frame(maxWidth: .infinity)
.frame(height: height)
.background(color)
@@ -25,12 +25,12 @@ struct GhostButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
.font(.system(size: 15, weight: .medium))
.foregroundColor(AppTheme.ink)
.foregroundStyle(AppTheme.ink)
.frame(maxWidth: .infinity)
.frame(height: height)
.overlay(
RoundedRectangle(cornerRadius: AppTheme.radius, style: .continuous)
.stroke(AppTheme.cardBorderColor, lineWidth: 1)
.stroke(AppTheme.ink.opacity(0.25), lineWidth: 1)
)
.scaleEffect(configuration.isPressed ? 0.97 : 1)
.animation(.spring(response: 0.25, dampingFraction: 0.7), value: configuration.isPressed)
@@ -52,7 +52,7 @@ struct PillButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
.font(.system(size: 13, weight: .medium))
.foregroundColor(.white)
.foregroundStyle(AppTheme.inkInverse)
.padding(.horizontal, 14)
.padding(.vertical, 7)
.background(color)

View File

@@ -29,6 +29,8 @@ struct ToggleRow: View {
Toggle("", isOn: $isOn)
.labelsHidden()
.tint(AppTheme.ink)
.accessibilityLabel(title)
.accessibilityValue(isOn ? "On" : "Off")
}
.padding(.horizontal, AppTheme.cardPad)
.padding(.vertical, 12)

View File

@@ -0,0 +1,46 @@
import SwiftUI
import UIKit
// Displays the UGreen NAS compatibility indicator.
// If you add an image named "ugreen_logo" to Assets.xcassets it will be used automatically.
// Otherwise a brand-styled text badge is shown.
struct UGreenCompatibilityBadge: View {
private static let ugreenGreen = Color(hex: "#00B388")
private let hasLogo = UIImage(named: "ugreen_logo") != nil
var body: some View {
HStack(spacing: 8) {
// UGreen logo or fallback wordmark
if hasLogo {
Image("ugreen_logo")
.resizable()
.scaledToFit()
.frame(height: 14)
} else {
HStack(spacing: 4) {
// Brand dot
Circle()
.fill(Self.ugreenGreen)
.frame(width: 6, height: 6)
Text("UGreen NAS")
.font(.system(size: 11, weight: .semibold))
.foregroundStyle(Self.ugreenGreen)
}
}
// Separator
Rectangle()
.fill(AppTheme.inkQuaternary)
.frame(width: 0.5, height: 11)
// Protocol hint
Text("SMB · SFTP")
.font(.system(size: 11, weight: .regular))
.foregroundStyle(AppTheme.inkTertiary)
}
.padding(.horizontal, 12)
.padding(.vertical, 6)
.background(AppTheme.surfaceSunken)
.clipShape(Capsule(style: .continuous))
}
}