Refactor imports, streamline database IPC handlers, and improve offline support
- Replace absolute import paths with relative paths for consistency across files. - Transition database operations in Electron main process to modular handlers in `ipc/book.ipc.ts` using the `createHandler` pattern. - Update database sync service to use `window.electron.invoke()` for improved reliability and structure. - Refactor `AddNewBookForm` to handle both online and offline book creation seamlessly.
This commit is contained in:
@@ -18,8 +18,7 @@ import fs from "fs";
|
||||
import BookRepo from "../repositories/book.repository.js";
|
||||
import Chapter, {ActChapter, ChapterContentData, ChapterProps} from "./Chapter.js";
|
||||
import UserRepo from "../repositories/user.repository.js";
|
||||
import ChapterRepo from "@/electron/database/repositories/chapter.repository";
|
||||
import {mainStyle} from "@/electron/database/models/EpubStyle";
|
||||
import ChapterRepo from "../repositories/chapter.repository.js";
|
||||
|
||||
export interface BookProps{
|
||||
id:string;
|
||||
|
||||
Reference in New Issue
Block a user