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"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,14 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.icloud-container-identifiers</key>
|
||||
<array>
|
||||
<string>iCloud.io.nekohasekai.sfavt</string>
|
||||
</array>
|
||||
<key>com.apple.developer.icloud-services</key>
|
||||
<array>
|
||||
<string>CloudDocuments</string>
|
||||
</array>
|
||||
<key>com.apple.developer.networking.networkextension</key>
|
||||
<array>
|
||||
<string>packet-tunnel-provider</string>
|
||||
@@ -18,10 +10,6 @@
|
||||
<true/>
|
||||
<key>com.apple.developer.networking.wifi-info</key>
|
||||
<true/>
|
||||
<key>com.apple.developer.ubiquity-container-identifiers</key>
|
||||
<array>
|
||||
<string>iCloud.io.nekohasekai.sfavt</string>
|
||||
</array>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.icloud-container-identifiers</key>
|
||||
<array>
|
||||
<string>iCloud.io.nekohasekai.sfavt</string>
|
||||
</array>
|
||||
<key>com.apple.developer.icloud-services</key>
|
||||
<array>
|
||||
<string>CloudDocuments</string>
|
||||
</array>
|
||||
<key>com.apple.developer.ubiquity-container-identifiers</key>
|
||||
<array>
|
||||
<string>iCloud.io.nekohasekai.sfavt</string>
|
||||
</array>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
|
||||
Reference in New Issue
Block a user