Commit Graph

33 Commits

Author SHA1 Message Date
natreex
ee4438834c Migrate from window.electron to tauri IPC functions across components
- Replaced `window.electron.invoke` calls with equivalent `tauri` function calls for all IPC interactions.
- Removed `electron.d.ts` TypeScript definitions as they are no longer needed.
- Updated related logic for offline/online state synchronization.
- Added `types.rs` and `shared/mod.rs` modules to support Tauri IPC integration with Rust enums and shared logic.
- Refactored IPC request queues to use updated handler names for consistency with Tauri.
2026-03-21 09:34:13 -04:00
natreex
1a15692e40 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.
2026-03-11 11:52:25 -04:00
natreex
ceaecb19fc Remove ExportBook component and integrate new export workflows
- Deleted `ExportBook` component and its usage in `BookCard.tsx`.
- Integrated improved book export workflows in `BookSettingOption` for better user experience.
- Updated database models and repositories to support export options with chapter/version selection.
- Added localization support for export-related messages and tooltips.
- Upgraded dependencies to include libraries required for export formats (e.g., DOCX, PDF, EPUB).
- Bumped app version to 0.4.1.
2026-03-05 16:31:56 -05:00
natreex
209dc6f85a Remove CharacterComponent and CharacterDetail components
- Deleted `CharacterComponent` and `CharacterDetail` files from the project.
- Refactored related logic to improve code maintainability and reduce redundancy.
2026-02-05 14:12:08 -05:00
natreex
2359638cb0 Bump app version to 0.2.1 and add Spell and DeleteButton components
- Introduced comprehensive `Spell` models with tagging and state management capabilities.
- Added reusable `DeleteButton` component with confirmation workflow for destructive actions.
2026-01-26 14:24:22 -05:00
natreex
0fbd3743e7 Expand character model with additional attributes and advanced customization options
- Added fields such as `nickname`, `age`, `gender`, `species`, `nationality`, `status`, and others to enhance character customization.
- Modified localization files to include new field labels and placeholders.
- Updated `CharacterComponent` and `CharacterDetail` components with UI elements for the newly added attributes.
- Introduced "Advanced Mode" toggle to manage visibility of extended customization options.
- Refactored database models and repository methods (`addNewCharacter`, `updateCharacter`, and `fetchCharacters`) to handle the extended schema.
- Improved data encryption and decryption workflows for secure storage of added attributes.
- Enhanced user experience by reorganizing character customization layouts.
2026-01-23 20:49:57 -05:00
natreex
4e462670a9 Add character deletion functionality with confirmation workflow
- Added `handleDeleteCharacter` method to handle character deletion with confirmation prompts.
- Updated `CharacterComponent` and `CharacterDetail` to include delete button and related logic.
- Localized new strings for character deletion (e.g., confirmation prompts, success/error messages).
- Enhanced database repository methods (`deleteCharacter`) to handle character deletion securely.
- Improved synchronization workflows to accommodate character deletion.
2026-01-22 15:09:04 -05:00
natreex
9461eb6120 Add spell management to book settings
- Moved spell-related components to the `book/settings/spells` directory for better organization.
- Added "Spells" as a new tool in book settings and composer sidebar with localization support.
- Integrated spell-related UI elements (`SpellComponent`, `SpellList`, `SpellTagManager`) into settings and sidebars.
- Updated logic to handle enabling/disabling of the spells tool per book.
2026-01-19 23:00:33 -05:00
natreex
fd09a5531c Add comprehensive spell management functionality
- Introduced spell management with creation, editing, deletion, and tagging capabilities.
- Added `Spell`, `SpellList`, `SpellTagManager` models with corresponding IPC handlers for data operations.
- Implemented `SpellList` and `SpellTagChip` components for UI interactions with spells and tags.
- Localized spell-related strings for English (e.g., error messages, tooltips, and prompts).
- Enhanced database models and repositories with encryption and decryption workflows for secure data handling.
- Updated API to include filtering, searching, and tag-based spell management options.
2026-01-19 21:38:38 -05:00
natreex
c62a7eb0f7 Add advanced generation options with Explicit and Smart modes
- Implemented `AdvancedGenerationOptions` component for toggling Explicit and Smart modes with confirmation dialogs.
- Integrated generation options into `GhostWriter`, `DraftCompanion`, and `ShortStoryGenerator`.
- Introduced `ToggleWithConfirmation` component for user interaction with alerts.
- Updated `InputField` to support centered alignment for better layout flexibility.
- Localized Explicit and Smart mode strings in English and French.
- Enhanced content preview logic to filter placeholder text before display.
- Added `autoUpdater` initialization checks and refactored updater setup for improved reliability.
2026-01-17 23:26:22 -05:00
natreex
2e6b30c632 Add support for syncing tool settings with lastUpdate and improve consistency
- Introduced `lastUpdate` field in `book_tools` for tracking changes.
- Refactored tool enablement logic in `CharacterComponent`, `WorldSetting`, and `LocationComponent` for consistency.
- Updated database schema and migration scripts for `book_tools` table.
- Enhanced synchronization workflows to support new `lastUpdate` logic.
- Adjusted related models, repositories, and IPC handlers for streamlined management.
- Improved type safety and robustness in tool-related methods with additional checks.
2026-01-15 18:35:48 -05:00
natreex
3d4feaa680 Refactor IPC handlers, types, and models for streamlined data handling
- Unified return types across IPC handlers (`Character`, `Location`, `World`, and `Book`) for consistency.
- Replaced `BookListProps` with `BookProps` for simplified type usage in components and handlers.
- Cleaned up obsolete `BookListProps` interface and applied consistent typings throughout.
- Updated imports to include revised response types (`CharacterListResponse`, `LocationListResponse`, `WorldListResponse`).
- Adjusted data transformation logic in `BookList` and related components to align with new type definitions.
2026-01-15 16:12:20 -05:00
natreex
e45a15225b Add enable/disable management for book tools (characters, worlds, and locations)
- Introduced toggling functionality for managing `characters`, `worlds`, and `locations` tool availability per book.
- Updated `CharacterComponent`, `WorldSetting`, and `LocationComponent` with toggle switches for tool enablement.
- Added `book_tools` database table and related schema migration for storing tool settings.
- Extended API calls, models, and IPC handlers to support tool enablement states.
- Localized new strings for English with supporting descriptions and messages.
- Adjusted conditional rendering logic across components to respect tool enablement.
2026-01-14 17:42:59 -05:00
natreex
707da73551 Add ToggleSwitch component and QuillSense settings management
- Added `ToggleSwitch` component for handling toggles with labels, descriptions, and disabled states.
- Introduced `QuillSenseSetting` component for managing QuillSense enablement and advanced prompt settings.
- Integrated `QuillSenseSettings` model and API calls for fetching and updating settings.
2026-01-13 19:53:35 -05:00
natreex
306262caba Add QuillSense support with settings and integration
- Introduced new "QuillSense" feature for AI-assisted book creation.
- Added QuillSense settings panel with advanced options and disable/enable functionality.
- Updated GhostWriter and TextEditor components to respect QuillSense settings.
- Extended models and repositories to track and manage QuillSense state per book.
- Localized new strings for English and French.
2026-01-13 19:52:31 -05:00
natreex
7f34421212 Add error handling, enhance syncing, and refactor deletion logic
- Introduce new error messages for syncing and book deletion in `en.json`.
- Update `DeleteBook` to support local-only deletion and synced book management.
- Refine offline/online behavior with `deleteLocalToo` checkbox and update related state handling.
- Extend repository and IPC methods to handle optional IDs for updates.
- Add `SyncQueueContext` for queueing offline changes and improving synchronization workflows.
- Enhance refined text generation logic in `DraftCompanion` and `GhostWriter` components.
- Replace PUT with PATCH for world updates to align with API expectations.
- Streamline `AlertBox` by integrating dynamic translation keys for deletion prompts.
2026-01-10 15:50:03 -05:00
natreex
060693f152 Add OAuth login support and streamline authentication flows
- Introduced `oauthLogin` method in `electron/preload.ts` and backend IPC handlers for OAuth via `BrowserWindow`.
- Replaced web-based OAuth redirection with Electron-specific implementation for Google, Facebook, and Apple.
- Refactored `SocialForm.tsx` to handle OAuth login success and token management via Electron.
- Updated `User`, `QuillSense`, and context methods to include `quill-trial` subscriptions and extended login logic.
- Cleaned up code, removed unused imports, and improved error handling for authentication scenarios.
2026-01-08 11:03:19 -05:00
natreex
55cd5d8ed0 Replace i18next with next-intl for translations and dynamic imports. Refactor System API calls to use os.platform() for accurate platform detection. Simplify and clean up dependencies in package.json. 2025-12-24 15:57:18 -05:00
natreex
0366a2d444 - Add multi-language support for registration and user menu components
- Refactor `TextEditor` to include book-closing functionality with updated toolbar buttons
- Replace `generateHTML` with a lightweight custom TipTap-to-HTML renderer
- Update and lock `esbuild` and related dependencies to latest versions
2025-12-23 23:24:17 -05:00
natreex
515d469ba7 Add multi-language support and new repository methods for book synchronization
- Extend repository methods to handle API requests for fetching books, chapters, characters, and other entities with multilingual support (`lang: 'fr' | 'en'`).
- Add `uploadBookForSync` logic to consolidate and decrypt book data for synchronization.
- Refactor schema migration logic to remove console logs and streamline table recreation.
- Enhance error handling across database repositories and IPC methods.
2025-12-22 16:44:12 -05:00
natreex
43c7ef375c Refactor ScribeChapterComponent and offline handlers for seamless local and server operations
- Add stricter typings (`RefObject`) and improve type safety.
- Introduce conditional logic for `localBook` to
2025-12-19 10:39:59 -05:00
natreex
f5e66f8983 Integrate offline logic for book creation and enhance synchronization
- Add offline handling to `AddNewBookForm` by updating `BooksSyncContext` with server-only and local-only book management.
- Refactor `guideTourDone` to check offline completion states via `localStorage`.
- Update and lock dependencies, including `@esbuild` and `@next`, to latest versions.
- Clean up unused session state updates in book creation logic.
2025-12-15 23:03:32 -05:00
natreex
64c7cb6243 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.
2025-12-15 20:55:24 -05:00
natreex
bb331b5c22 Add BooksSyncContext, refine database schema, and enhance synchronization support
- Introduce `BooksSyncContext` for managing book synchronization states (server-only, local-only, to-sync, etc.).
- Remove `UserContext` and related dependencies.
- Refine localization strings (`en.json`) with sync-related updates (e.g., "toSyncFromServer", "toSyncToServer").
- Extend database schema with additional tables and fields for syncing books, chapters, and related entities.
- Add `last_update` fields and update corresponding repository methods to support synchronization logic.
- Enhance IPC handlers with stricter typing, data validation, and sync-aware operations.
2025-12-07 14:36:03 -05:00
natreex
9e51cc93a8 Remove SyncService and introduce context-based offline mode and state management
- Delete `SyncService` and its associated bidirectional synchronization logic.
- Add multiple context providers (`OfflineProvider`, `AlertProvider`, `LangContext`, `UserContext`, `SessionContext`, `WorldContext`, `SettingBookContext`) for contextual state management.
- Implement `SecureStorage` for OS-level secure data encryption and replace dependency on `SyncService` synchronization.
- Update localization files (`en.json`, `fr.json`) with offline mode and error-related strings.
2025-11-19 22:01:24 -05:00
natreex
f85c2d2269 Add offline mode support with PIN configuration and management
- Introduce `OfflinePinSetup` component for users to configure secure offline access.
- Add new `AIUsageContext` and extend `OfflineProvider` for offline-related state management.
- Implement offline login functionality in `electron/main.ts` with PIN verification and fallback support.
- Enhance IPC handlers to manage offline mode data, PIN setup, and synchronization.
- Update localization files (`en.json`, `fr.json`) with offline mode and PIN-related strings.
- Add `bcrypt` and `@types/bcrypt` dependencies for secure PIN hashing and validation.
- Refactor login and session management to handle offline mode scenarios with improved error handling and flow.
2025-11-19 19:58:55 -05:00
natreex
dde4683c38 Migrate from electron-store to OS-level secure storage (getSecureStorage)
- Replace `electron-store` with OS-level encrypted storage for secure token, userId, and language management in `LocalSystem` and `keyManager`.
- Add `init-user` IPC handler to initialize user data and manage encryption keys.
- Update login process to handle encrypted storage saving with fallback for macOS issues.
- Add offline warning component to `login/page.tsx` to handle first-time sync requirements.
- Remove `electron-store` and associated dependencies from `package.json` and `package-lock.json`.
2025-11-19 19:10:12 -05:00
natreex
004008cc13 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.
2025-11-18 21:28:41 -05:00
natreex
d018e75be4 Remove DataService and OfflineDataService, refactor book and character operations to use streamlined handlers in LocalSystem
- Delete `data.service.ts` and `offline-data.service.ts`, consolidating functionality into `LocalSystem`.
- Refactor book, character, and conversation operations to adopt unified, multilingual, and session-enabled IPC handlers in `LocalSystem`.
- Simplify redundant legacy methods, enhancing maintainability and consistency.
2025-11-18 21:02:38 -05:00
natreex
3bc30d42ad Remove Story model handling verbal styles and linguistic properties
- Delete `Story` model implementation including `getVerbesStyle` method and related properties.
- Cleanup unused interfaces and redundant logic from the codebase.
2025-11-17 21:32:42 -05:00
natreex
d5eb1691d9 Add database schema, encryption utilities, and local database service
- Implement `schema.ts` for SQLite schema creation, indexing, and sync metadata initialization.
- Develop `encryption.ts` with AES-256-GCM encryption utilities for securing database data.
- Add `database.service.ts` to manage CRUD operations with encryption support, user-specific databases, and schema initialization.
- Integrate book, chapter, and character operations with encrypted content handling and sync preparation.
2025-11-17 09:34:54 -05:00
natreex
09768aafcf Implement synchronization, offline data handling, and intelligent request routing
- Add services for offline data management, including `offline-data.service.ts`, ensuring data is saved to a local database and synced with the server when online.
- Introduce bidirectional `SyncService` for managing data synchronization with conflict resolution and retry mechanisms.
- Create `data.service.ts` to handle smart routing between local database and server API based on connectivity status.
- Update models and logic to support comprehensive synchronization for books, chapters, characters, and conversations.
- Implement event listeners for online/offline detection and automatic sync scheduling.
2025-11-17 07:47:15 -05:00
natreex
b4eafca3bc Add comprehensive models and script for handling inline scripts and structured data
- Implement `remove-inline-scripts.js` to externalize Next.js inline scripts, enhancing CSP compliance.
- Add models for `Book`, `Character`, `Story`, `Editor`, `System`, and `BookSerie` with relevant properties and utilities.
- Include macOS entitlements plist for app development with advanced permissions.
- Add utility functions to handle script hashing, cookie management, and content formatting.
2025-11-16 19:56:14 -05:00