Fix iCloud profile
This commit is contained in:
@@ -436,10 +436,10 @@ public struct ProfileCard: View {
|
|||||||
private func profileInfo(for profile: ProfilePreview) -> some View {
|
private func profileInfo(for profile: ProfilePreview) -> some View {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
Image(systemName: profile.type.presentationSymbol)
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
Text(profile.type == .remote ? "Remote" : "Local")
|
Text(profile.type.presentationLabel)
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundColor(.primary)
|
.foregroundColor(.primary)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1025,10 +1025,10 @@ private struct ProfilePickerRow: View {
|
|||||||
private var profileInfo: some View {
|
private var profileInfo: some View {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
Image(systemName: profile.type.presentationSymbol)
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
Text(profile.type == .remote ? "Remote" : "Local")
|
Text(profile.type.presentationLabel)
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
@@ -1110,10 +1110,10 @@ private struct ProfilePickerRow: View {
|
|||||||
|
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
Image(systemName: profile.type.presentationSymbol)
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
Text(profile.type == .remote ? "Remote" : "Local")
|
Text(profile.type.presentationLabel)
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
@@ -1414,10 +1414,10 @@ private struct ProfilePickerRow: View {
|
|||||||
private var profileInfo: some View {
|
private var profileInfo: some View {
|
||||||
HStack(spacing: 8) {
|
HStack(spacing: 8) {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Image(systemName: profile.type == .remote ? "cloud.fill" : "doc.fill")
|
Image(systemName: profile.type.presentationSymbol)
|
||||||
.font(.system(size: 12))
|
.font(.system(size: 12))
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
Text(profile.type == .remote ? "Remote" : "Local")
|
Text(profile.type.presentationLabel)
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.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">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<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>
|
<key>com.apple.developer.networking.networkextension</key>
|
||||||
<array>
|
<array>
|
||||||
<string>packet-tunnel-provider</string>
|
<string>packet-tunnel-provider</string>
|
||||||
@@ -18,10 +10,6 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.developer.networking.wifi-info</key>
|
<key>com.apple.developer.networking.wifi-info</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.developer.ubiquity-container-identifiers</key>
|
|
||||||
<array>
|
|
||||||
<string>iCloud.io.nekohasekai.sfavt</string>
|
|
||||||
</array>
|
|
||||||
<key>com.apple.security.app-sandbox</key>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<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">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<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>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user