mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Bug/103 enrich htmlfield content before its used in applications (#369)
* FIX: Add enritch to HTMLField FIX: Remove no-HTMLField from Manifest FIX: Convert Scar's HTMLField to StringField FIX: Remove unused HTMLField * REMOVE unused hanldebars helpers * FEAT: add inventory-fieldset-items-V2 and inventory-item-V2 partials for Actors * FIX showLabels to hideTags * FEAT: add template to items sheet * FEAT: add effects tabs on ItemSheet * FEAT: add context menus for all inventory-items * FEAT: add resources to inventory-item template * FEAT: add enritch on inventory-item description FEAT: add extensible behavior on inventory-item-content FEAT: add fade effect on item-img to roll-itmg * FEAT: add eritch to NPC description FIX: missing htmlFieldss on manfiest FIX: add misisng localizations * FIX_ minor fixes * Little resource fix. Noone will notice ._. * FIX: remove default list styles FIX: .extended css reduce max-height, shorten animation duration to 0.5s, and set overflow to auto. FIX: set enriched=notes.enriche on notes.hbs FIX: set experience.value on sidebar.hbs FIX: move tooltip from item-img to img-portrait on inventory-item-V2.hbs REMOVE: unused files --------- Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com> Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
615df65415
commit
b8930b18a4
61 changed files with 1768 additions and 1434 deletions
|
|
@ -26,11 +26,11 @@
|
|||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.backgroundTitle'}}</legend>
|
||||
{{formInput systemFields.biography.fields.background value=source.system.biography.background enriched=source.system.biography.background localize=true toggled=true}}
|
||||
{{formInput background.field value=background.value enriched=background.enriched toggled=true}}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.connectionsTitle'}}</legend>
|
||||
{{formInput systemFields.biography.fields.connections value=source.system.biography.connections enriched=source.system.biography.connections localize=true toggled=true}}
|
||||
{{formInput connections.field value=connections.value enriched=connections.enriched toggled=true}}
|
||||
</fieldset>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -1,8 +1,21 @@
|
|||
<section
|
||||
class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}'
|
||||
data-tab='{{tabs.effects.id}}'
|
||||
data-group='{{tabs.effects.group}}'
|
||||
>
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.GENERAL.activeEffects') type='effect'}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'DAGGERHEART.GENERAL.inactiveEffects') type='effect'}}
|
||||
<section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
|
||||
data-group='{{tabs.effects.group}}'>
|
||||
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.activeEffects'
|
||||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
}}
|
||||
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.inactiveEffects'
|
||||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
}}
|
||||
</section>
|
||||
|
|
@ -1,13 +1,25 @@
|
|||
<section
|
||||
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
|
||||
data-tab='{{tabs.features.id}}'
|
||||
data-group='{{tabs.features.group}}'
|
||||
>
|
||||
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
|
||||
data-group='{{tabs.features.group}}'>
|
||||
<div class="features-sections">
|
||||
{{#each document.system.sheetLists}}
|
||||
{{#if this.values}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=this.title values=this.values}}
|
||||
{{/if}}
|
||||
{{#each document.system.sheetLists as |category|}}
|
||||
{{#if (eq category.type 'feature' )}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title=category.title
|
||||
type='feature'
|
||||
collection=category.values
|
||||
canCreate=true
|
||||
showActions=true
|
||||
}}
|
||||
{{else if category.values}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title=category.title
|
||||
type='feature'
|
||||
collection=category.values
|
||||
canCreate=false
|
||||
showActions=true
|
||||
}}
|
||||
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -29,25 +29,25 @@
|
|||
<div class="character-details">
|
||||
<div>
|
||||
{{#if document.system.class.value}}
|
||||
<span data-action="editDoc" data-type="Item" data-doc-id="{{document.system.class.value.id}}">{{document.system.class.value.name}}</span>
|
||||
<span data-action="editDoc" data-item-uuid="{{document.system.class.value.uuid}}">{{document.system.class.value.name}}</span>
|
||||
{{else}}
|
||||
<span data-action="openPack" data-key="daggerheart.classes">{{localize 'TYPES.Item.class'}}</span>
|
||||
{{/if}}
|
||||
<span class="dot">•</span>
|
||||
{{#if document.system.class.subclass}}
|
||||
<span data-action="editDoc" data-type="Item" data-doc-id="{{document.system.class.subclass.id}}">{{document.system.class.subclass.name}}</span>
|
||||
<span data-action="editDoc" data-item-uuid="{{document.system.class.subclass.uuid}}">{{document.system.class.subclass.name}}</span>
|
||||
{{else}}
|
||||
<span data-action="openPack" data-key="daggerheart.subclass">{{localize 'TYPES.Item.subclass'}}</span>
|
||||
{{/if}}
|
||||
<span class="dot">•</span>
|
||||
{{#if document.system.community}}
|
||||
<span data-action="editDoc" data-type="Item" data-doc-id="{{document.system.community.id}}">{{document.system.community.name}}</span>
|
||||
<span data-action="editDoc" data-item-uuid="{{document.system.community.uuid}}">{{document.system.community.name}}</span>
|
||||
{{else}}
|
||||
<span data-action="openPack" data-key="daggerheart.community">{{localize 'TYPES.Item.community'}}</span>
|
||||
{{/if}}
|
||||
<span class="dot">•</span>
|
||||
{{#if document.system.ancestry}}
|
||||
<span data-action="editDoc" data-type="Item" data-doc-id="{{document.system.ancestry.id}}">{{document.system.ancestry.name}}</span>
|
||||
<span data-action="editDoc" data-item-uuid="{{document.system.ancestry.uuid}}">{{document.system.ancestry.name}}</span>
|
||||
{{else}}
|
||||
<span data-action="openPack" data-key="daggerheart.ancestry">{{localize 'TYPES.Item.ancestry'}}</span>
|
||||
{{/if}}
|
||||
|
|
@ -56,13 +56,13 @@
|
|||
{{#if document.system.multiclass.value}}
|
||||
<div class="multiclass">
|
||||
{{#if document.system.multiclass.value}}
|
||||
<span data-action="editDoc" data-type="Item" data-doc-id="{{document.system.multiclass.value.id}}">{{document.system.multiclass.value.name}}</span>
|
||||
<span data-action="editDoc"data-item-uuid="{{document.system.multiclass.value.uuid}}">{{document.system.multiclass.value.name}}</span>
|
||||
{{else}}
|
||||
<span data-action="openPack" data-key="daggerheart.classes">{{localize 'DAGGERHEART.GENERAL.multiclass'}}</span>
|
||||
{{/if}}
|
||||
<span class="dot">•</span>
|
||||
{{#if document.system.multiclass.subclass}}
|
||||
<span data-action="editDoc" data-type="Item" data-doc-id="{{document.system.multiclass.subclass.id}}">{{document.system.multiclass.subclass.name}}</span>
|
||||
<span data-action="editDoc" data-item-uuid="{{document.system.multiclass.subclass.uuid}}">{{document.system.multiclass.subclass.name}}</span>
|
||||
{{else}}
|
||||
<span data-action="openPack" data-key="daggerheart.subclass">{{localize 'TYPES.Item.subclass'}}</span>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<section
|
||||
class='tab {{tabs.inventory.cssClass}} {{tabs.inventory.id}}'
|
||||
data-tab='{{tabs.inventory.id}}'
|
||||
data-group='{{tabs.inventory.group}}'
|
||||
>
|
||||
<section class='tab {{tabs.inventory.cssClass}} {{tabs.inventory.id}}' data-tab='{{tabs.inventory.id}}'
|
||||
data-group='{{tabs.inventory.group}}'>
|
||||
<div class="search-section">
|
||||
<div class="search-bar">
|
||||
<div class="icon">
|
||||
|
|
@ -14,31 +11,61 @@
|
|||
<i class="fa-solid fa-filter"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="items-section">
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.weapon') type='weapon' isGlassy=true}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.armor') type='armor' isGlassy=true}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.consumable') type='consumable' isGlassy=true}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs' title=(localize 'TYPES.Item.miscellaneous') type='miscellaneous' isGlassy=true}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='TYPES.Item.weapon'
|
||||
type='weapon'
|
||||
collection=document.itemTypes.weapon
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='TYPES.Item.armor'
|
||||
type='armor'
|
||||
collection=document.itemTypes.armor
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
hideResources=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='TYPES.Item.consumable'
|
||||
type='consumable'
|
||||
collection=document.itemTypes.consumable
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='TYPES.Item.miscellaneous'
|
||||
type='miscellaneous'
|
||||
collection=document.itemTypes.miscellaneous
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div class="currency-section">
|
||||
<div class="currency-section">
|
||||
<div class="input">
|
||||
<span>{{localize this.inventory.currency.coins}}</span>
|
||||
{{formInput systemFields.gold.fields.coins value=source.system.gold.coins enriched=source.system.gold.coins localize=true toggled=true}}
|
||||
{{formInput systemFields.gold.fields.coins value=source.system.gold.coins enriched=source.system.gold.coins
|
||||
localize=true toggled=true}}
|
||||
</div>
|
||||
<div class="input">
|
||||
<span>{{localize this.inventory.currency.handfulls}}</span>
|
||||
{{formInput systemFields.gold.fields.handfulls value=source.system.gold.handfulls enriched=source.system.gold.handfulls localize=true toggled=true}}
|
||||
{{formInput systemFields.gold.fields.handfulls value=source.system.gold.handfulls
|
||||
enriched=source.system.gold.handfulls localize=true toggled=true}}
|
||||
</div>
|
||||
<div class="input">
|
||||
<span>{{localize this.inventory.currency.bags}}</span>
|
||||
{{formInput systemFields.gold.fields.bags value=source.system.gold.bags enriched=source.system.gold.bags localize=true toggled=true}}
|
||||
{{formInput systemFields.gold.fields.bags value=source.system.gold.bags enriched=source.system.gold.bags
|
||||
localize=true toggled=true}}
|
||||
</div>
|
||||
<div class="input">
|
||||
<span>{{localize this.inventory.currency.chests}}</span>
|
||||
{{formInput systemFields.gold.fields.chests value=source.system.gold.chests enriched=source.system.gold.chests localize=true toggled=true}}
|
||||
{{formInput systemFields.gold.fields.chests value=source.system.gold.chests
|
||||
enriched=source.system.gold.chests localize=true toggled=true}}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -10,28 +10,33 @@
|
|||
<a class="filter-button">
|
||||
<i class="fa-solid fa-filter"></i>
|
||||
</a>
|
||||
<button type="button" class="btn-toggle-view" data-action="toggleLoadoutView" data-value="{{listView}}">
|
||||
<span class="{{ifThen listView 'list-active' ''}} list-icon">
|
||||
<button type="button" class="btn-toggle-view" data-action="toggleLoadoutView" data-value="{{not cardView}}">
|
||||
<span class="{{ifThen cardView '' 'list-active'}} list-icon">
|
||||
<i class="fa-solid fa-bars"></i>
|
||||
</span>
|
||||
<span class="{{ifThen listView '' 'grid-active'}} grid-icon">
|
||||
<span class="{{ifThen cardView 'grid-active' ''}} grid-icon">
|
||||
<i class="fa-solid fa-grip"></i>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="items-section">
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs'
|
||||
title=(localize 'DAGGERHEART.GENERAL.Tabs.loadout')
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.Tabs.loadout'
|
||||
type='domainCard'
|
||||
isGlassy=true
|
||||
cardView=(ifThen listView "list" "card")}}
|
||||
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-fieldset-items.hbs'
|
||||
title=(localize 'DAGGERHEART.GENERAL.Tabs.vault')
|
||||
cardView=cardView
|
||||
collection=document.system.domainCards.loadout
|
||||
canCreate=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.Tabs.vault'
|
||||
type='domainCard'
|
||||
isVault=true
|
||||
isGlassy=true
|
||||
cardView=(ifThen listView "list" "card")}}
|
||||
cardView=cardView
|
||||
collection=document.system.domainCards.vault
|
||||
canCreate=true
|
||||
inVault=true
|
||||
}}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -1,14 +1,16 @@
|
|||
<aside class="character-sidebar-sheet">
|
||||
<div class="portrait {{#if isDeath}}death-roll{{/if}}">
|
||||
<img src="{{document.img}}" alt="{{document.name}}" data-action='editImage' data-edit="img">
|
||||
<a class="death-roll-btn" data-tooltip="{{localize "DAGGERHEART.UI.Tooltip.makeDeathMove"}}" {{#if isDeath}}data-action="makeDeathMove"{{/if}}><i class="fas fa-skull death-save" ></i></a>
|
||||
<a class="death-roll-btn" data-tooltip="DAGGERHEART.UI.Tooltip.makeDeathMove" {{#if
|
||||
isDeath}}data-action="makeDeathMove" {{/if}}><i class="fas fa-skull death-save"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info-section">
|
||||
<div class="resources-section">
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<p><input class="bar-input" name="system.resources.hitPoints.value" value="{{document.system.resources.hitPoints.value}}" type="number"></p>
|
||||
<p><input class="bar-input" name="system.resources.hitPoints.value"
|
||||
value="{{document.system.resources.hitPoints.value}}" type="number"></p>
|
||||
<p>/</p>
|
||||
<p class="bar-label">{{document.system.resources.hitPoints.max}}</p>
|
||||
</div>
|
||||
|
|
@ -20,11 +22,12 @@
|
|||
<div class="status-label">
|
||||
<h4>HP</h4>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="status-bar">
|
||||
<div class='status-value'>
|
||||
<p><input class="bar-input" name="system.resources.stress.value" value="{{document.system.resources.stress.value}}" type="number"></p>
|
||||
<p><input class="bar-input" name="system.resources.stress.value"
|
||||
value="{{document.system.resources.stress.value}}" type="number"></p>
|
||||
<p>/</p>
|
||||
<p class="bar-label">{{document.system.resources.stress.max}}</p>
|
||||
</div>
|
||||
|
|
@ -87,51 +90,65 @@
|
|||
</div>
|
||||
<div class="equipment-section">
|
||||
<div class="title">
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<h3>Equipment</h3>
|
||||
<side-line-div></side-line-div>
|
||||
</div>
|
||||
<ul class="items-sidebar-list">
|
||||
{{#each document.items as |item|}}
|
||||
{{#if item.system.equipped}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=item.type isSidebar=true}}
|
||||
{{/if}}
|
||||
{{#if item.system.equipped}}
|
||||
{{> 'daggerheart.inventory-item'
|
||||
item=item
|
||||
type=item.type
|
||||
hideTags=true
|
||||
hideDescription=true
|
||||
hideResources=true
|
||||
noExtensible=true
|
||||
}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="loadout-section">
|
||||
<div class="title">
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<h3>Loadout</h3>
|
||||
<side-line-div></side-line-div>
|
||||
</div>
|
||||
<ul class="items-sidebar-list">
|
||||
{{#each document.items as |item|}}
|
||||
{{#if (eq item.type 'domainCard')}}
|
||||
{{#unless item.system.inVault}}
|
||||
{{> 'systems/daggerheart/templates/sheets/global/partials/inventory-item.hbs' item=item type=item.type isSidebar=true}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#each document.system.domainCards.loadout as |card|}}
|
||||
{{> 'daggerheart.inventory-item'
|
||||
item=card
|
||||
type='domainCard'
|
||||
hideTags=true
|
||||
hideDescription=true
|
||||
hideResources=true
|
||||
noExtensible=true
|
||||
}}
|
||||
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="experience-section">
|
||||
<div class="title">
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<h3>Experience</h3>
|
||||
<side-line-div></side-line-div>
|
||||
</div>
|
||||
<div class="experience-list">
|
||||
{{#each document.system.experiences as |experience id|}}
|
||||
<div class="experience-row">
|
||||
<div class="experience-value">
|
||||
+{{experience.value}}
|
||||
</div>
|
||||
<input name="{{concat "system.experiences." id ".name"}}" data-experience={{id}} value="{{experience.name}}" type="text" />
|
||||
<div class="controls">
|
||||
<a data-action="toChat" data-type="experience" data-uuid="{{id}}"><i class="fa-regular fa-message"></i></a>
|
||||
</div>
|
||||
<div class="experience-row">
|
||||
<div class="experience-value">
|
||||
+{{experience.total}}
|
||||
</div>
|
||||
<input name="system.experiences.{{id}}.name" data-experience={{id}}
|
||||
value="{{experience.name}}" type="text" />
|
||||
<div class="controls">
|
||||
<a data-action="sendExpToChat" data-type="experience" data-id="{{id}}">
|
||||
<i class="fa-regular fa-message"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue