From e47f74f88434fd10af5c951447fc7d6bb0dcbd01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Fri, 29 Oct 2021 17:24:54 +0200 Subject: [PATCH] [ui] reformat, add HIER icon --- ui/src/lib/types.ts | 91 ++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git a/ui/src/lib/types.ts b/ui/src/lib/types.ts index 3b9f647..e3e85c9 100644 --- a/ui/src/lib/types.ts +++ b/ui/src/lib/types.ts @@ -1,60 +1,59 @@ import { ComponentOptions } from "vue"; export class UpType { - address: string; - name: string | null = null; - attributes: string[] = []; + address: string; + name: string | null = null; + attributes: string[] = []; - constructor(address: string) { - this.address = address; - } + constructor(address: string) { + this.address = address; + } - public get icon(): string | undefined { - return this.name ? TYPE_ICONS[this.name] : undefined; - } + public get icon(): string | undefined { + return this.name ? TYPE_ICONS[this.name] : undefined; + } - public get widgetInfo(): Widget | undefined { - return this.name ? TYPE_WIDGETS[this.name] : undefined; - } + public get widgetInfo(): Widget | undefined { + return this.name ? TYPE_WIDGETS[this.name] : undefined; + } } export interface Widget { - name: string; - icon?: string; - components: ComponentOptions[]; + name: string; + icon?: string; + components: ComponentOptions[]; } const TYPE_ICONS: { [key: string]: string } = { - "BLOB": "box", - "FS_FILE": "file-earmark", - "FS_DIR": "folder" -} + BLOB: "box", + HIER: "folder" +}; const TYPE_WIDGETS: { [key: string]: Widget } = { - "KSX_TRACK_MOODS": { - name: "ksx-track-compass", - icon: "plus-square", - components: [ - { - name: "Compass", - id: "compass_tint_energy", - props: { - xAttrName: "KSX_TINT", - yAttrName: "KSX_ENERGY", - xLabel: "Lightsoft // Heavydark", - yLabel: "Chill // Extreme", - } - }, - { - name: "Compass", - id: "compass_seriousness_materials", - props: { - xAttrName: "KSX_SERIOUSNESS", - yAttrName: "KSX_MATERIALS", - xLabel: "Dionysia // Apollonia", - yLabel: "Natural // Reinforced", - } - } - ] - } -} \ No newline at end of file + KSX_TRACK_MOODS: { + name: "ksx-track-compass", + icon: "plus-square", + components: [ + { + name: "Compass", + id: "compass_tint_energy", + props: { + xAttrName: "KSX_TINT", + yAttrName: "KSX_ENERGY", + xLabel: "Lightsoft // Heavydark", + yLabel: "Chill // Extreme" + } + }, + { + name: "Compass", + id: "compass_seriousness_materials", + props: { + xAttrName: "KSX_SERIOUSNESS", + yAttrName: "KSX_MATERIALS", + xLabel: "Dionysia // Apollonia", + yLabel: "Natural // Reinforced" + } + } + ] + } +};