Fix iCloud profile
This commit is contained in:
@@ -436,10 +436,10 @@ public struct ProfileCard: View {
|
||||
private func profileInfo(for profile: ProfilePreview) -> some View {
|
||||
HStack(spacing: 8) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
||||
Image(systemName: profile.type.presentationSymbol)
|
||||
.font(.system(size: 12))
|
||||
.foregroundColor(.secondary)
|
||||
Text(profile.type == .remote ? "Remote" : "Local")
|
||||
Text(profile.type.presentationLabel)
|
||||
.font(.caption)
|
||||
.foregroundColor(.primary)
|
||||
}
|
||||
|
||||
@@ -1025,10 +1025,10 @@ private struct ProfilePickerRow: View {
|
||||
private var profileInfo: some View {
|
||||
HStack(spacing: 8) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
||||
Image(systemName: profile.type.presentationSymbol)
|
||||
.font(.system(size: 12))
|
||||
.foregroundStyle(.secondary)
|
||||
Text(profile.type == .remote ? "Remote" : "Local")
|
||||
Text(profile.type.presentationLabel)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
@@ -1110,10 +1110,10 @@ private struct ProfilePickerRow: View {
|
||||
|
||||
HStack(spacing: 8) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
||||
Image(systemName: profile.type.presentationSymbol)
|
||||
.font(.system(size: 12))
|
||||
.foregroundStyle(.secondary)
|
||||
Text(profile.type == .remote ? "Remote" : "Local")
|
||||
Text(profile.type.presentationLabel)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
@@ -1414,10 +1414,10 @@ private struct ProfilePickerRow: View {
|
||||
private var profileInfo: some View {
|
||||
HStack(spacing: 8) {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
||||
Image(systemName: profile.type.presentationSymbol)
|
||||
.font(.system(size: 12))
|
||||
.foregroundStyle(.secondary)
|
||||
Text(profile.type == .remote ? "Remote" : "Local")
|
||||
Text(profile.type.presentationLabel)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import Library
|
||||
import SwiftUI
|
||||
|
||||
extension ProfileType {
|
||||
// UI presentation intentionally keeps iCloud distinct from Local/Remote export semantics.
|
||||
var presentationLabel: LocalizedStringKey {
|
||||
switch self {
|
||||
case .local:
|
||||
return "Local"
|
||||
case .icloud:
|
||||
return "iCloud"
|
||||
case .remote:
|
||||
return "Remote"
|
||||
}
|
||||
}
|
||||
|
||||
var presentationSymbol: String {
|
||||
switch self {
|
||||
case .local:
|
||||
return "doc.fill"
|
||||
case .icloud:
|
||||
return "icloud.fill"
|
||||
case .remote:
|
||||
return "cloud.fill"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user