Settings/widget: drop decorative emoji; show real bundle version
- Remove 🎉 from the My Tasks widget empty state. - Remove 𝕏 👾 📸 from Settings → Follow Us row. - About row and About sheet now read the version from the bundle (new Bundle.marketingVersion / buildNumber / versionDisplay helpers) instead of a hardcoded "v1.0.0", so it always tracks the real build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
|
extension Bundle {
|
||||||
|
/// Public marketing version, e.g. "2.0".
|
||||||
|
var marketingVersion: String { infoDictionary?["CFBundleShortVersionString"] as? String ?? "—" }
|
||||||
|
/// Build number, e.g. "9".
|
||||||
|
var buildNumber: String { infoDictionary?["CFBundleVersion"] as? String ?? "" }
|
||||||
|
/// Combined display, e.g. "2.0 (9)" — single source of truth for any UI showing the version.
|
||||||
|
var versionDisplay: String { buildNumber.isEmpty ? marketingVersion : "\(marketingVersion) (\(buildNumber))" }
|
||||||
|
}
|
||||||
|
|
||||||
struct SettingsView: View {
|
struct SettingsView: View {
|
||||||
@Environment(\.colorScheme) var cs
|
@Environment(\.colorScheme) var cs
|
||||||
@EnvironmentObject var workoutVM: WorkoutViewModel
|
@EnvironmentObject var workoutVM: WorkoutViewModel
|
||||||
@@ -158,8 +167,8 @@ struct SettingsView: View {
|
|||||||
// ── SUPPORT ──
|
// ── SUPPORT ──
|
||||||
SttSection(label: "Support", secondary: true) {
|
SttSection(label: "Support", secondary: true) {
|
||||||
SttNavRow(icon: "star", bg: AppColors.yellowSoft, fg: AppColors.yellow, label: "Help & Feedback") { showHelp = true }
|
SttNavRow(icon: "star", bg: AppColors.yellowSoft, fg: AppColors.yellow, label: "Help & Feedback") { showHelp = true }
|
||||||
SttNavRow(icon: "message", bg: AppColors.blueSoft, fg: AppColors.blue, label: "Follow Us", value: "𝕏 👾 📸") { showFollow = true }
|
SttNavRow(icon: "message", bg: AppColors.blueSoft, fg: AppColors.blue, label: "Follow Us") { showFollow = true }
|
||||||
SttNavRow(icon: "info.circle", bg: AppColors.surface3(cs), label: "About", value: "v1.0.0", isLast: true) { showAbout = true }
|
SttNavRow(icon: "info.circle", bg: AppColors.surface3(cs), label: "About", value: "v\(Bundle.main.marketingVersion)", isLast: true) { showAbout = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer().frame(height: 40)
|
Spacer().frame(height: 40)
|
||||||
@@ -1351,7 +1360,7 @@ private struct AboutSheet: View {
|
|||||||
.font(.system(size: 48, weight: .light)).foregroundColor(AppColors.accent)
|
.font(.system(size: 48, weight: .light)).foregroundColor(AppColors.accent)
|
||||||
VStack(spacing: 4) {
|
VStack(spacing: 4) {
|
||||||
Text("Wenza").font(AppFonts.sans(20, weight: .bold)).foregroundColor(AppColors.text(cs))
|
Text("Wenza").font(AppFonts.sans(20, weight: .bold)).foregroundColor(AppColors.text(cs))
|
||||||
Text("Version 1.0.0").font(AppFonts.mono(11)).foregroundColor(AppColors.text3(cs))
|
Text("Version \(Bundle.main.versionDisplay)").font(AppFonts.mono(11)).foregroundColor(AppColors.text3(cs))
|
||||||
}
|
}
|
||||||
Text("A calm, focused productivity app for tasks, calendar, and fitness.")
|
Text("A calm, focused productivity app for tasks, calendar, and fitness.")
|
||||||
.font(AppFonts.sans(13)).foregroundColor(AppColors.text2(cs))
|
.font(AppFonts.sans(13)).foregroundColor(AppColors.text2(cs))
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ struct MyTasksView: View {
|
|||||||
|
|
||||||
if entry.tasks.isEmpty {
|
if entry.tasks.isEmpty {
|
||||||
Spacer()
|
Spacer()
|
||||||
Text("All clear for today 🎉")
|
Text("All clear for today")
|
||||||
.font(.system(.caption, design: .monospaced))
|
.font(.system(.caption, design: .monospaced))
|
||||||
.foregroundColor(Color(white: 0.5))
|
.foregroundColor(Color(white: 0.5))
|
||||||
.frame(maxWidth: .infinity, alignment: .center)
|
.frame(maxWidth: .infinity, alignment: .center)
|
||||||
|
|||||||
Reference in New Issue
Block a user