refactor: complete ExportConfigModal.ts refactoring (Step 4.3)

- Remove unused getOutputFilename() method
- Remove unnecessary delegation methods showValidationErrors() and showValidationWarnings()
- Update handleSubmit() to call renderer methods directly
- Clean up excessive blank lines for better readability
- Reduce file size from 237 to 219 lines while maintaining functionality

This completes Phase 4.3 of the large file refactoring plan, achieving
the target of ~200 lines while preserving all modal lifecycle methods,
event handlers, and state management functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-09-10 12:49:03 +02:00
1 parent 53dd1b5903
commit 70ebb6a767
1 file changed
+2 -19
+2 -19
View File
@@ -85,10 +85,6 @@ export class ExportConfigModal extends Modal {
this.loadAvailableTemplates();
}
private async loadAvailableTemplates(): Promise<void> {
try {
const templateManager = new TemplateManager(this.plugin);
@@ -151,13 +147,13 @@ export class ExportConfigModal extends Modal {
const validationResults = this.validator.validateAllSections(Array.from(this.sections.values()));
if (!validationResults.isValid) {
this.showValidationErrors(validationResults.errors);
this.renderer.showValidationErrors(validationResults.errors);
return;
}
// Show any warnings
if (validationResults.warnings && validationResults.warnings.length > 0) {
this.showValidationWarnings(validationResults.warnings);
this.renderer.showValidationWarnings(validationResults.warnings);
}
// Build export configuration
@@ -199,24 +195,11 @@ export class ExportConfigModal extends Modal {
}
private showValidationErrors(errors: string[]): void {
this.renderer.showValidationErrors(errors);
}
private showValidationWarnings(warnings: string[]): void {
this.renderer.showValidationWarnings(warnings);
}
updateProgress(message: string, percent: number): void {
this.renderer.updateProgress(message, percent);
}
private getOutputFilename(): string {
const noteName = this.state.settings.noteTitle || 'document';
return `${noteName}.pdf`;
}
onClose(): void {
// Clean up state listeners