mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-03 12:27:32 +01:00
Add action sheet for adding feed resources
This commit is contained in:
parent
494bd85a37
commit
c6bd4cd6e3
@ -11,6 +11,11 @@ import SwiftUI
|
||||
struct SidebarToolbar: View {
|
||||
|
||||
@State private var showSettings: Bool = false
|
||||
@State private var showAddSheet: Bool = false
|
||||
|
||||
var addActionSheetButtons = [
|
||||
Button(action: {}, label: { Text("Add Feed") })
|
||||
]
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
@ -28,11 +33,23 @@ struct SidebarToolbar: View {
|
||||
.font(.caption)
|
||||
.foregroundColor(.secondary)
|
||||
Spacer()
|
||||
Button(action: {}, label: {
|
||||
Button(action: {
|
||||
showAddSheet = true
|
||||
}, label: {
|
||||
Image(systemName: "plus")
|
||||
.font(.title3)
|
||||
.foregroundColor(.accentColor)
|
||||
}).help("Add")
|
||||
})
|
||||
.help("Add")
|
||||
.actionSheet(isPresented: $showAddSheet) {
|
||||
ActionSheet(title: Text("Add"), buttons: [
|
||||
.cancel(),
|
||||
.default(Text("Add Web Feed")),
|
||||
.default(Text("Add Twitter Feed")),
|
||||
.default(Text("Add Reddit Feed")),
|
||||
.default(Text("Add Folder"))
|
||||
])
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 12)
|
||||
|
Loading…
x
Reference in New Issue
Block a user