Update database schema and synchronization logic
- Add `useEffect` in `ScribeLeftBar` for handling book state changes. - Extend `BooksSyncContext` with new properties and stricter typings. - Refine `Repositories` to include `lastUpdate` handling for synchronization processes. - Add comprehensive `fetchComplete*` repository methods for retrieving entity-specific sync data. - Enhance offline logic for chapters, characters, locations, and world synchronization. - Improve error handling across IPC handlers and repositories.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
import {faFeather, faGlobe, faInfoCircle, faMapMarkerAlt, faUsers} from "@fortawesome/free-solid-svg-icons";
|
||||
import {RefObject, useContext, useRef, useState} from "react";
|
||||
import {RefObject, useContext, useEffect, useRef, useState} from "react";
|
||||
import {BookContext} from "@/context/BookContext";
|
||||
import {ChapterContext} from "@/context/ChapterContext";
|
||||
import {PanelComponent} from "@/lib/models/Editor";
|
||||
import PanelHeader from "@/components/PanelHeader";
|
||||
import AboutEditors from "@/components/rightbar/AboutERitors";
|
||||
@@ -57,6 +56,14 @@ export default function ComposerRightBar() {
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(():void => {
|
||||
if (!book){
|
||||
setCurrentPanel(undefined);
|
||||
setPanelHidden(false);
|
||||
return;
|
||||
}
|
||||
}, [book]);
|
||||
|
||||
const editorComponents: PanelComponent[] = [
|
||||
{
|
||||
id: 1,
|
||||
|
||||
Reference in New Issue
Block a user