Add dashboard UI source and track it in the repository.

Expose the Vite/React website source under dashboard/ (with node_modules still ignored) so the full dashboard can be built and maintained from this repo.
This commit is contained in:
Char committed 2026-07-26 13:09:19 +01:00
1 parent e97e281bda
commit b82f69783d
117 files changed
+18615 -3

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
export const ADDON_CONFIG_PREFIX = "addon:";
export function addonConfigFileParam(filename: string): string {
return `${ADDON_CONFIG_PREFIX}${filename}`;
}
export function parseConfigFileParam(
file: string | null,
): { type: "main" | "addon"; file: string } | null {
if (!file) return null;
if (file.startsWith(ADDON_CONFIG_PREFIX)) {
return {
type: "addon",
file: file.slice(ADDON_CONFIG_PREFIX.length),
};
}
return { type: "main", file };
}
export function addonConfigLabel(filename: string): string {
return filename
.replace(/\.(yml|yaml|json)$/i, "")
.replace(/[-_]/g, " ")
.replace(/\b\w/g, (c) => c.toUpperCase());
}