Add basic support for registering custom icons that override icons provided by the system/modules
This commit is contained in:
parent
c90137b18f
commit
c7541db1d9
9 changed files with 279 additions and 6 deletions
42
templates/StatusEffectIconConfig/effects.hbs
Normal file
42
templates/StatusEffectIconConfig/effects.hbs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<div class="scrollable">
|
||||
{{#if effects}}
|
||||
<ul class="effect-list">
|
||||
{{#each effects as | effect |}}
|
||||
<li class="effect" data-effect-id="{{ effect.id }}">
|
||||
<div class="preview">
|
||||
{{#if effect.preview}}
|
||||
<img
|
||||
src="{{effect.preview}}"
|
||||
alt=""
|
||||
>
|
||||
{{/if}}
|
||||
</div>
|
||||
<h2>{{ effect.name }}</h2>
|
||||
<file-picker
|
||||
value="{{effect.img}}"
|
||||
></file-picker>
|
||||
{{#if @root.showImageTaggerButton}}
|
||||
<button
|
||||
type="button"
|
||||
class="icon fa-solid fa-paintbrush"
|
||||
aria-label="{{localize "OFT.apps.StatusEffectIconConfig.select-using-image-tagger"}}"
|
||||
data-tooltip
|
||||
data-action="pickViaImageTagger"
|
||||
></button>
|
||||
{{/if}}
|
||||
{{#if effect.hasOverride}}
|
||||
<button
|
||||
type="button"
|
||||
class="icon fa-solid fa-xmark"
|
||||
aria-label="{{localize "OFT.apps.StatusEffectIconConfig.remove-override"}}"
|
||||
data-tooltip
|
||||
data-action="removeOverride"
|
||||
></button>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{else}}
|
||||
{{ localize "OFT.apps.StatusEffectIconConfig.no-status-effects" }}
|
||||
{{/if}}
|
||||
</div>
|
||||
5
templates/StatusEffectIconConfig/footer.hbs
Normal file
5
templates/StatusEffectIconConfig/footer.hbs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<div>
|
||||
<button type="submit">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue