(opts: QDialogOptions)
| 11 | import type { QDialogOptions } from 'quasar'; |
| 12 | |
| 13 | export async function asyncDialog<T = any>(opts: QDialogOptions): Promise<T> { |
| 14 | return new Promise((resolve, reject) => { |
| 15 | $quasar() |
| 16 | .dialog(opts) |
| 17 | .onOk(async (output: T) => { |
| 18 | resolve(output); |
| 19 | }) |
| 20 | .onCancel(() => { |
| 21 | reject(); |
| 22 | }); |
| 23 | }); |
| 24 | } |
| 25 | |
| 26 | export function handleError(error: any, logger = mainLogger) { |
| 27 | if (error == null) { |
no outgoing calls
no test coverage detected