* Fixes

* .
This commit is contained in:
WBHarry 2026-04-11 22:55:41 +02:00 committed by GitHub
parent f4282429cd
commit d12220c64f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 124 additions and 66 deletions

View file

@ -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