mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[REFACTOR] Simplify the DHAppearanceSettings (#1057)
Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
This commit is contained in:
parent
0bd423ef52
commit
eefb28c312
8 changed files with 327 additions and 298 deletions
|
|
@ -1,116 +0,0 @@
|
|||
<div>
|
||||
<header class="dialog-header">
|
||||
<h1>{{localize 'DAGGERHEART.SETTINGS.Menu.appearance.name'}}</h1>
|
||||
</header>
|
||||
|
||||
{{formGroup settingFields.schema.fields.hideAttribution value=settingFields._source.hideAttribution localize=true}}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.GENERAL.fear'}}</legend>
|
||||
{{formGroup settingFields.schema.fields.displayFear value=settingFields._source.displayFear localize=true}}
|
||||
{{formGroup settingFields.schema.fields.showGenericStatusEffects value=settingFields._source.showGenericStatusEffects localize=true}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.SETTINGS.Appearance.FIELDS.expandedTitle'}}</legend>
|
||||
{{formGroup settingFields.schema.fields.extendCharacterDescriptions value=settingFields._source.extendCharacterDescriptions localize=true}}
|
||||
{{formGroup settingFields.schema.fields.extendAdversaryDescriptions value=settingFields._source.extendAdversaryDescriptions localize=true}}
|
||||
{{formGroup settingFields.schema.fields.extendEnvironmentDescriptions value=settingFields._source.extendEnvironmentDescriptions localize=true}}
|
||||
{{formGroup settingFields.schema.fields.extendItemDescriptions value=settingFields._source.extendItemDescriptions localize=true}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.SETTINGS.Appearance.FIELDS.expandRollMessage'}}</legend>
|
||||
{{formGroup settingFields.schema.fields.expandRollMessage.fields.desc value=settingFields.expandRollMessage.desc localize=true}}
|
||||
{{formGroup settingFields.schema.fields.expandRollMessage.fields.roll value=settingFields.expandRollMessage.roll localize=true}}
|
||||
{{formGroup settingFields.schema.fields.expandRollMessage.fields.damage value=settingFields.expandRollMessage.damage localize=true}}
|
||||
{{formGroup settingFields.schema.fields.expandRollMessage.fields.target value=settingFields.expandRollMessage.target localize=true}}
|
||||
</fieldset>
|
||||
|
||||
{{#if showDiceSoNice}}
|
||||
<fieldset>
|
||||
<legend>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.title"}}</legend>
|
||||
<div class="title-hint">{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.hint"}}</div>
|
||||
|
||||
<section class='tab-navigation'>
|
||||
<div class='navigation-container'>
|
||||
<div class="navigation-inner-container">
|
||||
<line-div></line-div>
|
||||
<nav class='feature-tab sheet-tabs tabs' data-group='diceSoNice'>
|
||||
{{#each tabs as |tab|}}
|
||||
<a class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
|
||||
{{localize tab.label}}
|
||||
</a>
|
||||
{{/each}}
|
||||
</nav>
|
||||
<line-div></line-div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="field-section">
|
||||
<div class="label-container full-width">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.system"}}</label>
|
||||
<select name="{{concat "diceSoNice." diceTab.key ".system"}}">
|
||||
{{selectOptions diceSoNiceSystems selected=diceTab.source.system valueAttr="key" labelAttr="name" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="split-section">
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
||||
{{formInput diceTab.fields.foreground value=diceTab.source.foreground localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
||||
{{formInput diceTab.fields.background value=diceTab.source.background localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
||||
{{formInput diceTab.fields.outline value=diceTab.source.outline localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
||||
{{formInput diceTab.fields.edge value=diceTab.source.edge localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.colorset"}}</label>
|
||||
<select name="{{concat "diceSoNice." diceTab.key ".colorset"}}">
|
||||
{{selectOptions diceSoNiceColorsets selected=diceTab.source.colorset labelAttr="description" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.texture"}}</label>
|
||||
<select name="{{concat "diceSoNice." diceTab.key ".texture"}}">
|
||||
{{selectOptions diceSoNiceTextures selected=diceTab.source.texture labelAttr="name" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.material"}}</label>
|
||||
<select name="{{concat "diceSoNice." diceTab.key ".material"}}">
|
||||
{{selectOptions diceSoNiceMaterials selected=diceTab.source.material valueAttr="key" labelAttr="name" localize=true}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button data-action="preview">
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span>{{localize "Preview"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/if}}
|
||||
|
||||
<footer class="form-footer">
|
||||
<button data-action="reset">
|
||||
<i class="fa-solid fa-arrow-rotate-left"></i>
|
||||
<span>{{localize "Reset"}}</span>
|
||||
</button>
|
||||
<button data-action="save" >
|
||||
<i class="fa-solid fa-floppy-disk"></i>
|
||||
<span>{{localize "Save Changes"}}</span>
|
||||
</button>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
67
templates/settings/appearance-settings/diceSoNice.hbs
Normal file
67
templates/settings/appearance-settings/diceSoNice.hbs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<section class="tab {{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
<fieldset>
|
||||
<div class="title-hint">{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.hint"}}</div>
|
||||
|
||||
<section class='tab-navigation'>
|
||||
<div class='navigation-container'>
|
||||
<div class="navigation-inner-container">
|
||||
<line-div></line-div>
|
||||
<nav class='feature-tab sheet-tabs tabs' data-group='diceSoNice'>
|
||||
{{#each dsnTabs as |tab|}}
|
||||
<a class='{{tab.id}} {{tab.cssClass}}' data-action='tab' data-group='{{tab.group}}' data-tab='{{tab.id}}'>
|
||||
{{localize tab.label}}
|
||||
</a>
|
||||
{{/each}}
|
||||
</nav>
|
||||
<line-div></line-div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{#each dsnTabs as |dsnTab|}}
|
||||
<section class="tab {{#if dsnTab.active}} active{{/if}}" data-group="{{dsnTab.group}}" data-tab="{{dsnTab.id}}">
|
||||
<div class="field-section">
|
||||
<div class="label-container full-width">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.system"}}</label>
|
||||
{{formInput fields.system value=values.system localize=true choices=@root.diceSoNiceSystems}}
|
||||
</div>
|
||||
<div class="split-section">
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.foreground"}}</label>
|
||||
{{formInput fields.foreground value=values.foreground localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.background"}}</label>
|
||||
{{formInput fields.background value=values.background localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.outline"}}</label>
|
||||
{{formInput fields.outline value=values.outline localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.edge"}}</label>
|
||||
{{formInput fields.edge value=values.edge localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.colorset"}}</label>
|
||||
{{formInput fields.colorset value=values.colorset choices=@root.diceSoNiceColorsets localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.texture"}}</label>
|
||||
{{formInput fields.texture value=values.texture choices=@root.diceSoNiceTextures localize=true}}
|
||||
</div>
|
||||
<div class="label-container">
|
||||
<label>{{localize "DAGGERHEART.SETTINGS.Menu.appearance.diceSoNice.material"}}</label>
|
||||
{{formInput fields.material value=values.material choices=@root.diceSoNiceMaterials localize=true}}
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button type="button" data-action="preview" data-key="{{dsnTab.id}}">
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span>{{localize "Preview"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{/each}}
|
||||
</fieldset>
|
||||
</section>
|
||||
3
templates/settings/appearance-settings/header.hbs
Normal file
3
templates/settings/appearance-settings/header.hbs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<header class="dialog-header">
|
||||
<h1>{{localize 'DAGGERHEART.SETTINGS.Menu.appearance.label'}}</h1>
|
||||
</header>
|
||||
46
templates/settings/appearance-settings/main.hbs
Normal file
46
templates/settings/appearance-settings/main.hbs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<section class="tab {{#if tab.active}} active{{/if}}" data-group="{{tab.group}}" data-tab="{{tab.id}}">
|
||||
{{formGroup
|
||||
fields.displayFear
|
||||
value=setting.displayFear
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.showGenericStatusEffects
|
||||
value=setting.showGenericStatusEffects
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.hideAttribution
|
||||
value=setting.hideAttribution
|
||||
localize=true}}
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.SETTINGS.Appearance.FIELDS.expandedTitle'}}</legend>
|
||||
{{formGroup
|
||||
fields.extendCharacterDescriptions
|
||||
value=setting.extendCharacterDescriptions
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.extendAdversaryDescriptions
|
||||
value=setting.extendAdversaryDescriptions
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.extendEnvironmentDescriptions
|
||||
value=setting.extendEnvironmentDescriptions
|
||||
localize=true}}
|
||||
{{formGroup
|
||||
fields.extendItemDescriptions
|
||||
value=setting.extendItemDescriptions
|
||||
localize=true}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize 'DAGGERHEART.SETTINGS.Appearance.FIELDS.expandRollMessage.title'}}</legend>
|
||||
{{formGroup fields.expandRollMessage.fields.desc value=setting.expandRollMessage.desc
|
||||
localize=true}}
|
||||
{{formGroup fields.expandRollMessage.fields.roll value=setting.expandRollMessage.roll
|
||||
localize=true}}
|
||||
{{formGroup fields.expandRollMessage.fields.damage
|
||||
value=setting.expandRollMessage.damage localize=true}}
|
||||
{{formGroup fields.expandRollMessage.fields.target
|
||||
value=setting.expandRollMessage.target localize=true}}
|
||||
</fieldset>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue