mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
Update inventory controls and permissions filtering
This commit is contained in:
parent
4b92001f97
commit
bff18cee27
21 changed files with 158 additions and 160 deletions
|
|
@ -3233,6 +3233,7 @@
|
|||
"Tooltip": {
|
||||
"disableEffect": "Disable Effect",
|
||||
"enableEffect": "Enable Effect",
|
||||
"edit": "Edit",
|
||||
"openItemWorld": "Open Item World",
|
||||
"openActorWorld": "Open Actor World",
|
||||
"sendToChat": "Send to Chat",
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
static DEFAULT_OPTIONS = {
|
||||
classes: ['character'],
|
||||
position: { width: 850, height: 800 },
|
||||
/* Foundry adds disabled to all buttons and inputs if editPermission is missing. This is not desired. */
|
||||
editPermission: CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
||||
actions: {
|
||||
toggleVault: CharacterSheet.#toggleVault,
|
||||
rollAttribute: CharacterSheet.#rollAttribute,
|
||||
|
|
@ -68,7 +66,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
}
|
||||
},
|
||||
{
|
||||
handler: CharacterSheet.#getEquipamentContextOptions,
|
||||
handler: CharacterSheet.#getEquipmentContextOptions,
|
||||
selector: '[data-item-uuid][data-type="armor"], [data-item-uuid][data-type="weapon"]',
|
||||
options: {
|
||||
parentClassHooks: false,
|
||||
|
|
@ -170,6 +168,16 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
return applicationOptions;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
_toggleDisabled(disabled) {
|
||||
// Overriden to only disable text inputs by default.
|
||||
// Everything else is done by checking @root.editable in the sheet
|
||||
const form = this.form;
|
||||
for (const input of form.querySelectorAll("input:not([type=search])")) {
|
||||
input.disabled = disabled;
|
||||
}
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
async _onRender(context, options) {
|
||||
await super._onRender(context, options);
|
||||
|
|
@ -391,14 +399,14 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
* @this {CharacterSheet}
|
||||
* @protected
|
||||
*/
|
||||
static #getEquipamentContextOptions() {
|
||||
static #getEquipmentContextOptions() {
|
||||
const options = [
|
||||
{
|
||||
name: 'equip',
|
||||
icon: 'fa-solid fa-hands',
|
||||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc && !doc.system.equipped;
|
||||
return doc.isOwner && doc && !doc.system.equipped;
|
||||
},
|
||||
callback: (target, event) => CharacterSheet.#toggleEquipItem.call(this, event, target)
|
||||
},
|
||||
|
|
@ -407,7 +415,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
icon: 'fa-solid fa-hands',
|
||||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc && doc.system.equipped;
|
||||
return doc.isOwner && doc && doc.system.equipped;
|
||||
},
|
||||
callback: (target, event) => CharacterSheet.#toggleEquipItem.call(this, event, target)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ export default function DHApplicationMixin(Base) {
|
|||
const doc = getDocFromElementSync(target);
|
||||
return (
|
||||
(!dataset.noCompendiumEdit && !doc) ||
|
||||
(doc && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection))
|
||||
(doc?.isOwner && (!doc?.hasOwnProperty('systemPath') || doc?.inCollection))
|
||||
);
|
||||
},
|
||||
callback: async target => (await getDocFromElement(target)).sheet.render({ force: true })
|
||||
|
|
@ -489,6 +489,7 @@ export default function DHApplicationMixin(Base) {
|
|||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return (
|
||||
doc?.isOwner &&
|
||||
!foundry.utils.isEmpty(doc?.system?.attack?.damage.parts) ||
|
||||
!foundry.utils.isEmpty(doc?.damage?.parts)
|
||||
);
|
||||
|
|
@ -511,7 +512,7 @@ export default function DHApplicationMixin(Base) {
|
|||
icon: 'fa-solid fa-burst',
|
||||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc && !(doc.type === 'domainCard' && doc.system.inVault);
|
||||
return doc?.isOwner && !(doc.type === 'domainCard' && doc.system.inVault);
|
||||
},
|
||||
callback: async (target, event) => (await getDocFromElement(target)).use(event)
|
||||
});
|
||||
|
|
@ -530,7 +531,8 @@ export default function DHApplicationMixin(Base) {
|
|||
icon: 'fa-solid fa-trash',
|
||||
condition: element => {
|
||||
const target = element.closest('[data-item-uuid]');
|
||||
return target.dataset.itemType !== 'beastform';
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc?.isOwner && target.dataset.itemType !== 'beastform';
|
||||
},
|
||||
callback: async (target, event) => {
|
||||
const doc = await getDocFromElement(target);
|
||||
|
|
|
|||
|
|
@ -11,21 +11,6 @@
|
|||
padding-bottom: 0;
|
||||
overflow-x: auto;
|
||||
|
||||
&.viewMode {
|
||||
button:not(.btn-toggle-view),
|
||||
input:not(.search),
|
||||
.controls,
|
||||
.character-sidebar-sheet,
|
||||
.img-portait,
|
||||
.name-row,
|
||||
.hope-section,
|
||||
.downtime-section,
|
||||
.character-traits,
|
||||
.card-list {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.character-sidebar-sheet {
|
||||
grid-row: 1 / span 2;
|
||||
grid-column: 1;
|
||||
|
|
|
|||
|
|
@ -316,9 +316,9 @@
|
|||
border-radius: 3px;
|
||||
background: light-dark(@dark-blue, @golden);
|
||||
clip-path: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
border: 1px solid transparent;
|
||||
transition: all 0.3s ease;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
type='feature'
|
||||
collection=@root.features
|
||||
hideContextMenu=true
|
||||
canCreate=true
|
||||
showActions=true
|
||||
canCreate=@root.editable
|
||||
showActions=@root.editable
|
||||
}}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
disabled=true
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
type='feature'
|
||||
actorType='character'
|
||||
collection=category.values
|
||||
canCreate=true
|
||||
showActions=true
|
||||
canCreate=@root.editable
|
||||
showActions=@root.editable
|
||||
}}
|
||||
{{else if category.values}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
actorType='character'
|
||||
collection=category.values
|
||||
canCreate=false
|
||||
showActions=true
|
||||
showActions=@root.editable
|
||||
}}
|
||||
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -4,22 +4,24 @@
|
|||
<h1 class="actor-name input" contenteditable="plaintext-only" data-property="name" placeholder="{{localize "DAGGERHEART.GENERAL.actorName"}}">{{source.name}}</h1>
|
||||
<div class='level-div'>
|
||||
<h3 class='label'>
|
||||
{{#if document.system.needsCharacterSetup}}
|
||||
<button
|
||||
type="button"
|
||||
class="level-button glow"
|
||||
data-action="levelManagement"
|
||||
>
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.buttonTitle"}}
|
||||
</button>
|
||||
{{else if document.system.levelData.canLevelUp}}
|
||||
<button
|
||||
type="button"
|
||||
class="level-button glow" data-tooltip="{{localize "DAGGERHEART.ACTORS.Character.levelUp"}}"
|
||||
data-action="levelManagement"
|
||||
>
|
||||
<i class="fa-solid fa-angles-up"></i>
|
||||
</button>
|
||||
{{#if @root.editable}}
|
||||
{{#if document.system.needsCharacterSetup}}
|
||||
<button
|
||||
type="button"
|
||||
class="level-button glow"
|
||||
data-action="levelManagement"
|
||||
>
|
||||
{{localize "DAGGERHEART.APPLICATIONS.CharacterCreation.buttonTitle"}}
|
||||
</button>
|
||||
{{else if document.system.levelData.canLevelUp}}
|
||||
<button
|
||||
type="button"
|
||||
class="level-button glow" data-tooltip="{{localize "DAGGERHEART.ACTORS.Character.levelUp"}}"
|
||||
data-action="levelManagement"
|
||||
>
|
||||
<i class="fa-solid fa-angles-up"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#unless document.system.needsCharacterSetup}}
|
||||
{{localize 'DAGGERHEART.GENERAL.level'}}
|
||||
|
|
@ -110,12 +112,14 @@
|
|||
<i class="fa-solid fa-fw fa-users"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
<button type="button" data-action="useDowntime" data-type="shortRest" data-tooltip="DAGGERHEART.APPLICATIONS.Downtime.shortRest.title">
|
||||
<i class="fa-solid fa-fw fa-utensils"></i>
|
||||
</button>
|
||||
<button type="button" data-action="useDowntime" data-type="longRest" data-tooltip="DAGGERHEART.APPLICATIONS.Downtime.longRest.title">
|
||||
<i class="fa-solid fa-fw fa-bed"></i>
|
||||
</button>
|
||||
{{#if @root.editable}}
|
||||
<button type="button" data-action="useDowntime" data-type="shortRest" data-tooltip="DAGGERHEART.APPLICATIONS.Downtime.shortRest.title">
|
||||
<i class="fa-solid fa-fw fa-utensils"></i>
|
||||
</button>
|
||||
<button type="button" data-action="useDowntime" data-type="longRest" data-tooltip="DAGGERHEART.APPLICATIONS.Downtime.longRest.title">
|
||||
<i class="fa-solid fa-fw fa-bed"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
type='weapon'
|
||||
collection=@root.inventory.weapons
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
type='armor'
|
||||
collection=@root.inventory.armor
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
type='consumable'
|
||||
collection=@root.inventory.consumables
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
isQuantifiable=true
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
|
|
@ -46,8 +46,8 @@
|
|||
type='loot'
|
||||
collection=@root.inventory.loot
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
showActions=true
|
||||
canCreate=@root.editable
|
||||
showActions=@root.editable
|
||||
isQuantifiable=true
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
isGlassy=true
|
||||
cardView=cardView
|
||||
collection=document.system.domainCards.loadout
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
}}
|
||||
{{> 'daggerheart.inventory-items'
|
||||
title='DAGGERHEART.GENERAL.Tabs.vault'
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
isGlassy=true
|
||||
cardView=cardView
|
||||
collection=document.system.domainCards.vault
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
inVault=true
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@
|
|||
</a>
|
||||
{{/times}}
|
||||
</div>
|
||||
<a class="slot-label" data-action="toggleArmorMangement">
|
||||
<a class="slot-label" data-action="toggleArmorMangement" {{disabled (not @root.editable)}}>
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.armorSlots"}}</span>
|
||||
<div class="slot-value-container">
|
||||
<span class="value">{{document.system.armorScore.value}} / {{document.system.armorScore.max}}</span>
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
{{#if @root.editable}}<i class="fa-solid fa-gear" inert></i>{{/if}}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -64,9 +64,9 @@
|
|||
value='{{document.system.armorScore.value}}'
|
||||
max='{{document.system.armorScore.max}}'
|
||||
></progress>
|
||||
<a class="status-label" data-action="toggleArmorMangement">
|
||||
<a class="status-label" data-action="toggleArmorMangement" {{disabled (not @root.editable)}}>
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.armorSlots"}}</h4>
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
{{#if @root.editable}}<i class="fa-solid fa-gear" inert></i>{{/if}}
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
type='feature'
|
||||
collection=@root.features
|
||||
hideContextMenu=true
|
||||
canCreate=true
|
||||
showActions=true
|
||||
canCreate=@root.editable
|
||||
showActions=@root.editable
|
||||
}}
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
actorType='party'
|
||||
collection=@root.inventory.weapons
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
hideContextMenu=true
|
||||
isQuantifiable=true
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
actorType='party'
|
||||
collection=@root.inventory.armor
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
hideContextMenu=true
|
||||
isQuantifiable=true
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
actorType='party'
|
||||
collection=@root.inventory.consumables
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideContextMenu=true
|
||||
isQuantifiable=true
|
||||
}}
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
actorType='party'
|
||||
collection=@root.inventory.loot
|
||||
isGlassy=true
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideContextMenu=true
|
||||
isQuantifiable=true
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -52,12 +52,11 @@ Parameters:
|
|||
{{else}}
|
||||
<ul class="items-list">
|
||||
{{#each collection as |item|}}
|
||||
|
||||
{{> 'daggerheart.inventory-item'
|
||||
item=item
|
||||
type=../type
|
||||
disabledEffect=../disabledEffect
|
||||
actorType=../actorType
|
||||
actorType=(ifThen ../actorType ../actorType @root.document.type)
|
||||
hideControls=../hideControls
|
||||
hideContextMenu=../hideContextMenu
|
||||
isActor=../isActor
|
||||
|
|
|
|||
|
|
@ -71,66 +71,63 @@ Parameters:
|
|||
|
||||
{{!-- Controls --}}
|
||||
{{#unless hideControls}}
|
||||
<div class="controls">
|
||||
{{#if isActor}}
|
||||
<a data-action="editDoc" data-tooltip="DAGGERHEART.UI.Tooltip.openActorWorld">
|
||||
<i class="fa-solid fa-globe"></i>
|
||||
</a>
|
||||
{{#if (eq type 'adversary')}}
|
||||
<a data-action='deleteAdversary' data-category="{{categoryAdversary}}" data-tooltip="CONTROLS.CommonDelete">
|
||||
<i class='fas fa-trash'></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (eq type 'character')}}
|
||||
<a data-action='deletePartyMember' data-tooltip="CONTROLS.CommonDelete">
|
||||
<i class='fas fa-trash'></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#unless (eq actorType 'party')}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-hands"></i>
|
||||
</a>
|
||||
{{else if (eq type 'armor')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-fw fa-shield"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (eq type 'domainCard')}}
|
||||
<a data-action="toggleVault"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.inVault 'sendToLoadout' 'sendToVault' }}">
|
||||
<i class="fa-solid {{ifThen item.system.inVault 'fa-arrow-up' 'fa-arrow-down'}}"></i>
|
||||
</a>
|
||||
{{else if (and (eq type 'effect') (not (eq item.type 'beastform')))}}
|
||||
<a data-action="toggleEffect"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.disabled 'enableEffect' 'disableEffect' }}">
|
||||
<i class="{{ifThen item.disabled 'fa-solid fa-toggle-off' 'fa-solid fa-toggle-on'}}"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (hasProperty item "toChat")}}
|
||||
<a data-action="toChat" data-tooltip="DAGGERHEART.UI.Tooltip.sendToChat">
|
||||
<i class="fa-regular fa-fw fa-message"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<a data-action="editDoc" data-tooltip="DAGGERHEART.UI.Tooltip.openActorWorld">
|
||||
<i class="fa-solid fa-globe"></i>
|
||||
</a>
|
||||
<a data-action="deleteItem" data-tooltip="DAGGERHEART.UI.Tooltip.deleteItem">
|
||||
<i class="fa-solid fa-trash"></i>
|
||||
</a>
|
||||
{{/unless}}
|
||||
{{#unless hideContextMenu}}
|
||||
<a data-action="triggerContextMenu" data-tooltip="DAGGERHEART.UI.Tooltip.moreOptions">
|
||||
<i class="fa-solid fa-fw fa-ellipsis-vertical"></i>
|
||||
</a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
<div class="controls">
|
||||
{{!-- Toggle/Equip buttons --}}
|
||||
{{#if @root.editable}}
|
||||
{{#if (and (eq actorType 'character') (eq type 'weapon'))}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-hands" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (and (eq actorType 'character') (eq type 'armor'))}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-fw fa-shield" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (and (eq type 'domainCard'))}}
|
||||
<a data-action="toggleVault"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.inVault 'sendToLoadout' 'sendToVault' }}">
|
||||
<i class="fa-solid {{ifThen item.system.inVault 'fa-arrow-up' 'fa-arrow-down'}}" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if (and (and (eq type 'effect') (not (eq item.type 'beastform'))))}}
|
||||
<a data-action="toggleEffect"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.disabled 'enableEffect' 'disableEffect' }}">
|
||||
<i class="{{ifThen item.disabled 'fa-solid fa-toggle-off' 'fa-solid fa-toggle-on'}}" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{!-- Send to Chat --}}
|
||||
{{#if (hasProperty item "toChat")}}
|
||||
<a data-action="toChat" data-tooltip="DAGGERHEART.UI.Tooltip.sendToChat">
|
||||
<i class="fa-regular fa-fw fa-message" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
{{!-- Document management buttons or context menu --}}
|
||||
{{#if (and (not isActor) (not hideContextMenu))}}
|
||||
<a data-action="triggerContextMenu" data-tooltip="DAGGERHEART.UI.Tooltip.moreOptions">
|
||||
<i class="fa-solid fa-fw fa-ellipsis-vertical" inert></i>
|
||||
</a>
|
||||
{{else if @root.editable}}
|
||||
<a data-action="editDoc" data-tooltip="DAGGERHEART.UI.Tooltip.edit">
|
||||
<i class="fa-solid fa-edit" inert></i>
|
||||
</a>
|
||||
{{#if (not isActor)}}
|
||||
<a data-action="deleteItem" data-tooltip="DAGGERHEART.UI.Tooltip.deleteItem">
|
||||
<i class="fa-solid fa-trash" inert></i>
|
||||
</a>
|
||||
{{else if (eq type 'adversary')}}
|
||||
<a data-action='deleteAdversary' data-category="{{categoryAdversary}}" data-tooltip="CONTROLS.CommonDelete">
|
||||
<i class="fas fa-trash" inert></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
<div class="inventory-item-content{{#unless noExtensible}} extensible{{/unless}}">
|
||||
{{!-- Description --}}
|
||||
|
|
|
|||
|
|
@ -48,26 +48,28 @@
|
|||
</a>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-fw fa-hands"></i>
|
||||
</a>
|
||||
{{else if (eq type 'armor')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-fw fa-shield"></i>
|
||||
</a>
|
||||
{{else if (eq type 'domainCard')}}
|
||||
<a data-action="toggleVault"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.inVault 'sendToLoadout' 'sendToVault' }}">
|
||||
<i class="fa-solid fa-fw {{ifThen item.system.inVault 'fa-arrow-up' 'fa-arrow-down'}}"></i>
|
||||
</a>
|
||||
{{else if (eq type 'effect')}}
|
||||
<a data-action="toggleEffect"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.disabled 'enableEffect' 'disableEffect' }}">
|
||||
<i class="fa-solid fa-fw {{ifThen item.disabled 'fa-toggle-off' 'fa-toggle-on'}}"></i>
|
||||
</a>
|
||||
{{#if @root.editable}}
|
||||
{{#if (eq type 'weapon')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-fw fa-hands"></i>
|
||||
</a>
|
||||
{{else if (eq type 'armor')}}
|
||||
<a class="{{#unless item.system.equipped}}unequipped{{/unless}}" data-action="toggleEquipItem"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.equipped 'unequip' 'equip' }}">
|
||||
<i class="fa-solid fa-fw fa-shield"></i>
|
||||
</a>
|
||||
{{else if (eq type 'domainCard')}}
|
||||
<a data-action="toggleVault"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.system.inVault 'sendToLoadout' 'sendToVault' }}">
|
||||
<i class="fa-solid fa-fw {{ifThen item.system.inVault 'fa-arrow-up' 'fa-arrow-down'}}"></i>
|
||||
</a>
|
||||
{{else if (eq type 'effect')}}
|
||||
<a data-action="toggleEffect"
|
||||
data-tooltip="DAGGERHEART.UI.Tooltip.{{ifThen item.disabled 'enableEffect' 'disableEffect' }}">
|
||||
<i class="fa-solid fa-fw {{ifThen item.disabled 'fa-toggle-off' 'fa-toggle-on'}}"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (hasProperty item "toChat")}}
|
||||
<a data-action="toChat" data-tooltip="DAGGERHEART.UI.Tooltip.sendToChat">
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
title='DAGGERHEART.GENERAL.Action.plural'
|
||||
collection=document.system.actions
|
||||
type='action'
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
}}
|
||||
</section>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
type='effect'
|
||||
isGlassy=true
|
||||
collection=effects.actives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
disabledEffect=true
|
||||
isGlassy=true
|
||||
collection=effects.inactives
|
||||
canCreate=true
|
||||
canCreate=@root.editable
|
||||
hideResources=true
|
||||
}}
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue