iOS: About screen in Settings !361
4 files changed, +242 −0
Layout: unified · split
Sources/OrgstarMobile/AboutScreen.swift added +83
| @@ -0,0 +1,83 @@ | ||
| 1 | #if os(iOS) | |
| 2 | import SwiftUI | |
| 3 | import UIKit | |
| 4 | ||
| 5 | /// The version, and where to read the manual and source, report a problem or ask for help. | |
| 6 | struct AboutScreen: View { | |
| 7 | /// The app icon in use, as `AppIcons` names it. | |
| 8 | let appIcon: String | |
| 9 | ||
| 10 | static let supportEmail = "help@krz.sh" | |
| 11 | ||
| 12 | private static let repository = "https://gitbay.org/krz/orgstar" | |
| 13 | ||
| 14 | private var version: String { | |
| 15 | let info = Bundle.main.infoDictionary | |
| 16 | let short = info?["CFBundleShortVersionString"] as? String ?? "?" | |
| 17 | let build = info?["CFBundleVersion"] as? String ?? "?" | |
| 18 | return build == short ? short : "\(short) (\(build))" | |
| 19 | } | |
| 20 | ||
| 21 | var body: some View { | |
| 22 | Form { | |
| 23 | Section { | |
| 24 | VStack(spacing: 8) { | |
| 25 | // Builds without the asset catalog have no preview. | |
| 26 | if let icon = UIImage(named: "IconPreview-\(appIcon)") { | |
| 27 | Image(uiImage: icon) | |
| 28 | .resizable() | |
| 29 | .frame(width: 80, height: 80) | |
| 30 | .clipShape(RoundedRectangle(cornerRadius: 18, style: .continuous)) | |
| 31 | .accessibilityHidden(true) | |
| 32 | } | |
| 33 | Text("orgstar").font(.title2.bold()) | |
| 34 | Text("Version \(version)").font(.subheadline).foregroundStyle(.secondary).textSelection(.enabled) | |
| 35 | } | |
| 36 | .frame(maxWidth: .infinity) | |
| 37 | .listRowBackground(Color.clear) | |
| 38 | } | |
| 39 | Section { | |
| 40 | link("Manual", "book", "https://krz.gitbay.site/orgstar/") | |
| 41 | link("Release Notes", "sparkles", Self.repository + "/releases") | |
| 42 | link("Website", "globe", "https://krz.sh/apps/orgstar") | |
| 43 | } | |
| 44 | Section { | |
| 45 | link("Report an Issue", "ladybug", Self.repository + "/issues/new") | |
| 46 | link("Email Support", "envelope", mail.absoluteString) | |
| 47 | link("Rate on the App Store", "star", "https://apps.apple.com/app/id6821552018?action=write-review") | |
| 48 | } footer: { | |
| 49 | Text("Reporting an issue needs a gitbay account. Without one, email \(Self.supportEmail).") | |
| 50 | } | |
| 51 | Section { | |
| 52 | link("Source Code", "chevron.left.forwardslash.chevron.right", Self.repository) | |
| 53 | link("License", "doc.text", Self.repository + "/blob/main/LICENSE") | |
| 54 | link("Third-Party Notices", "doc.on.doc", Self.repository + "/blob/main/THIRD_PARTY.org") | |
| 55 | link("Privacy Policy", "hand.raised", "https://krz.sh/privacy/orgstar/") | |
| 56 | } footer: { | |
| 57 | Text("© 2026 Christian Cleberg. Free software under the 0BSD license.") | |
| 58 | } | |
| 59 | } | |
| 60 | .navigationTitle("About") | |
| 61 | .navigationBarTitleDisplayMode(.inline) | |
| 62 | } | |
| 63 | ||
| 64 | /// A message to support with the version and device filled in. | |
| 65 | private var mail: URL { | |
| 66 | let device = UIDevice.current | |
| 67 | var components = URLComponents() | |
| 68 | components.scheme = "mailto" | |
| 69 | components.path = Self.supportEmail | |
| 70 | components.queryItems = [ | |
| 71 | URLQueryItem(name: "subject", value: "orgstar \(version)"), | |
| 72 | URLQueryItem(name: "body", value: "\n\n—\norgstar \(version), \(device.systemName) \(device.systemVersion), \(device.model)"), | |
| 73 | ] | |
| 74 | return components.url! | |
| 75 | } | |
| 76 | ||
| 77 | private func link(_ title: LocalizedStringKey, _ systemImage: String, _ url: String) -> some View { | |
| 78 | Link(destination: URL(string: url)!) { | |
| 79 | Label(title, systemImage: systemImage) | |
| 80 | } | |
| 81 | } | |
| 82 | } | |
| 83 | #endif | |
Sources/OrgstarMobile/SettingsScreen.swift +7
| @@ -126,6 +126,13 @@ struct SettingsScreen: View { | ||
| 126 | 126 | LabeledContent("Theme", value: themeInUse) |
| 127 | 127 | LabeledContent("Font", value: font) |
| 128 | 128 | } |
| 129 | Section { | |
| 130 | NavigationLink { | |
| 131 | AboutScreen(appIcon: appIcon) | |
| 132 | } label: { | |
| 133 | Label("About orgstar", systemImage: "info.circle") | |
| 134 | } | |
| 135 | } | |
| 129 | 136 | } |
| 130 | 137 | .navigationTitle("Settings") |
| 131 | 138 | // Read again on return from the Settings app. |
docs/manual/guide/14-ios.org +2
| @@ -401,6 +401,8 @@ These write =config.toml= in the configuration folder, as the Mac's Settings win | ||
| 401 | 401 | |
| 402 | 402 | The In use section shows the TODO keywords, the agenda span and start (for example =10 days, starting today=), the reminder lead time, the capture template keys, the light and dark themes, and the theme file's name when there is one, and the font with its size. When =font= names a family that isn't installed on the device, Font shows the system's font with a note, as =System monospaced, 13 pt (JetBrains Mono isn't installed)=. |
| 403 | 403 | |
| 404 | About orgstar, at the bottom, shows the version and links to the manual, the release notes, the website, the issue tracker (which needs a gitbay account), support by email at =help@krz.sh= with the version and device filled in, the App Store review page, the source code, the license, third-party notices and the privacy policy. | |
| 405 | ||
| 404 | 406 | These settings from =config.toml= apply on iOS: |
| 405 | 407 | |
| 406 | 408 | - =org-todo-keywords=, =org-list-allow-alphabetical= |
l10n/Localizable.xcstrings +150
| @@ -252,6 +252,26 @@ | ||
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | }, |
| 255 | "About": { | |
| 256 | "localizations": { | |
| 257 | "de": { | |
| 258 | "stringUnit": { | |
| 259 | "state": "translated", | |
| 260 | "value": "Über" | |
| 261 | } | |
| 262 | } | |
| 263 | } | |
| 264 | }, | |
| 265 | "About orgstar": { | |
| 266 | "localizations": { | |
| 267 | "de": { | |
| 268 | "stringUnit": { | |
| 269 | "state": "translated", | |
| 270 | "value": "Über orgstar" | |
| 271 | } | |
| 272 | } | |
| 273 | } | |
| 274 | }, | |
| 255 | 275 | "Absolute": { |
| 256 | 276 | "localizations": { |
| 257 | 277 | "de": { |
| @@ -2129,6 +2149,16 @@ | ||
| 2129 | 2149 | } |
| 2130 | 2150 | } |
| 2131 | 2151 | }, |
| 2152 | "Email Support": { | |
| 2153 | "localizations": { | |
| 2154 | "de": { | |
| 2155 | "stringUnit": { | |
| 2156 | "state": "translated", | |
| 2157 | "value": "Support per E-Mail" | |
| 2158 | } | |
| 2159 | } | |
| 2160 | } | |
| 2161 | }, | |
| 2132 | 2162 | "Empty takes the default.": { |
| 2133 | 2163 | "localizations": { |
| 2134 | 2164 | "de": { |
| @@ -2950,6 +2980,16 @@ | ||
| 2950 | 2980 | } |
| 2951 | 2981 | } |
| 2952 | 2982 | }, |
| 2983 | "License": { | |
| 2984 | "localizations": { | |
| 2985 | "de": { | |
| 2986 | "stringUnit": { | |
| 2987 | "state": "translated", | |
| 2988 | "value": "Lizenz" | |
| 2989 | } | |
| 2990 | } | |
| 2991 | } | |
| 2992 | }, | |
| 2953 | 2993 | "Light": { |
| 2954 | 2994 | "localizations": { |
| 2955 | 2995 | "de": { |
| @@ -3156,6 +3196,16 @@ | ||
| 3156 | 3196 | } |
| 3157 | 3197 | } |
| 3158 | 3198 | }, |
| 3199 | "Manual": { | |
| 3200 | "localizations": { | |
| 3201 | "de": { | |
| 3202 | "stringUnit": { | |
| 3203 | "state": "translated", | |
| 3204 | "value": "Handbuch" | |
| 3205 | } | |
| 3206 | } | |
| 3207 | } | |
| 3208 | }, | |
| 3159 | 3209 | "Margins: %lld pt": { |
| 3160 | 3210 | "localizations": { |
| 3161 | 3211 | "de": { |
| @@ -4299,6 +4349,16 @@ | ||
| 4299 | 4349 | } |
| 4300 | 4350 | } |
| 4301 | 4351 | }, |
| 4352 | "Privacy Policy": { | |
| 4353 | "localizations": { | |
| 4354 | "de": { | |
| 4355 | "stringUnit": { | |
| 4356 | "state": "translated", | |
| 4357 | "value": "Datenschutzerklärung" | |
| 4358 | } | |
| 4359 | } | |
| 4360 | } | |
| 4361 | }, | |
| 4302 | 4362 | "Property columns": { |
| 4303 | 4363 | "localizations": { |
| 4304 | 4364 | "de": { |
| @@ -4349,6 +4409,16 @@ | ||
| 4349 | 4409 | } |
| 4350 | 4410 | } |
| 4351 | 4411 | }, |
| 4412 | "Rate on the App Store": { | |
| 4413 | "localizations": { | |
| 4414 | "de": { | |
| 4415 | "stringUnit": { | |
| 4416 | "state": "translated", | |
| 4417 | "value": "Im App Store bewerten" | |
| 4418 | } | |
| 4419 | } | |
| 4420 | } | |
| 4421 | }, | |
| 4352 | 4422 | "Read-only: not UTF-8": { |
| 4353 | 4423 | "localizations": { |
| 4354 | 4424 | "de": { |
| @@ -4459,6 +4529,16 @@ | ||
| 4459 | 4529 | } |
| 4460 | 4530 | } |
| 4461 | 4531 | }, |
| 4532 | "Release Notes": { | |
| 4533 | "localizations": { | |
| 4534 | "de": { | |
| 4535 | "stringUnit": { | |
| 4536 | "state": "translated", | |
| 4537 | "value": "Versionshinweise" | |
| 4538 | } | |
| 4539 | } | |
| 4540 | } | |
| 4541 | }, | |
| 4462 | 4542 | "Remember %lld recently clocked entries": { |
| 4463 | 4543 | "localizations": { |
| 4464 | 4544 | "de": { |
| @@ -4619,6 +4699,26 @@ | ||
| 4619 | 4699 | } |
| 4620 | 4700 | } |
| 4621 | 4701 | }, |
| 4702 | "Report an Issue": { | |
| 4703 | "localizations": { | |
| 4704 | "de": { | |
| 4705 | "stringUnit": { | |
| 4706 | "state": "translated", | |
| 4707 | "value": "Problem melden" | |
| 4708 | } | |
| 4709 | } | |
| 4710 | } | |
| 4711 | }, | |
| 4712 | "Reporting an issue needs a gitbay account. Without one, email %@.": { | |
| 4713 | "localizations": { | |
| 4714 | "de": { | |
| 4715 | "stringUnit": { | |
| 4716 | "state": "translated", | |
| 4717 | "value": "Zum Melden eines Problems brauchst du ein gitbay-Konto. Ohne eins schreib an %@." | |
| 4718 | } | |
| 4719 | } | |
| 4720 | } | |
| 4721 | }, | |
| 4622 | 4722 | "Reschedule": { |
| 4623 | 4723 | "localizations": { |
| 4624 | 4724 | "de": { |
| @@ -5289,6 +5389,16 @@ | ||
| 5289 | 5389 | } |
| 5290 | 5390 | } |
| 5291 | 5391 | }, |
| 5392 | "Source Code": { | |
| 5393 | "localizations": { | |
| 5394 | "de": { | |
| 5395 | "stringUnit": { | |
| 5396 | "state": "translated", | |
| 5397 | "value": "Quellcode" | |
| 5398 | } | |
| 5399 | } | |
| 5400 | } | |
| 5401 | }, | |
| 5292 | 5402 | "Span": { |
| 5293 | 5403 | "localizations": { |
| 5294 | 5404 | "de": { |
| @@ -5859,6 +5969,16 @@ | ||
| 5859 | 5969 | } |
| 5860 | 5970 | } |
| 5861 | 5971 | }, |
| 5972 | "Third-Party Notices": { | |
| 5973 | "localizations": { | |
| 5974 | "de": { | |
| 5975 | "stringUnit": { | |
| 5976 | "state": "translated", | |
| 5977 | "value": "Hinweise zu Drittanbietern" | |
| 5978 | } | |
| 5979 | } | |
| 5980 | } | |
| 5981 | }, | |
| 5862 | 5982 | "Time": { |
| 5863 | 5983 | "localizations": { |
| 5864 | 5984 | "de": { |
| @@ -6112,6 +6232,16 @@ | ||
| 6112 | 6232 | } |
| 6113 | 6233 | } |
| 6114 | 6234 | }, |
| 6235 | "Version %@": { | |
| 6236 | "localizations": { | |
| 6237 | "de": { | |
| 6238 | "stringUnit": { | |
| 6239 | "state": "translated", | |
| 6240 | "value": "Version %@" | |
| 6241 | } | |
| 6242 | } | |
| 6243 | } | |
| 6244 | }, | |
| 6115 | 6245 | "View": { |
| 6116 | 6246 | "localizations": { |
| 6117 | 6247 | "de": { |
| @@ -6142,6 +6272,16 @@ | ||
| 6142 | 6272 | } |
| 6143 | 6273 | } |
| 6144 | 6274 | }, |
| 6275 | "Website": { | |
| 6276 | "localizations": { | |
| 6277 | "de": { | |
| 6278 | "stringUnit": { | |
| 6279 | "state": "translated", | |
| 6280 | "value": "Website" | |
| 6281 | } | |
| 6282 | } | |
| 6283 | } | |
| 6284 | }, | |
| 6145 | 6285 | "Week": { |
| 6146 | 6286 | "localizations": { |
| 6147 | 6287 | "de": { |
| @@ -6438,6 +6578,16 @@ | ||
| 6438 | 6578 | "y": { |
| 6439 | 6579 | "shouldTranslate": false |
| 6440 | 6580 | }, |
| 6581 | "© 2026 Christian Cleberg. Free software under the 0BSD license.": { | |
| 6582 | "localizations": { | |
| 6583 | "de": { | |
| 6584 | "stringUnit": { | |
| 6585 | "state": "translated", | |
| 6586 | "value": "© 2026 Christian Cleberg. Freie Software unter der 0BSD-Lizenz." | |
| 6587 | } | |
| 6588 | } | |
| 6589 | } | |
| 6590 | }, | |
| 6441 | 6591 | "·": { |
| 6442 | 6592 | "shouldTranslate": false |
| 6443 | 6593 | }, |