fix: SMB share enumeration, BrowseView polish, sign out, Login branding
- Fix "Bad Network Name": BrowseView at root "/" for SMB now calls listShares() instead of listDirectory with empty share name. SMBClient.listShares() filters IPC/admin/hidden ($) shares. - Add listShares() to NASTransferProtocol; implement in SMB (filters ipc/special/$-suffix) and SFTP (returns []). - BrowseView: premium error state (wifi.exclamationmark icon + Retry button with ScaleButtonStyle), empty state, safeAreaInset bottom bar replacing toolbar bottomBar (shows current path chip + compact Select button), proper disabled state for root selection on SMB. - FolderRow: replace hardcoded .white with AppTheme.inkInverse for dark mode correctness; use folder.fill icon; ScaleButtonStyle for tap feedback. - LoginView: larger logo (80pt), bolder "Kisani" wordmark (32pt bold), tagline, staggered spring entrance animations (0.08-0.36s delay). - SettingsView: Sign Out button in ACCOUNT section with confirmationDialog (destructive, clears connection + resets session). - ConnectionStore: signOut() resets isSessionActive, onboardingPhotoShown, and clears savedConnection (triggers Keychain delete). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,14 +8,14 @@ struct FolderRow: View {
|
||||
var body: some View {
|
||||
Button(action: onTap) {
|
||||
HStack(spacing: 12) {
|
||||
Image(systemName: item.isDirectory ? "folder" : "doc")
|
||||
.font(.system(size: 15, weight: .regular))
|
||||
.foregroundStyle(isSelected ? .white : AppTheme.inkSecondary)
|
||||
Image(systemName: item.isDirectory ? "folder.fill" : "doc")
|
||||
.font(.system(size: 14, weight: .regular))
|
||||
.foregroundStyle(isSelected ? AppTheme.inkInverse : AppTheme.inkSecondary)
|
||||
.frame(width: 22)
|
||||
|
||||
Text(item.name)
|
||||
.font(.system(size: 15, weight: isSelected ? .medium : .regular))
|
||||
.foregroundStyle(isSelected ? .white : AppTheme.ink)
|
||||
.foregroundStyle(isSelected ? AppTheme.inkInverse : AppTheme.ink)
|
||||
.lineLimit(1)
|
||||
|
||||
Spacer()
|
||||
@@ -23,7 +23,7 @@ struct FolderRow: View {
|
||||
if isSelected {
|
||||
Image(systemName: "checkmark")
|
||||
.font(.system(size: 12, weight: .semibold))
|
||||
.foregroundStyle(.white)
|
||||
.foregroundStyle(AppTheme.inkInverse)
|
||||
} else if item.isDirectory {
|
||||
Image(systemName: "chevron.right")
|
||||
.font(.system(size: 12, weight: .medium))
|
||||
@@ -39,6 +39,6 @@ struct FolderRow: View {
|
||||
)
|
||||
.animation(.spring(response: 0.2, dampingFraction: 0.8), value: isSelected)
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.buttonStyle(ScaleButtonStyle())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,12 @@ final class ConnectionStore: ObservableObject {
|
||||
UserDefaults.standard.removeObject(forKey: "historyEntries")
|
||||
}
|
||||
|
||||
func signOut() {
|
||||
isSessionActive = false
|
||||
onboardingPhotoShown = false
|
||||
savedConnection = nil
|
||||
}
|
||||
|
||||
var isInQuietHours: Bool {
|
||||
guard quietHoursEnabled else { return false }
|
||||
let hour = Calendar.current.component(.hour, from: Date())
|
||||
|
||||
Reference in New Issue
Block a user