(progress: () => number | undefined)
| 16 | import { createEffect } from "solid-js"; |
| 17 | |
| 18 | export function createProgressBar(progress: () => number | undefined) { |
| 19 | const currentWindow = getCurrentWindow(); |
| 20 | |
| 21 | createEffect(() => { |
| 22 | const p = progress(); |
| 23 | if (p === undefined) |
| 24 | currentWindow.setProgressBar({ status: ProgressBarStatus.None }); |
| 25 | else currentWindow.setProgressBar({ progress: Math.round(p) }); |
| 26 | }); |
| 27 | } |
no test coverage detected