(body: CaptureRequest)
| 361 | } |
| 362 | |
| 363 | function getCaptureValidationMessage(body: CaptureRequest): string | null { |
| 364 | if (body.target === 'code' && !trimToValue(body.text)) { |
| 365 | return 'Code capture requires selected text' |
| 366 | } |
| 367 | |
| 368 | if ( |
| 369 | body.target === 'notes' |
| 370 | && !trimToValue(body.text) |
| 371 | && !trimToValue(body.markdown) |
| 372 | ) { |
| 373 | return 'Notes capture requires text or markdown content' |
| 374 | } |
| 375 | |
| 376 | return null |
| 377 | } |
| 378 | |
| 379 | function notifyStorageSynced(): void { |
| 380 | BrowserWindow.getAllWindows().forEach((window) => { |
no test coverage detected