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:
@@ -32,6 +32,18 @@ final class SMBService: NASTransferProtocol {
|
||||
isConnected = false
|
||||
}
|
||||
|
||||
func listShares() async throws -> [String] {
|
||||
guard let client else { throw BackupError.connectionFailed("Not connected") }
|
||||
let shares = try await client.listShares()
|
||||
return shares
|
||||
.filter { share in
|
||||
!share.name.hasSuffix("$") &&
|
||||
!share.type.contains(.ipc) &&
|
||||
!share.type.contains(.special)
|
||||
}
|
||||
.map { $0.name }
|
||||
}
|
||||
|
||||
func listDirectory(at path: String) async throws -> [NASItem] {
|
||||
guard let client else { throw BackupError.connectionFailed("Not connected") }
|
||||
let (share, rel) = splitPath(path)
|
||||
|
||||
Reference in New Issue
Block a user