Amélioration de la feuille de personnages #547

Merged
uberwald merged 7 commits from VincentVk/foundryvtt-reve-de-dragon:v1.5 into v1.5 2022-08-28 08:40:51 +02:00
2 changed files with 61 additions and 55 deletions
Showing only changes of commit e4da124579 - Show all commits

View File

@ -239,7 +239,8 @@ export class RdDUtility {
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord)); Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1))); Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
Handlebars.registerHelper('sortCompetence', competences => competences.sort((a, b) => { Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.visible)
.sort((a, b) => {
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) { if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
if (a.name.includes("Cité")) return -1; if (a.name.includes("Cité")) return -1;
if (b.name.includes("Cité")) return 1; if (b.name.includes("Cité")) return 1;
@ -268,7 +269,8 @@ export class RdDUtility {
return a.name.localeCompare(b.name); return a.name.localeCompare(b.name);
} }
return a.name.localeCompare(b.name); return a.name.localeCompare(b.name);
})); })
);
return loadTemplates(templatePaths); return loadTemplates(templatePaths);
} }

View File

@ -1,7 +1,9 @@
<header class="competence-header flexrow"> {{#if competences}}
<div class="flex-shrink">
<header class="competence-header flexrow">
<span class="competence-title">{{categorie}}</span> <span class="competence-title">{{categorie}}</span>
</header> </header>
<ul class="item-list alterne-list competence-list"> <ul class="item-list alterne-list competence-list">
{{#if @root.options.vueDetaillee}} {{#if @root.options.vueDetaillee}}
<li class="item flexrow list-item "> <li class="item flexrow list-item ">
@ -24,4 +26,6 @@
{{#each competences as |comp key|}} {{#each competences as |comp key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
{{/each}} {{/each}}
</ul> </ul>
</div>
{{/if}}