Add TravelAlbum, ProfileSpace, and wired camera transfer modules.
Introduce travel album entry with Sony PTP tethering pipeline, profile space settings page, home routing updates, Launch Screen storyboard, and related tests/docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
23
suixinkan/Core/CameraTethering/Models/CameraAsset.swift
Normal file
23
suixinkan/Core/CameraTethering/Models/CameraAsset.swift
Normal file
@ -0,0 +1,23 @@
|
||||
import Foundation
|
||||
|
||||
struct CameraAsset: Identifiable, Equatable, Hashable {
|
||||
let id: String
|
||||
let filename: String
|
||||
let fileSize: Int64
|
||||
let creationDate: Date?
|
||||
let isMovie: Bool
|
||||
|
||||
init(
|
||||
id: String,
|
||||
filename: String,
|
||||
fileSize: Int64,
|
||||
creationDate: Date? = nil,
|
||||
isMovie: Bool = false
|
||||
) {
|
||||
self.id = id
|
||||
self.filename = filename
|
||||
self.fileSize = fileSize
|
||||
self.creationDate = creationDate
|
||||
self.isMovie = isMovie
|
||||
}
|
||||
}
|
||||
17
suixinkan/Core/CameraTethering/Models/CameraBrand.swift
Normal file
17
suixinkan/Core/CameraTethering/Models/CameraBrand.swift
Normal file
@ -0,0 +1,17 @@
|
||||
import Foundation
|
||||
|
||||
enum CameraBrand: String, CaseIterable, Identifiable {
|
||||
case sony
|
||||
case canon
|
||||
case nikon
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .sony: "Sony"
|
||||
case .canon: "Canon"
|
||||
case .nikon: "Nikon"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
import Foundation
|
||||
|
||||
enum CameraConnectionState: Equatable {
|
||||
case disconnected
|
||||
case searching
|
||||
case connecting
|
||||
case connected(deviceName: String)
|
||||
case error(String)
|
||||
|
||||
var displayText: String {
|
||||
switch self {
|
||||
case .disconnected:
|
||||
"未连接"
|
||||
case .searching:
|
||||
"正在搜索相机…"
|
||||
case .connecting:
|
||||
"正在连接…"
|
||||
case .connected(let name):
|
||||
"已连接:\(name)"
|
||||
case .error(let message):
|
||||
"错误:\(message)"
|
||||
}
|
||||
}
|
||||
|
||||
var isConnected: Bool {
|
||||
if case .connected = self { return true }
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user