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();
|
||||
for(const table_name of status.tables) {
|
||||
console.log(`[nav] new dynamic item ${table_name}, def`, tabledefs[table_name]);
|
||||
const icondef = typeof tabledefs[table_name] === "undefined"
|
||||
? "question-circle"
|
||||
: tabledefs[table_name].icon;
|
||||
let icondef = `question-circle`;
|
||||
let display_name = table_name;
|
||||
if(typeof tabledefs[table_name] !== "undefined") {
|
||||
icondef = tabledefs[table_name].icon;
|
||||
display_name = tabledefs[table_name].name;
|
||||
}
|
||||
|
||||
const emel_icon = forkawesome_emel(icondef);
|
||||
console.log(`emel_icon`, emel_icon);
|
||||
result.append(this.emel(`li>a[href="?"]>${emel_icon}+span{?}`, {
|
||||
placeholders: [
|
||||
`#table/${table_name}`,
|
||||
table_name
|
||||
display_name
|
||||
]
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue