(rawText: any, notify = true)
| 46 | }, |
| 47 | clipboard: { |
| 48 | writeText(rawText: any, notify = true) { |
| 49 | const copyNotification = new Noty({ |
| 50 | text: "Text copied to clipboard", |
| 51 | layout: "bottomRight", |
| 52 | queue: "clipboard", |
| 53 | timeout: 2000, |
| 54 | }) |
| 55 | const text = _.toString(rawText) |
| 56 | Noty.closeAll('clipboard') |
| 57 | window.main.writeTextToClipboard(text) |
| 58 | |
| 59 | if (!notify) return; |
| 60 | copyNotification.show() |
| 61 | }, |
| 62 | readText(): string { |
| 63 | return window.main.readTextFromClipboard() |
| 64 | } |