mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Merge branch 'add-help-tooltips' into main
This commit is contained in:
commit
f880b48021
@ -16,6 +16,7 @@ struct ContentView: View {
|
||||
},
|
||||
label: { Image(systemName: "sidebar.left") }
|
||||
)
|
||||
.help("Toggle the sidebar's visibility.")
|
||||
Spacer()
|
||||
Button(action: {
|
||||
withAnimation {
|
||||
@ -45,6 +46,7 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
}, label: { Image(systemName: "square.and.pencil") })
|
||||
.help("Create a new local draft.")
|
||||
}
|
||||
#else
|
||||
SidebarView()
|
||||
|
@ -66,6 +66,7 @@ struct ActivePostToolbarView: View {
|
||||
Label("Publish…", systemImage: "paperplane")
|
||||
})
|
||||
.disabled(activePost.body.isEmpty)
|
||||
.help("Publish the post to the web.\(model.account.isLoggedIn ? "" : " You must be logged in to do this.")") // swiftlint:disable:this line_length
|
||||
} else {
|
||||
HStack(spacing: 4) {
|
||||
Button(
|
||||
@ -75,6 +76,7 @@ struct ActivePostToolbarView: View {
|
||||
label: { Image(systemName: "square.and.arrow.up") }
|
||||
)
|
||||
.disabled(activePost.status == PostStatus.local.rawValue)
|
||||
.help("Copy the post's URL to your Mac's pasteboard.")
|
||||
.popover(isPresented: $isPresentingSharingServicePicker) {
|
||||
PostEditorSharingPicker(
|
||||
isPresented: $isPresentingSharingServicePicker,
|
||||
@ -84,6 +86,7 @@ struct ActivePostToolbarView: View {
|
||||
}
|
||||
Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
|
||||
.disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue)
|
||||
.help("Publish the post to the web.\(model.account.isLoggedIn ? "" : " You must be logged in to do this.")") // swiftlint:disable:this line_length
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user