diff --git a/Yattee/Localizable.xcstrings b/Yattee/Localizable.xcstrings index bfc856c1..2be8977e 100644 --- a/Yattee/Localizable.xcstrings +++ b/Yattee/Localizable.xcstrings @@ -20190,6 +20190,16 @@ } } }, + "video.context.copyLink" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Copy Link" + } + } + } + }, "video.context.download" : { "localizations" : { "en" : { diff --git a/Yattee/Views/Components/VideoContextMenu.swift b/Yattee/Views/Components/VideoContextMenu.swift index ca05c0cd..7fe49fcb 100644 --- a/Yattee/Views/Components/VideoContextMenu.swift +++ b/Yattee/Views/Components/VideoContextMenu.swift @@ -267,6 +267,17 @@ struct VideoContextMenuContent: View { Label(String(localized: "video.context.share"), systemImage: "square.and.arrow.up") } #endif + + // The macOS ShareLink menu has no Copy Link item (#972) + #if os(macOS) + Button { + let pasteboard = NSPasteboard.general + pasteboard.clearContents() + pasteboard.setString((appEnvironment?.shareURL(for: video) ?? video.shareURL).absoluteString, forType: .string) + } label: { + Label(String(localized: "video.context.copyLink"), systemImage: "link") + } + #endif } var body: some View {