[ui] reformat, add HIER icon

feat/vaults
Tomáš Mládek 2021-10-29 17:24:54 +02:00
parent ea1b05d491
commit e47f74f884
1 changed files with 45 additions and 46 deletions

View File

@ -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",
}
}
]
}
}
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"
}
}
]
}
};