Fixed browse dataSource

This commit is contained in:
WBHarry 2025-11-09 02:19:17 +01:00
parent 200349be3b
commit 4d5f066a38

View file

@ -115,10 +115,15 @@ export default class DHBeastform extends BaseDataItem {
const tokenPath = usesDynamicToken ? beastform.system.tokenRingImg : beastform.system.tokenImg; const tokenPath = usesDynamicToken ? beastform.system.tokenRingImg : beastform.system.tokenImg;
const usesWildcard = tokenPath.includes('*'); const usesWildcard = tokenPath.includes('*');
if (usesWildcard) { if (usesWildcard) {
const { files } = await foundry.applications.apps.FilePicker.implementation.browse('data', tokenPath, { const filePicker = new foundry.applications.apps.FilePicker.implementation(tokenPath);
wildcard: true, const { files } = await foundry.applications.apps.FilePicker.implementation.browse(
type: 'image' filePicker.activeSource,
}); tokenPath,
{
wildcard: true,
type: 'image'
}
);
const selectedImage = await game.system.api.applications.dialogs.ImageSelectDialog.configure( const selectedImage = await game.system.api.applications.dialogs.ImageSelectDialog.configure(
game.i18n.localize('DAGGERHEART.APPLICATIONS.ImageSelect.title'), game.i18n.localize('DAGGERHEART.APPLICATIONS.ImageSelect.title'),
files files