Add filter buttons to navigation bar
This commit is contained in:
parent
14601fc96b
commit
5b0c397739
|
@ -80,6 +80,14 @@ struct AppAssets {
|
||||||
return RSImage(named: "FaviconTemplateImage")!
|
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 = {
|
static var getInfoImage: Image = {
|
||||||
return Image(systemName: "info.circle")
|
return Image(systemName: "info.circle")
|
||||||
}()
|
}()
|
||||||
|
|
|
@ -17,13 +17,21 @@ struct SidebarToolbarModifier: ViewModifier {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
content
|
content
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|
||||||
|
ToolbarItem(placement: .navigation) {
|
||||||
|
Button(action: {
|
||||||
|
}, label: {
|
||||||
|
AppAssets.filterInactiveImage
|
||||||
|
.font(.title3)
|
||||||
|
}).help("Filter Read Feeds")
|
||||||
|
}
|
||||||
|
|
||||||
ToolbarItem(placement: .automatic) {
|
ToolbarItem(placement: .automatic) {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
viewModel.sheetToShow = .settings
|
viewModel.sheetToShow = .settings
|
||||||
}, label: {
|
}, label: {
|
||||||
AppAssets.settingsImage
|
AppAssets.settingsImage
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
.foregroundColor(.accentColor)
|
|
||||||
}).help("Settings")
|
}).help("Settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +53,6 @@ struct SidebarToolbarModifier: ViewModifier {
|
||||||
}, label: {
|
}, label: {
|
||||||
AppAssets.addMenuImage
|
AppAssets.addMenuImage
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
.foregroundColor(.accentColor)
|
|
||||||
})
|
})
|
||||||
.help("Add")
|
.help("Add")
|
||||||
.actionSheet(isPresented: $viewModel.showActionSheet) {
|
.actionSheet(isPresented: $viewModel.showActionSheet) {
|
||||||
|
|
|
@ -16,6 +16,14 @@ struct TimelineToolbarModifier: ViewModifier {
|
||||||
content
|
content
|
||||||
.toolbar {
|
.toolbar {
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
|
ToolbarItem(placement: .navigation) {
|
||||||
|
Button(action: {
|
||||||
|
}, label: {
|
||||||
|
AppAssets.filterInactiveImage
|
||||||
|
.font(.title3)
|
||||||
|
}).help("Filter Read Articles")
|
||||||
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
}, label: {
|
}, label: {
|
||||||
|
@ -23,15 +31,19 @@ struct TimelineToolbarModifier: ViewModifier {
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
}).help("Mark All As Read")
|
}).help("Mark All As Read")
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem(placement: .automatic) {
|
ToolbarItem(placement: .automatic) {
|
||||||
RefreshProgressView()
|
RefreshProgressView()
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarItem {
|
ToolbarItem {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
}, label: {
|
}, label: {
|
||||||
|
@ -39,6 +51,7 @@ struct TimelineToolbarModifier: ViewModifier {
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
}).help("Next Unread")
|
}).help("Next Unread")
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue