Skip to content

Commit

Permalink
chore: added Settings button for dashboard type 'list'
Browse files Browse the repository at this point in the history
  • Loading branch information
rnr committed Jul 5, 2024
1 parent ea6e24e commit f6c9f47
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dashboard/Dashboard/Presentation/ListDashboardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }())
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f6c9f47

Please sign in to comment.