diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e980023..46d3e31 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -57,6 +57,7 @@ jobs: artifacts: "./module.json, ./module.zip" tag: ${{ github.event.release.tag_name }} body: ${{ github.event.release.body }} + # - name: Foundry Package Admin Release # uses: fjogeleit/http-request-action@v1 # with: diff --git a/CHANGELOG.md b/CHANGELOG.md index be1f3d6..9628b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,4 +41,8 @@ ## Version 0.2.5 - become npm package, write own simple sass compile job -- it works! release finally. \ No newline at end of file +- it works! release finally. + +## Version 0.2.6 +- Attempt new foundry package release API +- Update MHLDialog's template-as-content support to allow prototype method and property use, matching the behaviour of foundry's `renderTemplate()` \ No newline at end of file diff --git a/README.md b/README.md index 1efd8e1..9608a7f 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ The purple text is the `indentifier`, which can be supplied to disambiguated thi --- ## Classes +Classes are accessed via `game.pf2emhl.classes.` ### `MHLDialog` MHLDialog is designed to be a drop-in replacement for the foundry Dialog class, with a few improvements: #### Defaults to `jQuery:false` in options diff --git a/module.json b/module.json index 927866d..68b20c7 100644 --- a/module.json +++ b/module.json @@ -48,7 +48,7 @@ "paths": ["lang", "styles", "templates"] } }, - "version": "0.1", + "version": "0.2.6", "manifest": "updatedByRelease", "url": "updatedByRelease", "download": "updatedByRelease", diff --git a/scripts/classes/MHLDialog.mjs b/scripts/classes/MHLDialog.mjs index e272074..467a77f 100644 --- a/scripts/classes/MHLDialog.mjs +++ b/scripts/classes/MHLDialog.mjs @@ -94,7 +94,10 @@ export class MHLDialog extends Dialog { if (/\.(hbs|html)$/.test(data.content)) { data.content = await renderTemplate(originalContent, data); } else { - data.content = Handlebars.compile(originalContent)(data); + data.content = Handlebars.compile(originalContent, { + allowProtoMethodsByDefault: true, + allowProtoPropertiesByDefault: true, + })(data); } data.content ||= localize(`${PREFIX}.Error.TemplateFailure`); } diff --git a/styles/main.scss b/styles/main.scss index 276e2b7..a4f9ddc 100644 --- a/styles/main.scss +++ b/styles/main.scss @@ -2,13 +2,14 @@ --mhl-frame-color-1: var(--color-primary-1, var(--color-bg-trait)); --mhl-frame-color-2: var(--color-primary-2, var(--color-pf-primary-light)); --mhl-text-color: var(--text-dark); + --mhl-text-header-color: var(--mhl-text-color); [data-color-scheme='dark'] { --mhl-text-color: var(--text-color-1, var(--text-light)); --mhl-text-header-color: var(--mhl-text-color); } - --mhl-text-header-color: var(--mhl-text-color); + [disabled] { cursor: not-allowed;