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:
@@ -1,5 +1,5 @@
|
||||
import {Database, QueryResult, RunResult, SQLiteValue} from 'node-sqlite3-wasm';
|
||||
import System from "@/electron/database/System";
|
||||
import System from "../System.js";
|
||||
|
||||
export interface BookQuery extends Record<string, SQLiteValue> {
|
||||
book_id: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Database, RunResult, SQLiteValue} from 'node-sqlite3-wasm';
|
||||
import System from "../System";
|
||||
import System from "../System.js";
|
||||
|
||||
export interface ChapterContentQueryResult extends Record<string, SQLiteValue>{
|
||||
chapter_id: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Database, RunResult, SQLiteValue} from 'node-sqlite3-wasm';
|
||||
import System from "../System";
|
||||
import System from "../System.js";
|
||||
|
||||
export interface CharacterResult extends Record<string, SQLiteValue> {
|
||||
character_id: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Database, RunResult, SQLiteValue} from 'node-sqlite3-wasm';
|
||||
import System from "../System";
|
||||
import System from "../System.js";
|
||||
|
||||
export interface LocationQueryResult extends Record<string, SQLiteValue> {
|
||||
loc_id: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Database, RunResult, SQLiteValue} from 'node-sqlite3-wasm';
|
||||
import System from "../System";
|
||||
import System from "../System.js";
|
||||
|
||||
export interface UserInfosQueryResponse extends Record<string, SQLiteValue> {
|
||||
first_name: string;
|
||||
|
||||
Reference in New Issue
Block a user