mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
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:
parent
f6e077b290
commit
3464717958
19 changed files with 799 additions and 123 deletions
|
|
@ -1,16 +1,11 @@
|
|||
<div class="daggerheart chat downtime">
|
||||
<h2 class="downtime-title-container">
|
||||
<div>{{this.player}} {{localize "DAGGERHEART.Chat.Downtime.Title"}}</div>
|
||||
<div class="downtime-subtitle">{{this.title}}</div>
|
||||
<div>{{title}}</div>
|
||||
</h2>
|
||||
<img class="downtime-image" src="{{this.img}}" />
|
||||
<div>{{{this.description}}}</div>
|
||||
<div class="downtime-refresh-container">
|
||||
<div class="refresh-title">Refreshed Features</div>
|
||||
{{#each this.refreshedFeatures}}
|
||||
<div class="refresh-inner-container">
|
||||
<div>{{this.name}}</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{#each moves}}
|
||||
<strong>{{this.name}}</strong>
|
||||
<img class="downtime-image" src="{{this.img}}" />
|
||||
<div>{{{this.description}}}</div>
|
||||
{{#if (gt this.actions.length 0)}}<button class="action-use-button">{{localize "Action"}}</button>{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
3
templates/settings/components/action-view-footer.hbs
Normal file
3
templates/settings/components/action-view-footer.hbs
Normal 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>
|
||||
6
templates/settings/components/action-view-header.hbs
Normal file
6
templates/settings/components/action-view-header.hbs
Normal 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>
|
||||
18
templates/settings/components/action-view.hbs
Normal file
18
templates/settings/components/action-view.hbs
Normal 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>
|
||||
22
templates/settings/components/settings-item-line.hbs
Normal file
22
templates/settings/components/settings-item-line.hbs
Normal 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>
|
||||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
<div>
|
||||
<div class="downtime-container">
|
||||
{{#each this.options as |option key|}}
|
||||
<h2 class="downtime-header">{{localize "DAGGERHEART.Downtime.DowntimeHeader" current=nrCurrentChoices max=moveData.nrChoices}}</h2>
|
||||
{{#each moveData.moves as |move key|}}
|
||||
<div class="activity-container">
|
||||
<div class="activity-title">
|
||||
<img class="activity-image {{#if (eq ../selectedActivity.id key)}}selected{{/if}}" src="{{option.img}}" data-action="selectActivity" data-activity="{{key}}" />
|
||||
<div class="activity-image {{#if this.selected}}selected{{/if}}" data-action="selectMove" data-move="{{key}}">
|
||||
{{#if this.selected}}<div class="activity-select-label">{{move.selected}}</div>{{/if}}
|
||||
<img src="{{move.img}}" />
|
||||
</div>
|
||||
|
||||
<span class="activity-title-text">{{localize this.name}}</span>
|
||||
</div>
|
||||
<div class="activity-body">
|
||||
|
|
@ -11,18 +16,9 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
<div class="activity-container">
|
||||
<div class="activity-title">
|
||||
<img class="activity-image {{#if (eq selectedActivity this.customActivity)}}selected{{/if}}" src="{{this.customActivity.img}}" data-action="selectActivity" data-activity="{{this.customActivity.id}}" />
|
||||
<input class="custom-name-input" type="text" name="name" value="{{this.customActivity.name}}" placeholder="{{localize this.customActivity.namePlaceholder}}" />
|
||||
</div>
|
||||
<div class="activity-body">
|
||||
<textarea class="activity-text-area" name="description" placeholder="{{localize this.customActivity.placeholder}}">{{this.customActivity.description}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="flexrow">
|
||||
<button data-action="takeDowntime" {{#if this.disabledDowntime}}disabled{{/if}}>{{localize "DAGGERHEART.Application.Downtime.TakeDowntime"}}</button>
|
||||
<button data-action="close">{{localize "DAGGERHEART.Application.Cancel"}}</button>
|
||||
<button type="button" data-action="close">{{localize "DAGGERHEART.Application.Cancel"}}</button>
|
||||
<button type="button" data-action="takeDowntime" {{#if this.disabledDowntime}}disabled{{/if}}>{{localize "DAGGERHEART.Application.Downtime.TakeDowntime"}}</button>
|
||||
</footer>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue