mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Fix chat messages with list items or weapon/armor features (#2081)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
783505da0a
commit
3faf588e6c
6 changed files with 42 additions and 68 deletions
|
|
@ -143,7 +143,7 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
||||||
/**
|
/**
|
||||||
* Gets the enriched and augmented description for the item.
|
* Gets the enriched and augmented description for the item.
|
||||||
* @param {object} [options] - Options that modify the styling of the rendered template. { headerStyle: undefined|'none'|'large' }
|
* @param {object} [options] - Options that modify the styling of the rendered template. { headerStyle: undefined|'none'|'large' }
|
||||||
* @returns {string}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
async getEnrichedDescription() {
|
async getEnrichedDescription() {
|
||||||
if (!this.metadata.hasDescription) return '';
|
if (!this.metadata.hasDescription) return '';
|
||||||
|
|
|
||||||
|
|
@ -208,10 +208,7 @@ export default class DHItem extends foundry.documents.Item {
|
||||||
tags: this._getTags()
|
tags: this._getTags()
|
||||||
},
|
},
|
||||||
actions: item.system.actionsList,
|
actions: item.system.actionsList,
|
||||||
description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.system.description, {
|
description: await this.system.getEnrichedDescription()
|
||||||
relativeTo: this.parent,
|
|
||||||
rollData: this.parent?.getRollData() ?? {}
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const msg = {
|
const msg = {
|
||||||
|
|
|
||||||
|
|
@ -163,37 +163,7 @@
|
||||||
}
|
}
|
||||||
.inventory-description {
|
.inventory-description {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
.typography();
|
||||||
h1 {
|
|
||||||
font-size: var(--font-size-32);
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: var(--font-size-28);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: var(--font-size-20);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
font-size: var(--font-size-16);
|
|
||||||
color: @beige;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul,
|
|
||||||
ol {
|
|
||||||
margin: 1rem 0;
|
|
||||||
padding: 0 0 0 1.25rem;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-bottom: 0.25rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
list-style: disc;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-resources {
|
.item-resources {
|
||||||
|
|
|
||||||
|
|
@ -14,36 +14,7 @@
|
||||||
}
|
}
|
||||||
.editor-content {
|
.editor-content {
|
||||||
.with-scroll-shadows();
|
.with-scroll-shadows();
|
||||||
h1 {
|
.typography();
|
||||||
font-size: var(--font-size-32);
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: var(--font-size-28);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: var(--font-size-20);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
font-size: var(--font-size-16);
|
|
||||||
color: light-dark(@dark, @beige);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul,
|
|
||||||
ol {
|
|
||||||
margin: 1rem 0;
|
|
||||||
padding: 0 0 0 1.25rem;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-bottom: 0.25rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
list-style: disc;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Fixes centering and makes it not render over scrollbar
|
// Fixes centering and makes it not render over scrollbar
|
||||||
&:hover button.toggle:enabled {
|
&:hover button.toggle:enabled {
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
padding: 8px;
|
padding: 0;
|
||||||
|
margin: 8px;
|
||||||
|
.typography();
|
||||||
}
|
}
|
||||||
|
|
||||||
.ability-card-footer {
|
.ability-card-footer {
|
||||||
|
|
|
||||||
|
|
@ -203,4 +203,38 @@
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
scrollbar-gutter: stable;
|
scrollbar-gutter: stable;
|
||||||
.with-scroll-shadows();
|
.with-scroll-shadows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Typography stylings for most longform text, usually item descriptions */
|
||||||
|
.typography() {
|
||||||
|
h1 {
|
||||||
|
font-size: var(--font-size-32);
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
font-size: var(--font-size-28);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-size: var(--font-size-20);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-size: var(--font-size-16);
|
||||||
|
color: light-dark(@dark, @beige);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul,
|
||||||
|
ol {
|
||||||
|
margin: 1rem 0;
|
||||||
|
padding: 0 0 0 1.25rem;
|
||||||
|
|
||||||
|
li {
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
list-style: disc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue