Skip to content

Commit

Permalink
Merge pull request #479 from edx/setting-button-on-dashboard-list
Browse files Browse the repository at this point in the history
Settings button for dashboard type 'list'
  • Loading branch information
rnr authored Jul 8, 2024
2 parents 5d99fba + f6c9f47 commit 15d2ed3
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 15d2ed3

Please sign in to comment.