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:
natreex
2025-11-18 21:28:41 -05:00
parent d018e75be4
commit 004008cc13
13 changed files with 45 additions and 237 deletions

View File

@@ -1,7 +1,7 @@
import UserRepo, {UserAccountQuery, UserInfosQueryResponse} from "@/electron/database/repositories/user.repository";
import System from "@/electron/database/System";
import Book, {BookProps} from "@/electron/database/models/Book";
import {getUserEncryptionKey} from "@/electron/database/keyManager";
import UserRepo, {UserAccountQuery, UserInfosQueryResponse} from "../repositories/user.repository.js";
import System from "../System.js";
import Book, {BookProps} from "./Book.js";
import {getUserEncryptionKey} from "../keyManager.js";
interface UserAccount{
firstName:string;