mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 04:44:16 +02:00
Improved missing class visual for subclass
This commit is contained in:
parent
09a6b1480f
commit
05167b697a
3 changed files with 17 additions and 6 deletions
|
|
@ -44,9 +44,9 @@ export default class SubclassSheet extends DHBaseItemSheet {
|
|||
async _prepareContext(options) {
|
||||
const context = await super._prepareContext(options);
|
||||
if (this.document.system.linkedClass) {
|
||||
context.class = (await fromUuid(this.document.system.linkedClass)) ?? {
|
||||
const classData = await fromUuid(this.document.system.linkedClass);
|
||||
context.class = classData ?? {
|
||||
name: _loc('DAGGERHEART.GENERAL.missingX', { x: _loc('TYPES.Item.class') }),
|
||||
img: 'systems/daggerheart/assets/icons/documents/items/laurel-crown.svg',
|
||||
missing: true
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@
|
|||
border-radius: 6px;
|
||||
border: none;
|
||||
}
|
||||
.image-icon {
|
||||
font-size: 26px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.controls {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@
|
|||
{{#if class}}
|
||||
<div class="feature-list">
|
||||
<li class="feature-line">
|
||||
<img class="image" src="{{class.img}}" />
|
||||
<span>{{class.name}} {{#if class.missing}}<i class="fa-solid fa-link-slash" inert></i>{{/if}}</span>
|
||||
{{#unless class.missing}}
|
||||
{{#if class.missing}}
|
||||
<i class="fa-solid fa-link-slash hint image-icon" inert></i>
|
||||
<span class="hint">{{class.name}}</span>
|
||||
{{else}}
|
||||
<img class="image" src="{{class.img}}" />
|
||||
<span>{{class.name}}</span>
|
||||
<div class='controls'>
|
||||
<a
|
||||
class='effect-control'
|
||||
|
|
@ -21,7 +24,7 @@
|
|||
<i class="fa-solid fa-globe" inert></i>
|
||||
</a>
|
||||
</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</li>
|
||||
</div>
|
||||
{{else}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue