Prettier formatting 2

2.0
Matheus Clemente 2023-11-08 00:08:35 -03:00
parent 2c267d0c86
commit f42ba3da33
17 changed files with 736 additions and 649 deletions

View File

@ -55,5 +55,4 @@
"CMPBrowser.LOADED.Message": "Loaded {numLoaded} {itemType}s",
"CMPBrowser.LOADED.MaxLoaded": "(maximum displayed; to see more, use the filters)",
"CMPBrowser.Filters.ResetFilters": "Reset Filters"
}

View File

@ -57,5 +57,4 @@
"CMPBrowser.LOADED.Message": "Loaded {numLoaded} {itemType}s",
"CMPBrowser.LOADED.MaxLoaded": "(maximum displayed; to see more, use the filters)",
"CMPBrowser.Filters.ResetFilters": "Reset Filters"
}

View File

@ -55,5 +55,4 @@
"CMPBrowser.LOADED.Message": "Loaded {numLoaded} {itemType}s",
"CMPBrowser.LOADED.MaxLoaded": "(maximum displayed; to see more, use the filters)",
"CMPBrowser.Filters.ResetFilters": "Reset Filters"
}

View File

@ -55,5 +55,4 @@
"CMPBrowser.LOADED.Message": "Loaded {numLoaded} {itemType}s",
"CMPBrowser.LOADED.MaxLoaded": "(maximum displayed; to see more, use the filters)",
"CMPBrowser.Filters.ResetFilters": "Reset Filters"
}

View File

@ -55,5 +55,4 @@
"CMPBrowser.LOADED.Message": "Loaded {numLoaded} {itemType}s",
"CMPBrowser.LOADED.MaxLoaded": "(maximum displayed; to see more, use the filters)",
"CMPBrowser.Filters.ResetFilters": "Reset Filters"
}

View File

@ -55,5 +55,4 @@
"CMPBrowser.LOADED.Message": "{numLoaded} {itemType}s carregados(as)",
"CMPBrowser.LOADED.MaxLoaded": "(máximo exibido; para ver mais, use os filtros)",
"CMPBrowser.Filters.ResetFilters": "Redefinir Filtros"
}

View File

@ -1,17 +1,28 @@
{{#each listItems as |feat id|}}
<li class="feat flexrow draggable" data-entry-compendium="{{feat.compendium}}" data-entry-id="{{id}}">
<li
class="feat flexrow draggable"
data-entry-compendium="{{feat.compendium}}"
data-entry-id="{{id}}"
>
<div class="item-image">
<img class="" data-src="{{feat.img}}" title="{{feat.name}}" width="32" height="32" />
<img
class=""
data-src="{{feat.img}}"
title="{{feat.name}}"
width="32"
height="32"
/>
</div>
<div class="item-name">
<span class="item-edit"><a title="({{feat.compendium}})">{{feat.name}}</a></span>
<span class="item-edit"
><a title="({{feat.compendium}})">{{feat.name}}</a></span
>
</div>
<div class="feat-tags">
<span title="Class Requirement">{{feat.classRequirementString}}</span>
</div>
<div class="filter-tags">
<input type="hidden" name="class" value="{{feat.classRequirementString}}">
<input type="hidden" name="class" value="{{feat.classRequirementString}}" />
</div>
</li>
{{/each}}

View File

@ -2,25 +2,31 @@
<div class="control-area">
<div class="filtercontainer" id="tagfilter">
<div class="filter" data-type="text" data-path="name">
<input class="" name="textFilter" type="text" value="" data-dtype="String" placeholder="{{localize "Name"}}"/>
<input class="" name="textFilter" type="text" value=""
data-dtype="String" placeholder="{{localize "Name"}}"/>
</div>
<dl id="sorter">
<dt>{{localize "CMPBrowser.sortBy"}}:</dt>
<dd><select class="null" name="sortorder">
<dd>
<select class="null" name="sortorder">
<option value="true" selected>{{localize "Name"}}</option>
<option value="false">{{localize "DND5E.ItemTypeClass"}}</option>
</select></dd>
</select>
</dd>
</dl>
<button id="reset-feat-filter">{{localize "CMPBrowser.Filters.ResetFilters"}}</button>
<button id="reset-feat-filter">
{{localize "CMPBrowser.Filters.ResetFilters"}}
</button>
<!-- <button id="copy-search-feat">Export to <i class="fa-brands fa-square-js"></i></button> -->
</div>
{{> "modules/compendium-browser/template/filter-container.html" filters=featFilters}}
{{> "modules/compendium-browser/template/filter-container.html"
filters=featFilters}}
</div>
<div class="list-area flexcol">
<span id="CBFeatsMessage" style="flex: 0"></span>
<ul id="CBFeats">
{{> "modules/compendium-browser/template/feat-browser-list.html" feats=items}}
{{> "modules/compendium-browser/template/feat-browser-list.html"
feats=items}}
</ul>
</div>
</div>

View File

@ -3,7 +3,13 @@
<h3>{{cat.label}}</h3>
<div class="filters">
{{#each cat.filters as |filter key|}}
<div class="filter" id="{{cat.labelId}}-{{filter.labelId}}" data-path="{{filter.path}}" data-type="{{filter.type}}" data-valIsArray="{{filter.valIsArray}}">
<div
class="filter"
id="{{cat.labelId}}-{{filter.labelId}}"
data-path="{{filter.path}}"
data-type="{{filter.type}}"
data-valIsArray="{{filter.valIsArray}}"
>
{{#if filter.istext}}
<dt>{{filter.label}}</dt>
<dd>
@ -15,11 +21,10 @@
{{/each}}
</select>
{{else}}
<input type="text">
<input type="text" />
{{/if}}
</dd>
{{/if}}
{{#if filter.isbool}}
{{/if}} {{#if filter.isbool}}
<dl>
<dt>{{filter.label}}</dt>
<dd>
@ -30,8 +35,7 @@
</select>
</dd>
</dl>
{{/if}}
{{#if filter.isselect}}
{{/if}} {{#if filter.isselect}}
<dl>
<dt>{{filter.label}}</dt>
<dd>
@ -43,20 +47,18 @@
</select>
</dd>
</dl>
{{/if}}
{{#if filter.ismultiSelect}}
{{/if}} {{#if filter.ismultiSelect}}
<div class="multiselect">
<label>{{filter.label}}</label>
<dl>
{{#each filter.possibleValues as |label val|}}
<dt><label>{{label}}</label></dt>
<dd><input type="checkbox" data-value="{{val}}"></dd>
<dd><input type="checkbox" data-value="{{val}}" /></dd>
{{/each}}
</dl>
</div>
{{/if}}
{{#if filter.isnumberCompare}}
{{/if}} {{#if filter.isnumberCompare}}
<div class="numberCompare">
<dt>{{filter.label}}</dt>
<dd>
@ -66,13 +68,12 @@
<option value="<">&lt;</option>
<option value=">">&gt;</option>
</select>
<input class="small-input" type="number">
<input class="small-input" type="number" />
</dd>
</div>
{{/if}}
</div>
{{/each}}
</div>
</div>
{{/each}}

View File

@ -1,16 +1,28 @@
{{#each listItems as |item id|}}
<li class="item flexrow draggable" data-entry-compendium="{{item.compendium}}" data-entry-id="{{id}}">
<li
class="item flexrow draggable"
data-entry-compendium="{{item.compendium}}"
data-entry-id="{{id}}"
>
<div class="item-image">
<img class="" data-src="{{item.img}}" title="{{item.name}}" width="32" height="32" />
<img
class=""
data-src="{{item.img}}"
title="{{item.name}}"
width="32"
height="32"
/>
</div>
<div class="item-name">
<span class="item-edit"><a title="({{item.compendium}})">{{item.name}}</a></span>
<span class="item-edit"
><a title="({{item.compendium}})">{{item.name}}</a></span
>
</div>
<div class="item-tags">
<span title="Item Type">{{item.type}}</span>
</div>
<div class="filter-tags">
<input type="hidden" name="type" value="{{item.type}}">
<input type="hidden" name="type" value="{{item.type}}" />
</div>
</li>
{{/each}}

View File

@ -2,28 +2,35 @@
<div class="control-area">
<div class="filtercontainer" id="tagfilter">
<div class="filter" data-type="text" data-path="name">
<input class="" name="textFilter" type="text" value="" data-dtype="String" placeholder="{{localize "Name"}}"/>
<input class="" name="textFilter" type="text" value=""
data-dtype="String" placeholder="{{localize "Name"}}"/>
</div>
<dl id="sorter">
<dt>{{localize "CMPBrowser.sortBy"}}:</dt>
<dd><select class="null" name="sortorder">
<dd>
<select class="null" name="sortorder">
<option value="true" selected>{{localize "Name"}}</option>
<option value="false">{{localize "DND5E.Type"}}</option>
</select></dd>
</select>
</dd>
</dl>
<button id="reset-item-filter">{{localize "CMPBrowser.Filters.ResetFilters"}}</button>
<button id="reset-item-filter">
{{localize "CMPBrowser.Filters.ResetFilters"}}
</button>
<<<<<<< HEAD
<!-- <button id="copy-search-item">Export to <i class="fa-brands fa-square-js"></i></button> -->
=======
<button id="copy-search-item">Export to JS</button>
>>>>>>> lofd/master
</div>
{{> "modules/compendium-browser/template/filter-container.html" filters=itemFilters}}
{{> "modules/compendium-browser/template/filter-container.html"
filters=itemFilters}}
</div>
<div class="list-area flexcol">
<span id="CBItemsMessage" style="flex: 0"></span>
<ul id="CBItems">
{{> "modules/compendium-browser/template/item-browser-list.html" items=items}}
{{> "modules/compendium-browser/template/item-browser-list.html"
items=items}}
</ul>
</div>
</div>

View File

@ -1,10 +1,13 @@
<img class="" src="icons/sundries/books/book-open-turquoise.webp" title="Loading book" width="32" height="32"/>
<img
class=""
src="icons/sundries/books/book-open-turquoise.webp"
title="Loading book"
width="32"
height="32"
/>
<span class="item-edit">
{{#if doneLoading}}
{{localize "CMPBrowser.LOADED.Message" numLoaded=numLoaded itemType=itemType}}
{{else}}
{{localize "CMPBrowser.LOADING.Message" numLoaded=numLoaded itemType=itemType}}
{{/if}}
{{#if maxLoaded}}{{localize "CMPBrowser.LOADED.MaxLoaded"}}{{/if}}
{{#if doneLoading}} {{localize "CMPBrowser.LOADED.Message" numLoaded=numLoaded
itemType=itemType}} {{else}} {{localize "CMPBrowser.LOADING.Message"
numLoaded=numLoaded itemType=itemType}} {{/if}} {{#if maxLoaded}}{{localize
"CMPBrowser.LOADED.MaxLoaded"}}{{/if}}
</span>

View File

@ -1,11 +1,23 @@
{{#each listItems as |npc id|}}
<li class="npc flexrow draggable" data-entry-compendium="{{npc.compendium}}" data-entry-id="{{id}}">
<li
class="npc flexrow draggable"
data-entry-compendium="{{npc.compendium}}"
data-entry-id="{{id}}"
>
<div class="npc-image">
<img class="" data-src="{{npc.img}}" title="{{npc.name}}" width="32" height="32" />
<img
class=""
data-src="{{npc.img}}"
title="{{npc.name}}"
width="32"
height="32"
/>
</div>
<div class="npc-line">
<div class="npc-name">
<span class="item-edit"><a title="({{npc.compendium}})">{{npc.name}}</a></span>
<span class="item-edit"
><a title="({{npc.compendium}})">{{npc.name}}</a></span
>
</div>
<div class="npc-tags">
<span class="cr" title="Challange Rating">CR {{npc.displayCR}}</span>
@ -13,8 +25,8 @@
<span class="type">{{npc.displayType}}</span>
</div>
<div class="filter-tags">
<input type="hidden" name="order.cr" value="{{npc.orderCR}}">
<input type="hidden" name="order.size" value="{{npc.orderSize}}">
<input type="hidden" name="order.cr" value="{{npc.orderCR}}" />
<input type="hidden" name="order.size" value="{{npc.orderSize}}" />
</div>
</div>
</li>

View File

@ -2,29 +2,36 @@
<div class="control-area">
<div class="filtercontainer" id="tagfilter">
<div class="filter" data-type="text" data-path="name">
<input class="" name="textFilter" type="text" value="" data-dtype="String" placeholder="{{localize "Name"}}"/>
<input class="" name="textFilter" type="text" value=""
data-dtype="String" placeholder="{{localize "Name"}}"/>
</div>
<dl id="sorter">
<dt>{{localize "CMPBrowser.sortBy"}}:</dt>
<dd><select name="sortorder">
<dd>
<select name="sortorder">
<option value="name" selected>{{localize "Name"}}</option>
<option value="cr">{{localize "DND5E.ChallengeRating"}}</option>
<option value="size">{{localize "DND5E.Size"}}</option>
</select></dd>
</select>
</dd>
</dl>
<button id="reset-npc-filter">{{localize "CMPBrowser.Filters.ResetFilters"}}</button>
<button id="reset-npc-filter">
{{localize "CMPBrowser.Filters.ResetFilters"}}
</button>
<<<<<<< HEAD
<!-- <button id="copy-search-npc">Export to <i class="fa-brands fa-square-js"></i></button> -->
=======
<button id="copy-search-npc">Export to JS</button>
>>>>>>> lofd/master
</div>
{{> "modules/compendium-browser/template/filter-container.html" filters=npcFilters}}
{{> "modules/compendium-browser/template/filter-container.html"
filters=npcFilters}}
</div>
<div class="list-area flexcol">
<span id="CBNpcsMessage" style="flex: 0"></span>
<ul id="CBNPCs">
{{> "modules/compendium-browser/template/npc-browser-list.html" npcs=npcs}}
{{> "modules/compendium-browser/template/npc-browser-list.html"
npcs=npcs}}
</ul>
</div>
</div>

View File

@ -2,19 +2,23 @@
<div class="settings-group">
<h3>{{localize "CMPBrowser.generalSettings"}}</h3>
<label>
<input data-setting="allow-spell-browser" type="checkbox" {{#if settings.allowSpellBrowser}}checked{{/if}}>
<input data-setting="allow-spell-browser" type="checkbox" {{#if
settings.allowSpellBrowser}}checked{{/if}}>
<h4>{{localize "CMPBrowser.allowSpellAcc"}}</h4>
</label>
<label>
<input data-setting="allow-feat-browser" type="checkbox" {{#if settings.allowFeatBrowser}}checked{{/if}}>
<input data-setting="allow-feat-browser" type="checkbox" {{#if
settings.allowFeatBrowser}}checked{{/if}}>
<h4>{{localize "CMPBrowser.allowFeatAcc"}}</h4>
</label>
<label>
<input data-setting="allow-item-browser" type="checkbox" {{#if settings.allowItemBrowser}}checked{{/if}}>
<input data-setting="allow-item-browser" type="checkbox" {{#if
settings.allowItemBrowser}}checked{{/if}}>
<h4>{{localize "CMPBrowser.allowItemAcc"}}</h4>
</label>
<label>
<input data-setting="allow-npc-browser" type="checkbox" {{#if settings.allowNpcBrowser}}checked{{/if}}>
<input data-setting="allow-npc-browser" type="checkbox" {{#if
settings.allowNpcBrowser}}checked{{/if}}>
<h4>{{localize "CMPBrowser.allowNpcAcc"}}</h4>
</label>
</div>
@ -23,7 +27,8 @@
<h3>{{localize "CMPBrowser.compSettingsSpell"}}</h3>
{{#each settings.loadedSpellCompendium as |spellComp key|}}
<label>
<input data-setting="spell-compendium-setting" data-key="{{key}}" data-type="spell" type="checkbox"{{#if spellComp.load}}checked{{/if}}>
<input data-setting="spell-compendium-setting" data-key="{{key}}"
data-type="spell" type="checkbox"{{#if spellComp.load}}checked{{/if}}>
<h4>{{localize "CMPBrowser.load"}} {{spellComp.name}}</h4>
</label>
{{/each}}
@ -32,7 +37,8 @@
<h3>{{localize "CMPBrowser.compSettingsNpc"}}</h3>
{{#each settings.loadedNpcCompendium as |npcComp key|}}
<label>
<input data-setting="npc-compendium-setting" data-key="{{key}}" data-type="npc" type="checkbox"{{#if npcComp.load}}checked{{/if}}>
<input data-setting="npc-compendium-setting" data-key="{{key}}"
data-type="npc" type="checkbox"{{#if npcComp.load}}checked{{/if}}>
<h4>{{localize "CMPBrowser.load"}} {{npcComp.name}}</h4>
</label>
{{/each}}

View File

@ -2,24 +2,31 @@
<div class="control-area">
<div class="filtercontainer" id="tagfilter">
<div class="filter" data-type="text" data-path="name">
<input class="" name="textFilter" type="text" value="" data-dtype="String" placeholder="{{localize "Name"}}"/>
<input class="" name="textFilter" type="text" value=""
data-dtype="String" placeholder="{{localize "Name"}}"/>
</div>
<dl id="sorter">
<dt>{{localize "CMPBrowser.sortBy"}}:</dt>
<dd><select class="null" name="sortorder">
<dd>
<select class="null" name="sortorder">
<option value="true" selected>{{localize "Name"}}</option>
<option value="false">{{localize "DND5E.Level"}}</option>
</select></dd>
</select>
</dd>
</dl>
<button id="reset-spell-filter">{{localize "CMPBrowser.Filters.ResetFilters"}}</button>
<button id="reset-spell-filter">
{{localize "CMPBrowser.Filters.ResetFilters"}}
</button>
<!-- <button id="copy-search-spell">Export to <i class="fa-brands fa-square-js"></i></button> -->
</div>
{{> "modules/compendium-browser/template/filter-container.html" filters=spellFilters}}
{{> "modules/compendium-browser/template/filter-container.html"
filters=spellFilters}}
</div>
<div class="list-area flexcol">
<span id="CBSpellsMessage" style="flex: 0"></span>
<ul id="CBSpells">
{{> "modules/compendium-browser/template/spell-browser-list.html" spells=items}}
{{> "modules/compendium-browser/template/spell-browser-list.html"
spells=items}}
</ul>
</div>
</div>

View File

@ -1,17 +1,38 @@
<div class="parent">
<div class="tabs">
{{#if showSpellBrowser}}<a class="item" data-tab="spell">{{localize "CMPBrowser.Tab.SpellBrowser"}}</a>{{/if}}
{{#if showFeatBrowser}}<a class="item" data-tab="feat">{{localize "CMPBrowser.Tab.FeatBrowser"}}</a>{{/if}}
{{#if showItemBrowser}}<a class="item" data-tab="item">{{localize "CMPBrowser.Tab.ItemBrowser"}}</a>{{/if}}
{{#if showNpcBrowser}}<a class="item" data-tab="npc">{{localize "CMPBrowser.Tab.NPCBrowser"}}</a>{{/if}}
{{#if isGM}}<a class="item" data-tab="setting">{{localize "CMPBrowser.Tab.Settings"}}</a>{{/if}}
{{#if showSpellBrowser}}<a class="item" data-tab="spell"
>{{localize "CMPBrowser.Tab.SpellBrowser"}}</a
>{{/if}} {{#if showFeatBrowser}}<a class="item" data-tab="feat"
>{{localize "CMPBrowser.Tab.FeatBrowser"}}</a
>{{/if}} {{#if showItemBrowser}}<a class="item" data-tab="item"
>{{localize "CMPBrowser.Tab.ItemBrowser"}}</a
>{{/if}} {{#if showNpcBrowser}}<a class="item" data-tab="npc"
>{{localize "CMPBrowser.Tab.NPCBrowser"}}</a
>{{/if}} {{#if isGM}}<a class="item" data-tab="setting"
>{{localize "CMPBrowser.Tab.Settings"}}</a
>{{/if}}
</div>
<div class="content">
<div class="tab" data-tab="spell">{{#if showSpellBrowser}}{{> "modules/compendium-browser/template/spell-browser.html"}}{{/if}}</div>
<div class="tab" data-tab="feat">{{#if showFeatBrowser}}{{> "modules/compendium-browser/template/feat-browser.html"}}{{/if}}</div>
<div class="tab" data-tab="item">{{#if showItemBrowser}}{{> "modules/compendium-browser/template/item-browser.html"}}{{/if}}</div>
<div class="tab" data-tab="npc">{{#if showNpcBrowser}} {{> "modules/compendium-browser/template/npc-browser.html"}}{{/if}}</div>
<div class="tab" data-tab="setting">{{#if isGM}} {{> "modules/compendium-browser/template/settings.html"}}{{/if}}</div>
<div class="tab" data-tab="spell">
{{#if showSpellBrowser}}{{>
"modules/compendium-browser/template/spell-browser.html"}}{{/if}}
</div>
<div class="tab" data-tab="feat">
{{#if showFeatBrowser}}{{>
"modules/compendium-browser/template/feat-browser.html"}}{{/if}}
</div>
<div class="tab" data-tab="item">
{{#if showItemBrowser}}{{>
"modules/compendium-browser/template/item-browser.html"}}{{/if}}
</div>
<div class="tab" data-tab="npc">
{{#if showNpcBrowser}} {{>
"modules/compendium-browser/template/npc-browser.html"}}{{/if}}
</div>
<div class="tab" data-tab="setting">
{{#if isGM}} {{>
"modules/compendium-browser/template/settings.html"}}{{/if}}
</div>
</div>
</div>