annotate web/panels.ts @ 2417:ae4b90efb55a

start calibration tool
author drewp@bigasterisk.com
date Mon, 20 May 2024 01:28:12 -0700
parents 7e7874fed2e3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2408
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
1 export { Light9AscoltamiUi } from "./ascoltami/Light9AscoltamiUi";
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
2 export { Light9CollectorUi } from "./collector/Light9CollectorUi";
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
3 export { Light9EffectListing } from "./effects/Light9EffectListing";
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
4 export { Light9FadeUi } from "./fade/Light9FadeUi";
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
5 export { Light9DeviceSettings } from "./live/Light9DeviceSettings";
2417
ae4b90efb55a start calibration tool
drewp@bigasterisk.com
parents: 2408
diff changeset
6 export { Light9Calibrate } from "./calibrate/Light9Calibrate";
2408
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
7
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
8 const panels: Map<string, Array<string>> = new Map([
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
9 ["light9-ascoltami-ui", ["ascoltami", "ascoltami"]],
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
10 ["light9-collector-ui", ["collector", "collector"]],
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
11 ["light9-device-settings", ["device-settings", "live"]],
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
12 ["light9-effect-listing", ["effect-listing" , "effectListing"]],
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
13 ["light9-fade-ui", ["fade", "fade"]],
2417
ae4b90efb55a start calibration tool
drewp@bigasterisk.com
parents: 2408
diff changeset
14 ["light9-calibrate", ["calibrate", "calibrate"]],
2408
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
15 ]);
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
16
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
17 export function panelElementNames(): string[] {
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
18 return Array.from(panels.keys());
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
19 }
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
20
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
21 export function panelUrl(elem: string): string {
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
22 const row = panels.get(elem);
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
23 if (!row) throw new Error("No panel: " + elem);
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
24 return "/" + row[1] + "/";
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
25 }
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
26
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
27 export function panelDisplayName(elem: string): string {
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
28 const row = panels.get(elem);
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
29 if (!row) throw new Error("No panel: " + elem);
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
30 return row[0];
7e7874fed2e3 buttons to add panels to the layout
drewp@bigasterisk.com
parents:
diff changeset
31 }