feat: logo fix, session hierarchy, Switch User, lock vs signOut

Asset fix:
- nas_logo_clean.imageset/Contents.json now registers the 512px PNG at
  all three scales (1x/2x/3x) so iOS uses it on every device type.
  Previously only 1x was wired causing the image to be missing on Retina.
- Logo rendered with thin AppTheme.inkQuaternary ring overlay so its
  dark-background edge stays legible against any app background color.

LoginView overhaul:
- New hierarchy: Kisani title → 90pt logo → NAS displayName → username
- Staggered spring entrance (0.06–0.32s delays, asymmetric ease)
- "Switch User" replaces "More options" — calls store.signOut() to
  clear connection/session/onboarding and return to ConnectView.
- MoreOptionsSheet removed (no longer needed).

ConnectionStore:
- Added lock() — ends session but preserves saved connection (returns to
  LoginView for Face ID re-auth without losing NAS credentials).
- signOut() now clearly documented as clearing everything.
- Removed duplicate sectionLabel() from SettingsView (canonical version
  lives in LANTriggerSection.swift as a top-level free function).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-05-16 16:59:23 +03:00
parent 19d14e58fb
commit e1e851360b
4 changed files with 77 additions and 113 deletions

View File

@@ -104,6 +104,12 @@ final class ConnectionStore: ObservableObject {
UserDefaults.standard.removeObject(forKey: "historyEntries")
}
/// Locks the screen keeps the saved connection but requires Face ID again.
func lock() {
isSessionActive = false
}
/// Clears everything: connection, session, and onboarding state. Returns to ConnectView.
func signOut() {
isSessionActive = false
onboardingPhotoShown = false