MCPcopy
hub / github.com/CapSoftware/Cap / createProgressBar

Function createProgressBar

apps/desktop/src/routes/editor/utils.ts:18–27  ·  view source on GitHub ↗
(progress: () => number | undefined)

Source from the content-addressed store, hash-verified

16import { createEffect } from "solid-js";
17
18export 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}

Callers 2

ShareButtonFunction · 0.90
context.tsFile · 0.90

Calls 1

progressFunction · 0.50

Tested by

no test coverage detected