Bouton d'export si mode avancé

This commit is contained in:
Vincent Vandemeulebrouck 2024-10-05 12:50:29 +02:00
parent 40b0d7e6dc
commit 689e287ac7
4 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import { RdDActorSheet } from "../../actor-sheet.js"
import { SYSTEM_RDD } from "../../constants.js";
import { Misc } from "../../misc.js";
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js";
import { ExportScriptarium } from "./export-scriptarium.js";
import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.js";
@ -19,7 +20,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
}
static get defaultOptions() {
return foundry.utils.mergeObject(RdDActorSheet.defaultOptions, {
template: "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/actor-export-sheet.hbs",
template: "systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/actor-encart-sheet.hbs",
width: 550,
showCompNiveauBase: false,
vueArchetype: false,
@ -36,6 +37,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
formData.export = this.getMappingValues();
formData.competences = this.getCompetences(CATEGORIES_COMPETENCES)
formData.draconic = this.getCompetences(CATEGORIES_DRACONIC)
formData.options.exportScriptarium = OptionsAvancees.isUsing(EXPORT_CSV_SCRIPTARIUM)
return formData
}

View File

@ -64,11 +64,10 @@ import { RdDItemArmure } from "./item/armure.js"
import { AutoAdjustDarkness as AutoAdjustDarkness } from "./time/auto-adjust-darkness.js"
import { RdDCreature } from "./actor/creature.js"
import { RdDTMRDialog } from "./rdd-tmr-dialog.js"
//import { RdDActorExportSheet } from "./actor/actor-export-sheet.js"
import { OptionsAvancees } from "./settings/options-avancees.js"
import { ExportScriptarium } from "./actor/export-scriptarium/export-scriptarium.js"
import { AppPersonnageAleatoire } from "./actor/random/app-personnage-aleatoire.js"
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-export-sheet.js"
import { RdDActorExportSheet } from "./actor/export-scriptarium/actor-encart-sheet.js"
/**
* RdD system

View File

@ -4,7 +4,7 @@ import { Misc } from "../misc.js"
export const EXPORT_CSV_SCRIPTARIUM = 'export-csv-scriptarium'
const OPTIONS_AVANCEES = [
{ group: 'Menus', name: EXPORT_CSV_SCRIPTARIUM, descr: "Proposer le menu d'export csv Scriptarium (raffraichissement requis)" },
{ group: 'Menus', name: EXPORT_CSV_SCRIPTARIUM, descr: "Proposer le menu d'export csv Scriptarium" },
]
export class OptionsAvancees extends FormApplication {

View File

@ -2,7 +2,9 @@
<section class="sheet-header">
<div class="flexrow">
<h1 class="flex-grow charname">{{name}}</h1>
{{#if options.exportScriptarium}}
<span class="flex-group-right flex-shrink chat-card-button-area"><a class="button-export chat-card-button">Export </a></span>
{{/if}}
</div>
</section>
<section class="sheet-body" style=:"margin-bottom: 3rem;">