Add DialogManager to a global API and create the Ask dialog for the user

This commit is contained in:
Oliver-Akins 2025-07-24 20:34:17 -06:00
parent 02b49687cf
commit 44a88cc7b5
10 changed files with 334 additions and 1 deletions

View file

@ -0,0 +1,13 @@
<div class="control-row">
<button
type="button"
data-action="cancel"
>
Cancel
</button>
<button
type="submit"
>
Confirm and Close
</button>
</div>

12
templates/Ask/inputs.hbs Normal file
View file

@ -0,0 +1,12 @@
<div class="dialog-content">
{{#if description}}
<p>
{{ description }}
</p>
{{/if}}
{{#each inputs as | i |}}
<div class="prompt">
{{> (concat (systemFilePath "templates/Ask/inputs/" ) i.type ".hbs") i}}
</div>
{{/each}}
</div>

View file

@ -0,0 +1,3 @@
<p class="prompt__details">
{{{ details }}}
</p>

View file

@ -0,0 +1,12 @@
<label
for="{{id}}"
>
{{ label }}
</label>
<input
type="{{ inputType }}"
id="{{ id }}"
name="{{ key }}"
{{ valueAttribute }}="{{ defaultValue }}"
{{#if autofocus}}autofocus{{/if}}
>