mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 12:35:52 +03:00
Add close action to lock view controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
10f37d3af1
commit
4edbb4b50d
2 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,10 @@ class LockViewController: NSViewController {
|
|||
@IBOutlet weak var closeButton: NSButton!
|
||||
@IBOutlet weak var loadingIndicator: NSProgressIndicator!
|
||||
|
||||
var actionViewController: DocumentActionViewController! {
|
||||
return parent as? DocumentActionViewController
|
||||
}
|
||||
|
||||
init(_ itemIdentifiers: [NSFileProviderItemIdentifier], locking: Bool) {
|
||||
self.itemIdentifiers = itemIdentifiers
|
||||
self.locking = locking
|
||||
|
@ -30,4 +34,8 @@ class LockViewController: NSViewController {
|
|||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@IBAction func closeAction(_ sender: Any) {
|
||||
actionViewController.extensionContext.completeRequest()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,6 +80,9 @@
|
|||
<constraint firstAttribute="width" secondItem="7qN-mr-hAh" secondAttribute="height" multiplier="1:1" id="K00-Bi-dEy"/>
|
||||
<constraint firstAttribute="width" constant="32" id="zVJ-h1-QXJ"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<action selector="closeAction:" target="-2" id="E6h-U9-2eB"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<edgeInsets key="edgeInsets" left="10" right="10" top="10" bottom="10"/>
|
||||
|
|
Loading…
Reference in a new issue