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>
39 lines
1.3 KiB
Swift
39 lines
1.3 KiB
Swift
import SwiftUI
|
|
|
|
struct FolderRow: View {
|
|
let item: NASItem
|
|
let isSelected: Bool
|
|
let onTap: () -> Void
|
|
|
|
var body: some View {
|
|
Button(action: onTap) {
|
|
HStack(spacing: 12) {
|
|
Image(systemName: item.isDirectory ? "folder.fill" : "doc.fill")
|
|
.font(.system(size: 18))
|
|
.foregroundColor(isSelected ? .white : (item.isDirectory ? AppTheme.blue : AppTheme.textSecondary))
|
|
|
|
Text(item.name)
|
|
.font(AppTheme.bodyFont)
|
|
.fontWeight(isSelected ? .semibold : .regular)
|
|
.foregroundColor(isSelected ? .white : AppTheme.textPrimary)
|
|
|
|
Spacer()
|
|
|
|
if isSelected {
|
|
Image(systemName: "checkmark")
|
|
.font(.system(size: 13, weight: .bold))
|
|
.foregroundColor(.white)
|
|
} else if item.isDirectory {
|
|
Image(systemName: "chevron.right")
|
|
.font(.system(size: 13, weight: .medium))
|
|
.foregroundColor(AppTheme.textTertiary)
|
|
}
|
|
}
|
|
.padding(.horizontal, 16)
|
|
.padding(.vertical, 12)
|
|
.background(isSelected ? AppTheme.blue : Color.clear)
|
|
}
|
|
.buttonStyle(.plain)
|
|
}
|
|
}
|