From 83523ba4c6dbfce655bb5cb0d4188c3828491a8d Mon Sep 17 00:00:00 2001 From: Dapoolp Date: Sun, 3 Aug 2025 21:55:10 +0200 Subject: [PATCH] Create files --- module/applications/ui/itemBrowser.mjs | 57 ++++++++++++++++++++++++++ templates/ui/itemBrowser.hbs | 0 2 files changed, 57 insertions(+) create mode 100644 module/applications/ui/itemBrowser.mjs create mode 100644 templates/ui/itemBrowser.hbs diff --git a/module/applications/ui/itemBrowser.mjs b/module/applications/ui/itemBrowser.mjs new file mode 100644 index 00000000..ae33c924 --- /dev/null +++ b/module/applications/ui/itemBrowser.mjs @@ -0,0 +1,57 @@ + +const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; + +/** + * A UI element which displays the Users defined for this world. + * Currently active users are always displayed, while inactive users can be displayed on toggle. + * + * @extends ApplicationV2 + * @mixes HandlebarsApplication + */ + +export default class ItemBrowser extends HandlebarsApplicationMixin(ApplicationV2) { + constructor(options = {}) { + super(options); + } + + /** @inheritDoc */ + static DEFAULT_OPTIONS = { + id: 'itemBrowser', + classes: [], + tag: 'div', + // window: { + // frame: true, + // title: 'Item Browser', + // positioned: true, + // resizable: true + // }, + actions: { + // setFear: FearTracker.setFear, + // increaseFear: FearTracker.increaseFear + }, + /* position: { + width: 222, + height: 222 + // top: "200px", + // left: "120px" + } */ + }; + + /** @override */ + static PARTS = { + resources: { + root: true, + template: 'systems/daggerheart/templates/ui/itemBrowser.hbs' + } + }; + + /* -------------------------------------------- */ + /* Rendering */ + /* -------------------------------------------- */ + + /** @override */ + async _prepareContext(options) { + const data = await super._prepareContext(options); + return data; + } +} \ No newline at end of file diff --git a/templates/ui/itemBrowser.hbs b/templates/ui/itemBrowser.hbs new file mode 100644 index 00000000..e69de29b