Add help tooltips to the toolbar buttons.

This commit is contained in:
Angelo Stavrow 2020-12-11 16:16:43 -05:00
parent 1397009a8a
commit 4ec81ccfbf
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
2 changed files with 4 additions and 0 deletions

View File

@ -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()

View File

@ -10,8 +10,10 @@ struct ActivePostToolbarView: View {
HStack(spacing: 4) {
Button(action: {}, label: { Image(systemName: "square.and.arrow.up") })
.disabled(activePost.status == PostStatus.local.rawValue)
.help("Copy the post's URL to your Mac's pasteboard.")
Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
.disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue)
.help("Publish the post to the web. You must be logged in to do this.")
}
}
}