152 - Improve Rest Options (#154)

* Fixed up downtime dialogs and data model

* Added homebrew settings without action handling for now

* Added NrChoices to homebrew
This commit is contained in:
WBHarry 2025-06-20 16:36:09 +02:00 committed by GitHub
parent f6e077b290
commit 3464717958
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 799 additions and 123 deletions

View file

@ -0,0 +1,3 @@
<section class='tab-form-footer'>
<button data-action="saveForm"><i class="fa-solid fa-floppy-disk"></i> {{localize "Save"}}</button>
</section>

View file

@ -0,0 +1,6 @@
<header class='settings-item-header'>
<img class='profile' src='{{this.img}}' data-action='editImage' data-edit='img' />
<div class='item-info'>
<h1 class='item-name'><input type='text' name='name' value='{{this.name}}' /></h1>
</div>
</header>

View file

@ -0,0 +1,18 @@
<div>
<fieldset>
<legend>{{localize "Description"}}</legend>
<prose-mirror name="description" value="{{description}}" toggled=true>
{{{ enrichedDescription }}}
</prose-mirror>
</fieldset>
{{!-- <fieldset>
<legend>{{localize "Actions"}} <a data-action="addItem"><i class="fa-solid fa-plus"></i></a></legend>
<div class="settings-items">
{{#each this.actions as |action index|}}
{{> "systems/daggerheart/templates/settings/components/settings-item-line.hbs" action type="actions" id=index }}
{{/each}}
</div>
</fieldset> --}}
</div>

View file

@ -0,0 +1,22 @@
<div class="settings-item">
<div class="settings-sub-item">
<img src="{{this.img}}" />
<div>{{this.name}}</div>
</div>
<div class="settings-sub-item">
<a
data-action="editItem"
data-type="{{this.type}}"
data-id="{{this.id}}"
>
<i class="fa-solid fa-globe"></i>
</a>
<a
data-action="removeItem"
data-type="{{this.type}}"
data-id="{{this.id}}"
>
<i class='fas fa-trash'></i>
</a>
</div>
</div>

View file

@ -10,6 +10,52 @@
</div>
{{/each}}
</div>
<fieldset class="two-columns even">
<legend>{{localize "DAGGERHEART.Settings.Homebrew.DowntimeMoves"}}</legend>
<fieldset>
<legend>
{{localize "DAGGERHEART.Downtime.LongRest.title"}}
<a data-action="addItem" data-type="longRest"><i class="fa-solid fa-plus"></i></a>
<a data-action="resetMoves" data-type="longRest"><i class="fa-solid fa-arrow-rotate-left"></i></a>
</legend>
<div class="form-group setting-group-field">
<label>{{localize "DAGGERHEART.Settings.Homebrew.NrChoices"}}</label>
<div class="form-fields">
<input type="text" name="restMoves.longRest.nrChoices" value="{{settingFields._source.restMoves.longRest.nrChoices}}" />
</div>
</div>
<div class="settings-items">
{{#each settingFields._source.restMoves.longRest.moves as |move id|}}
{{> "systems/daggerheart/templates/settings/components/settings-item-line.hbs" this type="longRest" id=id }}
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>
{{localize "DAGGERHEART.Downtime.ShortRest.title"}}
<a data-action="addItem" data-type="shortRest"><i class="fa-solid fa-plus"></i></a>
<a data-action="resetMoves" data-type="shortRest"><i class="fa-solid fa-arrow-rotate-left"></i></a>
</legend>
<div class="form-group setting-group-field">
<label>{{localize "DAGGERHEART.Settings.Homebrew.NrChoices"}}</label>
<div class="form-fields">
<input type="text" name="restMoves.shortRest.nrChoices" value="{{settingFields._source.restMoves.shortRest.nrChoices}}" />
</div>
</div>
<div class="settings-items">
{{#each settingFields._source.restMoves.shortRest.moves as |move id|}}
{{> "systems/daggerheart/templates/settings/components/settings-item-line.hbs" this type="shortRest" id=id }}
{{/each}}
</div>
</fieldset>
</fieldset>
<footer class="form-footer">
<button data-action="reset">