mirror of
https://github.com/yattee/yattee.git
synced 2026-02-19 09:19:46 +00:00
Add DEV badge on iCloud settings for debug builds
Shows an orange "DEV" capsule next to the iCloud row in Settings and a development environment notice at the top of iCloud settings, helping distinguish CloudKit dev environment from production during development.
This commit is contained in:
@@ -1810,6 +1810,36 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"settings.icloud.dev.badge" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "DEV"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings.icloud.dev.footer" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Using CloudKit development environment. Data is separate from production."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"settings.icloud.dev.title" : {
|
||||||
|
"localizations" : {
|
||||||
|
"en" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "Development Environment"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"discovery.empty.description" : {
|
"discovery.empty.description" : {
|
||||||
"comment" : "Description when no network shares are found",
|
"comment" : "Description when no network shares are found",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|||||||
@@ -110,7 +110,18 @@ struct SettingsView: View {
|
|||||||
NavigationLink {
|
NavigationLink {
|
||||||
iCloudSettingsView()
|
iCloudSettingsView()
|
||||||
} label: {
|
} label: {
|
||||||
Label(String(localized: "settings.icloud.title"), systemImage: "icloud")
|
HStack {
|
||||||
|
Label(String(localized: "settings.icloud.title"), systemImage: "icloud")
|
||||||
|
#if DEBUG
|
||||||
|
Spacer()
|
||||||
|
Text(String(localized: "settings.icloud.dev.badge"))
|
||||||
|
.font(.caption2.bold())
|
||||||
|
.foregroundStyle(.white)
|
||||||
|
.padding(.horizontal, 6)
|
||||||
|
.padding(.vertical, 2)
|
||||||
|
.background(.orange, in: Capsule())
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigationLink {
|
NavigationLink {
|
||||||
|
|||||||
@@ -50,6 +50,16 @@ struct iCloudSettingsView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
List {
|
List {
|
||||||
|
#if DEBUG
|
||||||
|
Section {
|
||||||
|
Label(String(localized: "settings.icloud.dev.title"), systemImage: "hammer.fill")
|
||||||
|
.foregroundStyle(.orange)
|
||||||
|
.font(.subheadline)
|
||||||
|
} footer: {
|
||||||
|
Text(String(localized: "settings.icloud.dev.footer"))
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
Toggle(isOn: Binding(
|
Toggle(isOn: Binding(
|
||||||
get: { settingsManager?.iCloudSyncEnabled ?? false },
|
get: { settingsManager?.iCloudSyncEnabled ?? false },
|
||||||
|
|||||||
Reference in New Issue
Block a user