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") }
|
label: { Image(systemName: "sidebar.left") }
|
||||||
)
|
)
|
||||||
|
.help("Toggle the sidebar's visibility.")
|
||||||
Spacer()
|
Spacer()
|
||||||
Button(action: {
|
Button(action: {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
@ -45,6 +46,7 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, label: { Image(systemName: "square.and.pencil") })
|
}, label: { Image(systemName: "square.and.pencil") })
|
||||||
|
.help("Create a new local draft.")
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
SidebarView()
|
SidebarView()
|
||||||
|
@ -66,6 +66,7 @@ struct ActivePostToolbarView: View {
|
|||||||
Label("Publish…", systemImage: "paperplane")
|
Label("Publish…", systemImage: "paperplane")
|
||||||
})
|
})
|
||||||
.disabled(activePost.body.isEmpty)
|
.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 {
|
} else {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Button(
|
Button(
|
||||||
@ -75,6 +76,7 @@ struct ActivePostToolbarView: View {
|
|||||||
label: { Image(systemName: "square.and.arrow.up") }
|
label: { Image(systemName: "square.and.arrow.up") }
|
||||||
)
|
)
|
||||||
.disabled(activePost.status == PostStatus.local.rawValue)
|
.disabled(activePost.status == PostStatus.local.rawValue)
|
||||||
|
.help("Copy the post's URL to your Mac's pasteboard.")
|
||||||
.popover(isPresented: $isPresentingSharingServicePicker) {
|
.popover(isPresented: $isPresentingSharingServicePicker) {
|
||||||
PostEditorSharingPicker(
|
PostEditorSharingPicker(
|
||||||
isPresented: $isPresentingSharingServicePicker,
|
isPresented: $isPresentingSharingServicePicker,
|
||||||
@ -84,6 +86,7 @@ struct ActivePostToolbarView: View {
|
|||||||
}
|
}
|
||||||
Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
|
Button(action: { publishPost(activePost) }, label: { Image(systemName: "paperplane") })
|
||||||
.disabled(activePost.body.isEmpty || activePost.status == PostStatus.published.rawValue)
|
.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