mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Implement share link copying in share table item view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
4f0e25a4e6
commit
540eb11bf2
@ -32,4 +32,11 @@ class ShareTableItemView: NSTableCellView {
|
||||
copyLinkButton.isHidden = false
|
||||
super.prepareForReuse()
|
||||
}
|
||||
|
||||
@IBAction func copyShareLink(sender: Any) {
|
||||
guard let share = share else { return }
|
||||
let pasteboard = NSPasteboard.general
|
||||
pasteboard.declareTypes([.string], owner: nil)
|
||||
pasteboard.setString(share.url, forType: .string)
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,6 +46,9 @@
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="y6i-wm-BtQ" secondAttribute="height" multiplier="1:1" id="BlJ-WU-1y5"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<action selector="copyShareLinkWithSender:" target="WWf-Il-fKw" id="dgW-8v-wfd"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e8z-Xl-jOh">
|
||||
<rect key="frame" x="280" y="0.0" width="32" height="32"/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user