feat: add multi-file export support using files-menu event
- Add files-menu event handler for multi-file selection in file explorer - Create exportFiles() method for batch export with default settings - Create showExportModalForFiles() method for batch export with configuration - Add exportFilesWithConfig() helper for batch processing - Update ExportConfigModalSettings to support files array - Update modal header to show file count for multi-file exports - Users can now select multiple files and export them all at once - Maintains backward compatibility with single file exports 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
3 files changed
+177
-1
No files matched your search
@@ -100,8 +100,13 @@ export class ExportConfigModal extends Modal {
|
||||
header.createEl('h2', { text: 'Export to PDF' });
|
||||
|
||||
if (this.state.settings.noteTitle) {
|
||||
const isMultiFile = this.state.settings.files && this.state.settings.files.length > 1;
|
||||
const displayText = isMultiFile
|
||||
? `Exporting ${this.state.settings.files!.length} files`
|
||||
: `Exporting: ${this.state.settings.noteTitle}`;
|
||||
|
||||
header.createEl('p', {
|
||||
text: `Exporting: ${this.state.settings.noteTitle}`,
|
||||
text: displayText,
|
||||
cls: 'export-note-title'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Type definitions for the Export Configuration Modal
|
||||
*/
|
||||
|
||||
import { TFile } from 'obsidian';
|
||||
import { ExportFormat } from '../core/settings';
|
||||
|
||||
export interface ExportConfig {
|
||||
@@ -24,6 +25,8 @@ export interface ExportConfigModalSettings extends ExportConfig {
|
||||
notePath: string;
|
||||
/** Note title for display */
|
||||
noteTitle: string;
|
||||
/** Files being exported (for multi-file export) */
|
||||
files?: TFile[];
|
||||
/** Available templates from TemplateManager */
|
||||
availableTemplates: string[];
|
||||
/** Current export in progress */
|
||||
|
||||
Reference in new issue
Block a user