mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
parent
1a57b55723
commit
8a0b1b8e22
40 changed files with 128 additions and 70 deletions
|
|
@ -22,7 +22,7 @@ export default class FearTracker extends HandlebarsApplicationMixin(ApplicationV
|
|||
tag: 'div',
|
||||
window: {
|
||||
frame: true,
|
||||
title: 'Fear',
|
||||
title: 'DAGGERHEART.GENERAL.fear',
|
||||
positioned: true,
|
||||
resizable: true,
|
||||
minimizable: false
|
||||
|
|
|
|||
|
|
@ -207,8 +207,23 @@ export class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
label: game.i18n.localize(col.label)
|
||||
}));
|
||||
|
||||
const splitPath = folderId?.split('.') ?? [];
|
||||
const { pathLabels } = splitPath.reduce(
|
||||
(acc, curr) => {
|
||||
acc.currentPath = !acc.currentPath ? curr : [acc.currentPath, curr].join('.');
|
||||
if (curr === 'folder') return acc;
|
||||
|
||||
const label = foundry.utils.getProperty(this.config, acc.currentPath)?.label;
|
||||
if (label) acc.pathLabels.push(game.i18n.localize(label));
|
||||
|
||||
return acc;
|
||||
},
|
||||
{ pathLabels: [], currentPath: '' }
|
||||
);
|
||||
|
||||
this.selectedMenu = {
|
||||
path: folderId?.split('.') ?? [],
|
||||
path: splitPath,
|
||||
pathLabels: pathLabels,
|
||||
data: {
|
||||
...folderData,
|
||||
columns: columns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue