fix: resolve TypeScript compilation errors after refactoring

- Add missing ExportErrorHandler import in SettingsTab.ts
- Add customEnvironmentVariables property to settings interface
- Fix undefined metadata access with optional chaining in EmbedProcessor.ts
- Update ModalState.ts to use new nested settings structure
- Simplify ExportConfigModal.ts to use full settings object
- Add null safety checks for templateDropdown in GeneralSection.ts
This commit is contained in:
Jarvis committed 2025-09-10 17:06:21 +02:00
1 parent 61ebc10de9
commit 8f75352b15
6 files changed
+30 -43

No files matched your search

+2 -21
View File
@@ -112,27 +112,8 @@ export class ExportConfigModal extends Modal {
}
private handleReset(): void {
// Create plugin defaults object from settings tab values
const pluginDefaults = {
template: this.plugin.settings.exportDefaults.template,
format: this.plugin.settings.exportDefaults.format,
outputFolder: this.plugin.settings.outputFolder,
openAfterExport: this.plugin.settings.behavior.openAfterExport,
preserveFolderStructure: this.plugin.settings.behavior.preserveFolderStructure,
pageSize: this.plugin.settings.pageSetup.size,
orientation: this.plugin.settings.pageSetup.orientation,
marginTop: this.plugin.settings.pageSetup.margins.top.toString(),
marginBottom: this.plugin.settings.pageSetup.margins.bottom.toString(),
marginLeft: this.plugin.settings.pageSetup.margins.left.toString(),
marginRight: this.plugin.settings.pageSetup.margins.right.toString(),
bodyFont: this.plugin.settings.typography.fonts.body,
headingFont: this.plugin.settings.typography.fonts.heading,
monospaceFont: this.plugin.settings.typography.fonts.monospace,
bodyFontSize: this.plugin.settings.typography.fontSizes.body
};
// Reset state to plugin defaults
this.state.reset(pluginDefaults);
// Reset state to plugin defaults using the full settings object
this.state.reset(this.plugin.settings);
// Re-render sections to update UI
this.renderer.refreshSections();