- Rename app to Kisani (CFBundleDisplayName, xcodeproj → Kisani.xcodeproj) - BackupView: kisani. wordmark + SwiftUI-drawn server logo mark (no asset, adaptive ink/bg), 206pt progress ring with active-state glow, 4-page swipeable ring (progress/pending/failed/uploaded), 4-metric stats strip, friendly NAS card (Home Server label), hamburger → AppMenuView sheet - GalleryView: new NAS + local photo grid with source picker chip, 3-col lazy grid, ThumbnailCache, sync-status dots (green = backed up) - MainTabView: Browse tab → Gallery tab; tab bar uses ultraThinMaterial blur background (systemGray3 icons, 9.5pt labels) - All app icon sizes regenerated from 1024pt source via sips - LANMonitor: nasReachable Bool?, checkNASReachability(host:port:) TCP ping - project.yml: photo library usage description updated to Kisani branding Co-Authored-By: Kutesir <kutesir@provoc.ug> Co-Authored-By: Sentry <sentry@provoc.ug>
28 lines
820 B
Swift
28 lines
820 B
Swift
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()
|
|
func listShares() async throws -> [String]
|
|
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
|
|
func downloadData(at remotePath: String) async throws -> Data
|
|
}
|