Initial scaffold — NASBackup iOS app
Full project scaffold: XcodeGen project.yml, Core models/protocols/errors,
SMBService (kishikawakatsumi/SMBClient), SFTPService (Citadel 0.9.2),
PhotoLibraryService, LANMonitor, BackupEngine, BackgroundTaskManager,
all feature UIs (Login, Connect, Browse, Backup, History, Settings),
Shared components and theme. Builds clean with zero errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 17:05:04 +03:00
|
|
|
import Foundation
|
|
|
|
|
|
|
|
|
|
struct NASItem: Identifiable {
|
|
|
|
|
let id = UUID()
|
|
|
|
|
let name: String
|
|
|
|
|
let path: String
|
|
|
|
|
let isDirectory: Bool
|
|
|
|
|
let size: Int64
|
|
|
|
|
let modifiedDate: Date?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protocol NASTransferProtocol: AnyObject {
|
|
|
|
|
var isConnected: Bool { get }
|
|
|
|
|
|
|
|
|
|
func connect(to host: String, port: Int, username: String, password: String) async throws
|
|
|
|
|
func disconnect()
|
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>
2026-05-16 16:41:16 +03:00
|
|
|
func listShares() async throws -> [String]
|
Initial scaffold — NASBackup iOS app
Full project scaffold: XcodeGen project.yml, Core models/protocols/errors,
SMBService (kishikawakatsumi/SMBClient), SFTPService (Citadel 0.9.2),
PhotoLibraryService, LANMonitor, BackupEngine, BackgroundTaskManager,
all feature UIs (Login, Connect, Browse, Backup, History, Settings),
Shared components and theme. Builds clean with zero errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 17:05:04 +03:00
|
|
|
func listDirectory(at path: String) async throws -> [NASItem]
|
|
|
|
|
func createDirectory(at path: String) async throws
|
|
|
|
|
func fileExists(at remotePath: String) async throws -> Bool
|
|
|
|
|
func upload(
|
|
|
|
|
localURL: URL,
|
|
|
|
|
remotePath: String,
|
|
|
|
|
progress: @escaping (Int64, Int64) -> Void
|
|
|
|
|
) async throws
|
|
|
|
|
}
|