From d0e5984dde42da9f82f0d584426a02d235000e95 Mon Sep 17 00:00:00 2001 From: DenAlNik Date: Tue, 21 May 2024 14:11:08 +0300 Subject: [PATCH] final fixes --- LiveRecipes/Localizable.xcstrings | 3 +++ .../AnimatedElements/BlinkingText + TimerView.swift | 2 +- .../AnimatedElements/IngredientRunningTextView.swift | 2 +- .../Cooking/Components/OneStep/OneStepView.swift | 2 +- LiveRecipes/Modules/Settings/SettingsView.swift | 10 +++++++++- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/LiveRecipes/Localizable.xcstrings b/LiveRecipes/Localizable.xcstrings index b33068e..e81b3ec 100644 --- a/LiveRecipes/Localizable.xcstrings +++ b/LiveRecipes/Localizable.xcstrings @@ -2967,6 +2967,9 @@ }, "Очистить мои рецепты?" : { + }, + "Очистить недавние?" : { + }, "Первое блюдо" : { "extractionState" : "manual", diff --git a/LiveRecipes/Modules/Cooking/AnimatedElements/BlinkingText + TimerView.swift b/LiveRecipes/Modules/Cooking/AnimatedElements/BlinkingText + TimerView.swift index 55ca90e..93d0d08 100644 --- a/LiveRecipes/Modules/Cooking/AnimatedElements/BlinkingText + TimerView.swift +++ b/LiveRecipes/Modules/Cooking/AnimatedElements/BlinkingText + TimerView.swift @@ -238,7 +238,7 @@ struct TimerView: View { } else { Text(hours == 0 ? "\(minutes)m:\(seconds)s" : "\(hours)h:\(minutes)m:\(seconds)s") - .foregroundColor(Color(uiColor: .label)) + .foregroundColor(Color(uiColor: .black)) .font(.system(size: 19, weight: .semibold)) .padding(.top, 2) diff --git a/LiveRecipes/Modules/Cooking/AnimatedElements/IngredientRunningTextView.swift b/LiveRecipes/Modules/Cooking/AnimatedElements/IngredientRunningTextView.swift index 3eff7ce..0c7da7f 100644 --- a/LiveRecipes/Modules/Cooking/AnimatedElements/IngredientRunningTextView.swift +++ b/LiveRecipes/Modules/Cooking/AnimatedElements/IngredientRunningTextView.swift @@ -82,7 +82,7 @@ struct IngredientRunningTextView2: View { .background(.white) .clipShape(RoundedRectangle(cornerRadius: 20)) .font(.system(size: 18, weight: .regular)) - .foregroundColor(Color(uiColor: .label)) + .foregroundColor(Color(uiColor: .black)) .offset(x: computedFinishX, y: 0) Spacer() } diff --git a/LiveRecipes/Modules/Cooking/Components/OneStep/OneStepView.swift b/LiveRecipes/Modules/Cooking/Components/OneStep/OneStepView.swift index d19062f..e265b03 100644 --- a/LiveRecipes/Modules/Cooking/Components/OneStep/OneStepView.swift +++ b/LiveRecipes/Modules/Cooking/Components/OneStep/OneStepView.swift @@ -115,7 +115,7 @@ struct OneStepView: View { Spacer() } }.buttonStyle(.borderedProminent) - .tint(Color(uiColor: .label)) + .tint(Color(uiColor: .black)) .padding(.bottom, 20) .frame(width: UIScreen.main.bounds.width - 20) .offset(y: model.isTimerOnView ? 10 : -100) diff --git a/LiveRecipes/Modules/Settings/SettingsView.swift b/LiveRecipes/Modules/Settings/SettingsView.swift index ab5a17b..3bac014 100644 --- a/LiveRecipes/Modules/Settings/SettingsView.swift +++ b/LiveRecipes/Modules/Settings/SettingsView.swift @@ -13,6 +13,7 @@ struct SettingsView: View { @StateObject var creationViewModel = CreationViewModel(creationModel: CreationModel()) @State var isClearMyRecipes = false @State var isClearFavorites = false + @State var isClearRecents = false var body: some View { List { @@ -57,11 +58,18 @@ struct SettingsView: View { // .tint(Color(uiColor: .label)) // } Button(action: { - viewState.clearRecents() + isClearRecents = true }) { Text("settings.clearRecents".localized) .tint(Color(uiColor: .label)) + }.alert(isPresented: $isClearRecents) { + Alert(title: Text("Очистить недавние?"), primaryButton: .default(Text("Да")){ + viewState.clearRecents() + isClearFavorites = false + }, secondaryButton: .default(Text("Отмена")) { + isClearFavorites = false + }) } NavigationLink(destination: CreationView(viewState: creationViewModel), isActive: $isShowingCreationView, label: { Text("settings.publishMyRecipe".localized)