diff --git a/nahbar/nahbar/AddMomentView.swift b/nahbar/nahbar/AddMomentView.swift index ea1a17d..90bef80 100644 --- a/nahbar/nahbar/AddMomentView.swift +++ b/nahbar/nahbar/AddMomentView.swift @@ -542,9 +542,7 @@ struct AddMomentView: View { Text("Gesprächsthemen vorschlagen") .font(.system(size: 14, weight: .medium)) Spacer() - if store.isMax { - MaxBadge() - } else if canUseAI { + if !store.isMax && canUseAI { Text("\(AIAnalysisService.shared.freeQueriesRemaining) gratis") .font(.system(size: 10, weight: .bold)) .foregroundStyle(theme.contentTertiary) diff --git a/nahbar/nahbar/IchView.swift b/nahbar/nahbar/IchView.swift index bf1783c..776e81f 100644 --- a/nahbar/nahbar/IchView.swift +++ b/nahbar/nahbar/IchView.swift @@ -169,14 +169,10 @@ struct IchView: View { private var infoSection: some View { VStack(alignment: .leading, spacing: 10) { // Über mich - let hasUeberMich = !profileStore.gender.isEmpty || !profileStore.location.isEmpty || !profileStore.socialStyle.isEmpty + let hasUeberMich = !profileStore.location.isEmpty || !profileStore.socialStyle.isEmpty if hasUeberMich { SectionHeader(title: "Über mich", icon: "person") VStack(spacing: 0) { - if !profileStore.gender.isEmpty { - infoRow(label: "Geschlecht", value: profileStore.gender) - if !profileStore.location.isEmpty || !profileStore.socialStyle.isEmpty { RowDivider() } - } if !profileStore.location.isEmpty { infoRow(label: "Wohnort", value: profileStore.location) if !profileStore.socialStyle.isEmpty { RowDivider() } @@ -288,6 +284,7 @@ struct IchEditView: View { @State private var name: String @State private var hasBirthday: Bool @State private var birthday: Date + @State private var gender: String @State private var occupation: String @State private var location: String @@ -508,9 +505,11 @@ struct IchEditView: View { return name.isEmpty ? "?" : String(name.prefix(2)).uppercased() } + + // MARK: - Gender Picker - private let genderOptions = ["Männlich", "Weiblich", "Divers", "Keine Angabe"] + private let genderOptions = ["Männlich", "Weiblich", "Divers"] private var genderPickerRow: some View { HStack(spacing: 12) { diff --git a/nahbar/nahbar/PersonDetailView.swift b/nahbar/nahbar/PersonDetailView.swift index 213cd0b..be640c1 100644 --- a/nahbar/nahbar/PersonDetailView.swift +++ b/nahbar/nahbar/PersonDetailView.swift @@ -237,9 +237,7 @@ struct PersonDetailView: View { Image(systemName: "sparkles") .font(.system(size: 18)) .foregroundStyle(theme.accent) - if !storeManager.isMax { - MaxBadge() - } + MaxBadge() } } .padding(.top, 4) diff --git a/nahbar/nahbar/SharedComponents.swift b/nahbar/nahbar/SharedComponents.swift index 468c4bf..c4bc48b 100644 --- a/nahbar/nahbar/SharedComponents.swift +++ b/nahbar/nahbar/SharedComponents.swift @@ -258,19 +258,41 @@ struct TagBadge: View { } } +// MARK: - Pro Badge + +struct ProBadge: View { + @Environment(\.nahbarTheme) var theme + @StateObject private var store = StoreManager.shared + + var body: some View { + if !store.isPro { + Text("PRO") + .font(.system(size: 10, weight: .bold)) + .foregroundStyle(theme.accent) + .padding(.horizontal, 7) + .padding(.vertical, 3) + .background(theme.accent.opacity(0.10)) + .clipShape(Capsule()) + } + } +} + // MARK: - Max Badge struct MaxBadge: View { @Environment(\.nahbarTheme) var theme + @StateObject private var store = StoreManager.shared var body: some View { - Text("MAX") - .font(.system(size: 10, weight: .bold)) - .foregroundStyle(theme.accent) - .padding(.horizontal, 7) - .padding(.vertical, 3) - .background(theme.accent.opacity(0.10)) - .clipShape(Capsule()) + if !store.isMax { + Text("MAX") + .font(.system(size: 10, weight: .bold)) + .foregroundStyle(theme.accent) + .padding(.horizontal, 7) + .padding(.vertical, 3) + .background(theme.accent.opacity(0.10)) + .clipShape(Capsule()) + } } } diff --git a/nahbar/nahbar/ThemePickerView.swift b/nahbar/nahbar/ThemePickerView.swift index 87b4a52..53da8df 100644 --- a/nahbar/nahbar/ThemePickerView.swift +++ b/nahbar/nahbar/ThemePickerView.swift @@ -132,13 +132,7 @@ struct ThemePickerView: View { Spacer() if id.isPremium && !isActive { - Text("PRO") - .font(.system(size: 10, weight: .bold)) - .foregroundStyle(theme.accent) - .padding(.horizontal, 7) - .padding(.vertical, 3) - .background(theme.accent.opacity(0.10)) - .clipShape(Capsule()) + ProBadge() } if isActive { diff --git a/nahbar/nahbar/TodayView.swift b/nahbar/nahbar/TodayView.swift index 1dfdaff..8573474 100644 --- a/nahbar/nahbar/TodayView.swift +++ b/nahbar/nahbar/TodayView.swift @@ -524,9 +524,7 @@ struct GiftSuggestionRow: View { Text("Geschenkidee vorschlagen") .font(.system(size: 13)) Spacer() - if store.isMax { - MaxBadge() - } else if canUseAI { + if !store.isMax && canUseAI { Text("\(AIAnalysisService.shared.freeQueriesRemaining) gratis") .font(.system(size: 10, weight: .bold)) .foregroundStyle(theme.contentTertiary)