mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Added attribution to environments
This commit is contained in:
parent
54da1e1872
commit
c73f6202bd
26 changed files with 280 additions and 145 deletions
|
|
@ -130,7 +130,8 @@ export default function DHApplicationMixin(Base) {
|
|||
async _renderFrame(options) {
|
||||
const frame = await super._renderFrame(options);
|
||||
|
||||
if (this.document.system.metadata.hasAttribution) {
|
||||
const headerAttribution = !['environment'].includes(this.document.type);
|
||||
if (this.document.system.metadata.hasAttribution && headerAttribution) {
|
||||
const { source, page } = this.document.system.attribution;
|
||||
const attribution = [source, page ? `pg ${page}.` : null].filter(x => x).join('. ');
|
||||
const element = `<label class="attribution-header-label">${attribution}</label>`;
|
||||
|
|
@ -144,7 +145,8 @@ export default function DHApplicationMixin(Base) {
|
|||
* Refresh the custom parts of the application frame
|
||||
*/
|
||||
refreshFrame() {
|
||||
if (this.document.system.metadata.hasAttribution) {
|
||||
const headerAttribution = !['environment'].includes(this.document.type);
|
||||
if (this.document.system.metadata.hasAttribution && headerAttribution) {
|
||||
const { source, page } = this.document.system.attribution;
|
||||
const attribution = [source, page ? `pg ${page}.` : null].filter(x => x).join('. ');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue