From f6c9f4784b0f6027f6b1d1c5e39a76b78c187c98 Mon Sep 17 00:00:00 2001 From: Anton Yarmolenko <37253+rnr@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:27:54 +0300 Subject: [PATCH] chore: added Settings button for dashboard type 'list' --- .../Dashboard/Presentation/ListDashboardView.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dashboard/Dashboard/Presentation/ListDashboardView.swift b/Dashboard/Dashboard/Presentation/ListDashboardView.swift index d3787ebad..90a3e5eba 100644 --- a/Dashboard/Dashboard/Presentation/ListDashboardView.swift +++ b/Dashboard/Dashboard/Presentation/ListDashboardView.swift @@ -27,6 +27,7 @@ public struct ListDashboardView: View { @StateObject private var viewModel: ListDashboardViewModel private let router: DashboardRouter + private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom } public init(viewModel: ListDashboardViewModel, router: DashboardRouter) { self._viewModel = StateObject(wrappedValue: { viewModel }()) @@ -103,6 +104,17 @@ public struct ListDashboardView: View { .frameLimit(width: proxy.size.width) }.accessibilityAction {} }.padding(.top, 8) + HStack { + Spacer() + Button(action: { + router.showSettings() + }, label: { + CoreAssets.settings.swiftUIImage.renderingMode(.template) + .foregroundColor(Theme.Colors.accentColor) + }) + } + .padding(.top, idiom == .pad ? 13 : 5) + .padding(.trailing, idiom == .pad ? 20 : 16) // MARK: - Offline mode SnackBar OfflineSnackBarView(connectivity: viewModel.connectivity,