client GlobalUI: use display name for navigation items
This commit is contained in:
parent
658c6ca7f6
commit
00722e6b76
1 changed files with 7 additions and 4 deletions
|
@ -35,16 +35,19 @@ class GlobalUI {
|
||||||
const result = document.createDocumentFragment();
|
const result = document.createDocumentFragment();
|
||||||
for(const table_name of status.tables) {
|
for(const table_name of status.tables) {
|
||||||
console.log(`[nav] new dynamic item ${table_name}, def`, tabledefs[table_name]);
|
console.log(`[nav] new dynamic item ${table_name}, def`, tabledefs[table_name]);
|
||||||
const icondef = typeof tabledefs[table_name] === "undefined"
|
let icondef = `question-circle`;
|
||||||
? "question-circle"
|
let display_name = table_name;
|
||||||
: tabledefs[table_name].icon;
|
if(typeof tabledefs[table_name] !== "undefined") {
|
||||||
|
icondef = tabledefs[table_name].icon;
|
||||||
|
display_name = tabledefs[table_name].name;
|
||||||
|
}
|
||||||
|
|
||||||
const emel_icon = forkawesome_emel(icondef);
|
const emel_icon = forkawesome_emel(icondef);
|
||||||
console.log(`emel_icon`, emel_icon);
|
console.log(`emel_icon`, emel_icon);
|
||||||
result.append(this.emel(`li>a[href="?"]>${emel_icon}+span{?}`, {
|
result.append(this.emel(`li>a[href="?"]>${emel_icon}+span{?}`, {
|
||||||
placeholders: [
|
placeholders: [
|
||||||
`#table/${table_name}`,
|
`#table/${table_name}`,
|
||||||
table_name
|
display_name
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue