journal-to-canvas-slideshow/templates/tile-list-item.hbs

89 lines
4.0 KiB
Handlebars
Raw Normal View History

2024-01-28 15:59:53 -06:00
<li
class="tile-list-item |
interactive flexcol flex-justify-stretch padding-small slight-rounded |
hover-border focus-border focus-reveal hover-reveal flow"
tabindex="-1"
data-id="{{this.id}}"
data-type="{{this.type}}"
data-frame-id="{{this.linkedBoundingTile}}"
data-display-name="{{this.displayName}}"
data-missing="{{this.missing}}"
data-hover-action="itemActions.hover.actions.highlightItemAndTile"
{{#if (eq this.type "art")}}
data-action="itemActions.click.actions.setAsDefault"
{{#if (eq this.id @root.defaultArtTileID)}}
data-is-default="true"
{{/if}}
{{/if}}
>
<header class="flex-row flex-nowrap flex-justify-space-between gap-medium">
{{> (dynamicPartial "input-with-error")
name="displayName"
label="Display Name"
changeAction="itemActions.change.actions.setDisplayName"
id=this.displayName
value=this.displayName
}}
<div class="[ actions ] [ focus-reveal--child hover-reveal--child ]">
{{#with @root.settingsData}}
{{#each (filter itemActions.click.actions "renderOnMissing" ../missing)}}
{{#unless (checkAll "any" true overflow renderNever)}}
{{> (dynamicPartial "icon-button")
action=(concat "itemActions.click.actions" "." @key)
name=(concat
@root.settingsData.itemActions.click.propertyString "." @key)
icon=this.icon
tooltipText=this.tooltipText
extraClass=this.extraClass
}}
{{/unless}}
{{/each}}
{{/with}}
</div>
</header>
<footer class="footer flex-column flex-justify-between gap-small">
{{#if (eq this.type "art")}}
<div class="connectedTiles flex-row" data-title="">
<div class="form-group has-floating-label">
<label class="floating-label" for="linkedBoundingTile">Frame</label>
<select name="linkedBoundingTile" id="linkedBoundingTile" data-change-action="itemActions.change.actions.setFrameTile">
<option value=""> Use Canvas As Frame </option>
{{#each this.allFrameTiles as |boundingTile|}}
<option data-hover-action="highlightTile" data-id="{{boundingTile.id}}"
{{#if (eq boundingTile.missing true)}}
disabled
{{/if}}
value="{{boundingTile.id}}"
{{#if (eq ../linkedBoundingTile boundingTile.id)}}
selected
{{/if}}>
{{#if (eq boundingTile.missing true)}}
<i class="fas fa-unlink"></i>
{{/if}}
{{boundingTile.displayName}}
</option>
{{/each}}
</select>
</div>
</div>
{{/if}}
{{#if (eq this.missing true)}}
{{> (dynamicPartial "notification-badge")
notificationType="warning"
message="Gallery data not linked to scene tile"
icon="fas fa-unlink"
hoverMessage="Try buttons on right for linking options"
}}
{{/if}}
{{#if (eq this.id @root.defaultArtTileID)}}
{{> (dynamicPartial "badge")
icon="fas fa-star"
message="default"
hoverMessage="Art will default to displaying on this tile, unless another tile is chosen"
}}
{{/if}}
</footer>
</li>