Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/data-sdk/src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FORMANT_API_URL } from "./config";
import { QueryStore } from "./cache/queryStore";
import { IStreamData, ITags, StreamType } from "./main";
import { JsonSchema } from "./model/JsonSchema";
import { IconName } from "./model/IconName";

const queryStore = new QueryStore();

Expand Down Expand Up @@ -35,7 +36,7 @@ export type AppMessage =
| {
type: "setup_module_menus";
module: string;
menus: { label: string }[];
menus: { label: string; icon?: IconName }[];
}
| {
type: "send_channel_data";
Expand Down Expand Up @@ -235,7 +236,7 @@ export class App {
});
}

static setupModuleMenus(menus: { label: string }[]) {
static setupModuleMenus(menus: { label: string; icon?: IconName }[]) {
const moduleName = this.getCurrentModuleContext();
if (!moduleName) {
throw new Error("No module context");
Expand Down
3 changes: 3 additions & 0 deletions packages/data-sdk/src/model/IconName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { icons } from "./icons";

export type IconName = (typeof icons)[number];
117 changes: 117 additions & 0 deletions packages/data-sdk/src/model/icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
export const icons = [
"add-small",
"annotation",
"audio",
"audio-muted",
"audio-volume-0",
"audio-volume-half",
"arrow-down",
"arrow-left",
"arrow-right",
"arrow-up",
"board",
"arrow",
"assistance",
"battery",
"bitset",
"capture",
"channel",
"check",
"chevron-up",
"chevron-down",
"chevron-left",
"chevron-right",
"clock",
"clone",
"close",
"close-large",
"command",
"comment",
"configuration",
"copy",
"critical",
"cube",
"delete",
"device",
"down",
"dropdown",
"download",
"download-18",
"duration",
"edit",
"edit-layout",
"error",
"event",
"expand",
"eye",
"eye_closed",
"collapse",
"favorite",
"file",
"filter",
"gamepad",
"group",
"forward",
"fullscreen",
"goal",
"hardware",
"health",
"help",
"image",
"integration",
"joystick-star",
"jump",
"json",
"link",
"localization",
"location",
"location-arrow",
"location-arrow-fill",
"location-arrow-slash",
"menu",
"minus",
"more",
"next",
"numeric",
"on-demand",
"offline",
"online",
"organization",
"overview",
"pause",
"play",
"playback",
"plus",
"previous",
"recenter",
"refresh",
"remove",
"relocalization",
"search",
"seek-option",
"seek-next",
"seek-previous",
"settings",
"share",
"shift",
"stop",
"stream",
"tags",
"teams",
"teleop",
"text",
"tools",
"undo",
"up",
"user",
"utility",
"video",
"video-off",
"view",
"warning",
"infinity",
"code",
"access",
"ros",
"adapter",
] as const;