mirror of
https://github.com/yattee/yattee.git
synced 2025-01-08 22:07:10 +00:00
Hide share button when it should not be available
This commit is contained in:
parent
f1e132a909
commit
b9ad5bc633
@ -21,27 +21,27 @@ struct ShareButton<LabelView: View>: View {
|
|||||||
|
|
||||||
@ViewBuilder var body: some View {
|
@ViewBuilder var body: some View {
|
||||||
// TODO: this should work with other content item types
|
// TODO: this should work with other content item types
|
||||||
Menu {
|
if let video = contentItem.video {
|
||||||
if let video = contentItem.video,
|
Menu {
|
||||||
!video.localStreamIsFile
|
if !video.localStreamIsFile {
|
||||||
{
|
if video.localStreamIsRemoteURL {
|
||||||
if video.localStreamIsRemoteURL {
|
remoteURLAction
|
||||||
remoteURLAction
|
} else {
|
||||||
} else {
|
instanceActions
|
||||||
instanceActions
|
Divider()
|
||||||
Divider()
|
if !accounts.isEmpty {
|
||||||
if !accounts.isEmpty {
|
youtubeActions
|
||||||
youtubeActions
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} label: {
|
||||||
|
label
|
||||||
}
|
}
|
||||||
} label: {
|
.menuStyle(.borderlessButton)
|
||||||
label
|
#if os(macOS)
|
||||||
|
.frame(maxWidth: 60)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
.menuStyle(.borderlessButton)
|
|
||||||
#if os(macOS)
|
|
||||||
.frame(maxWidth: 60)
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var instanceActions: some View {
|
private var instanceActions: some View {
|
||||||
|
Loading…
Reference in New Issue
Block a user