Replaced menu icon

This commit is contained in:
WBHarry 2025-08-18 16:31:52 +02:00
parent 4622d7ae51
commit 049bc27351
4 changed files with 52 additions and 1 deletions

View file

@ -1,9 +1,33 @@
export default class DhSidebar extends Sidebar {
/** @override */
static TABS = {
...super.TABS,
daggerheartMenu: {
tooltip: 'DAGGERHEART.UI.Sidebar.daggerheartMenu.title',
icon: 'fa-solid fa-bars'
img: 'systems/daggerheart/assets/logos/FoundryBorneLogoWhite.svg'
}
};
/** @override */
static PARTS = {
tabs: {
id: 'tabs',
template: 'systems/daggerheart/templates/sidebar/tabs.hbs'
}
};
/** @override */
async _prepareTabContext(context, options) {
context.tabs = Object.entries(this.constructor.TABS).reduce((obj, [k, v]) => {
let { documentName, gmOnly, tooltip, icon, img } = v;
if (gmOnly && !game.user.isGM) return obj;
if (documentName) {
tooltip ??= getDocumentClass(documentName).metadata.labelPlural;
icon ??= CONFIG[documentName]?.sidebarIcon;
}
obj[k] = { tooltip, icon, img };
obj[k].active = this.tabGroups.primary === k;
return obj;
}, {});
}
}