From 4ec81ccfbf4bf9230dc87e1f05f1831f8681ac51 Mon Sep 17 00:00:00 2001 From: Angelo Stavrow Date: Fri, 11 Dec 2020 16:16:43 -0500 Subject: [PATCH] Add help tooltips to the toolbar buttons. --- Shared/Navigation/ContentView.swift | 2 ++ macOS/Navigation/ActivePostToolbarView.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Shared/Navigation/ContentView.swift b/Shared/Navigation/ContentView.swift index d5c1e4d..cf964fb 100644 --- a/Shared/Navigation/ContentView.swift +++ b/Shared/Navigation/ContentView.swift @@ -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() diff --git a/macOS/Navigation/ActivePostToolbarView.swift b/macOS/Navigation/ActivePostToolbarView.swift index 68b9d93..2d16c41 100644 --- a/macOS/Navigation/ActivePostToolbarView.swift +++ b/macOS/Navigation/ActivePostToolbarView.swift @@ -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.") } } }