Uncheck textgen preset from master export by default

This commit is contained in:
Cohee 2024-09-22 20:47:05 +03:00
parent 9101fb6573
commit 63bd7611b3
2 changed files with 11 additions and 5 deletions

View File

@ -278,7 +278,7 @@ class PresetManager {
*/
static async performMasterExport() {
const sectionNames = Object.entries(this.masterSections).reduce((acc, [key, section]) => {
acc[key] = section.name;
acc[key] = { key: key, name: section.name, checked: key !== 'preset' };
return acc;
}, {});
const html = $(await renderTemplateAsync('masterExport', { sections: sectionNames }));

View File

@ -3,9 +3,15 @@
</h3>
<div class="flex-container flexFlowColumn justifyLeft">
{{#each sections}}
<label class="checkbox_label">
<input type="checkbox" value="{{@key}}" checked>
<span data-i18n="{{this}}">{{this}}</span>
</label>
{{#with this}}
<label class="checkbox_label">
{{#if checked}}
<input type="checkbox" value="{{key}}" checked />
{{else}}
<input type="checkbox" value="{{key}}" />
{{/if}}
<span data-i18n="{{name}}">{{name}}</span>
</label>
{{/with}}
{{/each}}
</div>