Introduce Import and Advanced Export Features
- Added `ImportBookForm` component for importing DOCX files with chapter selection and metadata customization. - Implemented advanced export options (PDF, DOCX, EPUB) with `ExportSetting` component. - Developed utility methods for transforming books into exportable formats in `Export.ts`. - Expanded database models and repositories to support import/export functionality. - Enhanced localization for import/export flows and updated UI components for improved user experience.
This commit is contained in:
19
lib/configs.ts
Normal file
19
lib/configs.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import packageJson from '../package.json';
|
||||
|
||||
export interface Configs {
|
||||
apiUrl: string;
|
||||
baseUrl: string;
|
||||
appName: string;
|
||||
appDescription: string;
|
||||
appVersion: string;
|
||||
}
|
||||
|
||||
const isProduction: boolean = true;
|
||||
|
||||
export const configs: Configs = {
|
||||
apiUrl: isProduction ? 'https://api.eritors.com/' : 'http://localhost:3001/',
|
||||
baseUrl: isProduction ? 'https://scribe.eritors.com/' : 'http://localhost:3000/',
|
||||
appName: 'ERitors Scribe',
|
||||
appDescription: 'ERitors Scribe est une application de prise de notes et d\'écriture collaborative.',
|
||||
appVersion: packageJson.version,
|
||||
};
|
||||
17
lib/models/Import.ts
Normal file
17
lib/models/Import.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface ParsedChapterPreview {
|
||||
index: number;
|
||||
title: string;
|
||||
wordCount: number;
|
||||
}
|
||||
|
||||
export interface ParsedDocxResponse {
|
||||
importId: string;
|
||||
chapters: ParsedChapterPreview[];
|
||||
}
|
||||
|
||||
export interface ImportChapterSelection {
|
||||
index: number;
|
||||
title: string;
|
||||
wordCount: number;
|
||||
selected: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user