diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index 7cb6730b..c4041dcc 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -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" : { "comment" : "Description when no network shares are found", "localizations" : { diff --git a/Yattee/Views/Settings/SettingsView.swift b/Yattee/Views/Settings/SettingsView.swift index a8d66d46..836b792b 100644 --- a/Yattee/Views/Settings/SettingsView.swift +++ b/Yattee/Views/Settings/SettingsView.swift @@ -110,7 +110,18 @@ struct SettingsView: View { NavigationLink { iCloudSettingsView() } 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 { diff --git a/Yattee/Views/Settings/iCloudSettingsView.swift b/Yattee/Views/Settings/iCloudSettingsView.swift index 7d31a83a..65c2bebc 100644 --- a/Yattee/Views/Settings/iCloudSettingsView.swift +++ b/Yattee/Views/Settings/iCloudSettingsView.swift @@ -50,6 +50,16 @@ struct iCloudSettingsView: View { var body: some View { 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 { Toggle(isOn: Binding( get: { settingsManager?.iCloudSyncEnabled ?? false },