Add filter buttons to navigation bar

This commit is contained in:
Maurice Parker 2020-07-05 15:11:45 -05:00
parent 14601fc96b
commit 5b0c397739
3 changed files with 30 additions and 2 deletions

View File

@ -80,6 +80,14 @@ struct AppAssets {
return RSImage(named: "FaviconTemplateImage")!
}()
static var filterInactiveImage: Image = {
return Image(systemName: "line.horizontal.3.decrease.circle")
}()
static var filterActiveImage: Image = {
return Image(systemName: "line.horizontal.3.decrease.circle.fill")
}()
static var getInfoImage: Image = {
return Image(systemName: "info.circle")
}()

View File

@ -17,13 +17,21 @@ struct SidebarToolbarModifier: ViewModifier {
#if os(iOS)
content
.toolbar {
ToolbarItem(placement: .navigation) {
Button(action: {
}, label: {
AppAssets.filterInactiveImage
.font(.title3)
}).help("Filter Read Feeds")
}
ToolbarItem(placement: .automatic) {
Button(action: {
viewModel.sheetToShow = .settings
}, label: {
AppAssets.settingsImage
.font(.title3)
.foregroundColor(.accentColor)
}).help("Settings")
}
@ -45,7 +53,6 @@ struct SidebarToolbarModifier: ViewModifier {
}, label: {
AppAssets.addMenuImage
.font(.title3)
.foregroundColor(.accentColor)
})
.help("Add")
.actionSheet(isPresented: $viewModel.showActionSheet) {

View File

@ -16,6 +16,14 @@ struct TimelineToolbarModifier: ViewModifier {
content
.toolbar {
#if os(iOS)
ToolbarItem(placement: .navigation) {
Button(action: {
}, label: {
AppAssets.filterInactiveImage
.font(.title3)
}).help("Filter Read Articles")
}
ToolbarItem {
Button(action: {
}, label: {
@ -23,15 +31,19 @@ struct TimelineToolbarModifier: ViewModifier {
.foregroundColor(.accentColor)
}).help("Mark All As Read")
}
ToolbarItem {
Spacer()
}
ToolbarItem(placement: .automatic) {
RefreshProgressView()
}
ToolbarItem {
Spacer()
}
ToolbarItem {
Button(action: {
}, label: {
@ -39,6 +51,7 @@ struct TimelineToolbarModifier: ViewModifier {
.font(.title3)
}).help("Next Unread")
}
#endif
}
}