An experimental share extension to send files and too much refactoring

closes #4
This commit is contained in:
Grishka
2023-09-26 03:22:23 +03:00
parent 22a2fff54b
commit 8f0eccd7b6
39 changed files with 2158 additions and 235 deletions

View File

@@ -0,0 +1,26 @@
//
// DeviceListCell.swift
// ShareExtension
//
// Created by Grishka on 20.09.2023.
//
import Cocoa
class DeviceListCell:NSCollectionViewItem {
public var clickHandler:(()->Void)?
override func viewDidLoad() {
super.viewDidLoad()
let btn:NSButton=view as! NSButton
btn.isEnabled=true
btn.setButtonType(.momentaryPushIn)
btn.action=#selector(onClick)
btn.target=self
}
@IBAction func onClick(_ sender:Any?){
guard let handler=clickHandler else {return}
handler()
}
}