Migrate Options to Settings and integrate GUI Builder
This commit is contained in:
@@ -21,17 +21,36 @@
|
||||
<button type="button" data-action="assignSelectedTokens" {{#unless selectedReaction}}disabled{{/unless}}>
|
||||
<i class="fa-solid fa-crosshairs"></i> {{localize "CONFIGURABLE_REACTIONS.Assignments.AssignSelectedTokens"}}
|
||||
</button>
|
||||
<button type="button" data-action="addStatusAction" {{#unless selectedReaction}}disabled{{/unless}}>
|
||||
<i class="fa-solid fa-circle-plus"></i> {{localize "CONFIGURABLE_REACTIONS.Actions.AddStatus"}}
|
||||
</button>
|
||||
<button type="button" data-action="addTeleportAction" {{#unless selectedReaction}}disabled{{/unless}}>
|
||||
<i class="fa-solid fa-circle-plus"></i> {{localize "CONFIGURABLE_REACTIONS.Actions.AddTeleport"}}
|
||||
</button>
|
||||
<button type="button" data-action="deleteReaction" {{#unless selectedReaction}}disabled{{/unless}}>
|
||||
<i class="fa-solid fa-trash"></i> {{localize "CONFIGURABLE_REACTIONS.Reactions.Delete"}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3>{{localize "CONFIGURABLE_REACTIONS.Builder.Palette"}}</h3>
|
||||
<p class="notes">{{localize "CONFIGURABLE_REACTIONS.Builder.DragHint"}}</p>
|
||||
|
||||
<h4>{{localize "CONFIGURABLE_REACTIONS.Builder.TriggerPalette"}}</h4>
|
||||
<div class="cr-palette">
|
||||
{{#each triggerPalette}}
|
||||
<article class="cr-palette-tile" data-cr-drag="trigger" data-cr-type="{{this.type}}" title="{{this.hint}}">
|
||||
<i class="{{this.icon}}"></i>
|
||||
<span>{{this.label}}</span>
|
||||
<code>{{this.type}}</code>
|
||||
</article>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<h4>{{localize "CONFIGURABLE_REACTIONS.Builder.ActionPalette"}}</h4>
|
||||
<div class="cr-palette">
|
||||
{{#each actionPalette}}
|
||||
<article class="cr-palette-tile" data-cr-drag="action" data-cr-type="{{this.type}}" title="{{this.hint}}">
|
||||
<i class="{{this.icon}}"></i>
|
||||
<span>{{this.label}}</span>
|
||||
<code>{{this.type}}</code>
|
||||
</article>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<h3>{{localize "CONFIGURABLE_REACTIONS.Assignments.Title"}}</h3>
|
||||
<ol class="cr-assignment-list">
|
||||
{{#each assignments}}
|
||||
@@ -50,8 +69,62 @@
|
||||
|
||||
<main class="cr-main">
|
||||
{{#if selectedReaction}}
|
||||
<section class="cr-card cr-basics">
|
||||
<div class="form-group">
|
||||
<label>{{localize "CONFIGURABLE_REACTIONS.Reactions.Name"}}</label>
|
||||
<input type="text" name="reactionName" value="{{selectedReaction.name}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "CONFIGURABLE_REACTIONS.Reactions.Enabled"}}</label>
|
||||
<input type="checkbox" name="reactionEnabled" {{#if selectedReaction.enabled}}checked{{/if}}>
|
||||
</div>
|
||||
<button type="button" data-action="saveReactionBasics">
|
||||
<i class="fa-solid fa-floppy-disk"></i> {{localize "CONFIGURABLE_REACTIONS.Common.Apply"}}
|
||||
</button>
|
||||
</section>
|
||||
|
||||
<section class="cr-builder-grid">
|
||||
<div class="cr-drop-card" data-cr-drop="trigger">
|
||||
<h3><i class="fa-solid fa-bolt"></i> {{localize "CONFIGURABLE_REACTIONS.Builder.TriggerArea"}}</h3>
|
||||
{{#if activeTrigger}}
|
||||
<div class="cr-flow-node cr-trigger-node">
|
||||
<i class="{{activeTrigger.icon}}"></i>
|
||||
<div>
|
||||
<strong>{{activeTrigger.label}}</strong>
|
||||
<code>{{selectedReaction.trigger.type}}</code>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<p class="cr-empty-drop">{{localize "CONFIGURABLE_REACTIONS.Builder.DropTriggerHere"}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="cr-drop-card" data-cr-drop="actions">
|
||||
<h3><i class="fa-solid fa-list-check"></i> {{localize "CONFIGURABLE_REACTIONS.Builder.ActionArea"}}</h3>
|
||||
{{#if visualActions.length}}
|
||||
<ol class="cr-action-flow">
|
||||
{{#each visualActions}}
|
||||
<li class="cr-flow-node cr-action-node" data-cr-drag="existingAction" data-action-index="{{this.index}}">
|
||||
<i class="{{this.icon}}"></i>
|
||||
<div>
|
||||
<strong>{{this.label}}</strong>
|
||||
<small>{{this.summary}}</small>
|
||||
<code>{{this.type}}</code>
|
||||
</div>
|
||||
<button type="button" data-action="removeAction" data-action-index="{{this.index}}" title="{{localize 'CONFIGURABLE_REACTIONS.Common.Remove'}}">
|
||||
<i class="fa-solid fa-xmark"></i>
|
||||
</button>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{else}}
|
||||
<p class="cr-empty-drop">{{localize "CONFIGURABLE_REACTIONS.Builder.DropActionHere"}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cr-reaction-summary">
|
||||
<h3>{{selectedReaction.name}}</h3>
|
||||
<h3>{{localize "CONFIGURABLE_REACTIONS.Reactions.JsonPreview"}}</h3>
|
||||
<p><strong>ID:</strong> <code>{{selectedReaction.id}}</code></p>
|
||||
<p><strong>{{localize "CONFIGURABLE_REACTIONS.Trigger.Label"}}:</strong> {{selectedReaction.trigger.type}}</p>
|
||||
<p><strong>{{localize "CONFIGURABLE_REACTIONS.Actions.Title"}}:</strong> {{selectedReaction.actions.length}}</p>
|
||||
|
||||
Reference in New Issue
Block a user