Commit Graph

101 Commits

Author SHA1 Message Date
natreex
36abdfced0 Add Tauri app backend setup with dependencies and basic build script
- Introduced `build.rs` for Tauri build process initialization.
- Added `Cargo.toml` with dependencies for Tauri plugins, serialization, cryptography, and database handling.
- Generated `Cargo.lock` to lock package versions for consistency.
2026-04-07 16:46:35 -04:00
natreex
19c8d0057c Remove unused assets, refactor migration handling, and add crash reporting
- Deleted obsolete icons, layout files, and SVG assets.
- Added `useAutoUpdate` hook for streamlined update logic.
- Introduced `auto_migrate_electron` and migration commands for Electron-to-Tauri data migration.
- Implemented `init_panic_hook` for improved crash reporting.
- Updated `.gitignore` for Tauri build output and IDE-specific files.
2026-04-07 16:43:54 -04:00
natreex
5c7e71ce9e Bump app version to 0.5.1 and add auto-update support
- Implemented auto-update logic in `ScribeTopBar` with update notification and user interaction.
- Integrated `@tauri-apps/plugin-updater` and `@tauri-apps/plugin-process` for updater functionality.
- Added automatic migration feature with `autoMigrateElectron` support and UI feedback.
- Refactored app architecture with new routing, components, and layout for better modularity.
- Enhanced JSON response handling in API client for robust data parsing.
- Updated locales to include new translations for update and migration-related UI.
2026-04-07 16:09:35 -04:00
natreex
687c1d582c Remove Act, AutoUpdater, and Book IPC modules alongside associated database logic. 2026-04-05 19:18:42 -04:00
natreex
d4765e6576 Add foundational components and logic for migration, UI design, and input handling
- Introduced foundational UI components (`Badge`, `LockCard`, `SectionHeader`, `AvatarIcon`, etc.) for flexible layouts and consistent design.
- Added migration support with the `MigrationModal` component and backend integration for exporting/importing data between Electron and Tauri.
- Extended form components with `TextAreaInput`, `OrderInput`, `ToggleField`, and `ToolbarSelect` for improved input handling.
- Updated `ScribeShell` with migration popup logic to prompt users for data migration.
- Integrated `AlertStack` for better alert handling and notification management.
- Enhanced Rust/Tauri services with migration command implementations.
- Added translations and styles for new components.
2026-04-05 12:52:54 -04:00
natreex
2b6d4cc48b Update book handling and improve offline/online sync logic
- Enhanced the `BookProps` struct with updated field mappings for better API compatibility.
- Improved offline/online sync workflows in `BookList` by adding `localBook` property handling and new item count methods for segmented tracking of local/online items.
- Updated click handlers in `BookList` to fetch data based on connectivity state and prioritize local data when offline.
- Refactored the decryption and vault handling logic in Rust to remove obsolete legacy methods and standardize debug behavior.
- Introduced `ScribeShell` layout component with foundational logic for book/chapter syncing and offline queue handling.
- Added `init_panic_hook` to improve crash reporting during Rust app initialization.
2026-04-05 11:36:12 -04:00
natreex
b9bc024e91 Introduce local fallback for book creation and improve error handling
- Added support for creating books locally when the cloud limit is reached.
- Enhanced error handling in `AddNewBookForm` with `ApiError` and fallback logic for local book creation.
- Implemented `BookTypeLimit` to manage type-specific book limits with visual indicators in `BookList`.
- Refactored `TombstoneRecord` to standardize naming conventions for better API compatibility.
- Updated `useSyncSeries` and `useSyncBooks` to handle empty tombstones gracefully.
- Updated locales with new translations for fallback and error messaging.
2026-03-31 09:18:11 -04:00
natreex
acacd95f38 Add useAuthentication hook and enhance useRouter for improved navigation and session management
- Introduced `useAuthentication` hook to handle session state, PIN verification, and offline mode logic.
- Updated `useRouter` to include type definitions for better navigation instance typing.
- Refined authentication flow with error handling, user session initialization, and token validation.
2026-03-30 21:17:46 -04:00
natreex
e1d87c6997 Refactor subscription logic and replace quill-sense references with ritor equivalents
- Updated `getCurrentSubscription` and related functions to reflect terminology changes.
- Adjusted subscription levels and access checks to streamline logic.
- Removed unused cases in `getSubLevel` and optimized conditionals for clarity.
2026-03-30 21:13:55 -04:00
natreex
dbbe33b19b Refactor and extend offline synchronization logic across components and services
- Integrated sync queue mechanisms with `LocalSyncQueueContext` for offline data handling.
- Updated key sync-related services (e.g., book, chapter, series) to support offline-first functionality.
- Removed redundant database fetch methods to optimize repository logic and improve maintainability.
- Enhanced Tauri IPC usage for sync operations and removed legacy methods in Rust services.
2026-03-30 21:06:58 -04:00
natreex
b9606e899a Refactor schema migrations, optimize queries, and improve data fetching logic
- Simplified `run_dev_queries` by delegating schema updates to `run_migrations` for consistency.
- Added universal `fetch_all_*_by_book` methods for streamlined data retrieval across repositories.
- Replaced nested query logic with batch fetching to improve performance and maintainability.
- Optimized HTML-to-text conversion by consolidating regex patterns with `LazyLock`.
2026-03-24 23:14:33 -04:00
natreex
25c7f25a0e Migrate vault encryption to OS keyring, handle PIN rate limiting, and improve tombstone handling logic.
- Replaced legacy vault key derivation with OS keyring-backed storage for improved security and platform integration.
- Introduced PIN rate limiting with configurable lockout durations to mitigate brute-force attacks.
- Enhanced tombstone services to use unified error-handling logic via `apply_tombstone`.
- Refactored logic for book and series data synchronization, fixing null checks and improving flow consistency.
- Added comprehensive error handling to all database and vault operations in key manager services.
2026-03-24 23:05:56 -04:00
natreex
cfd08e3261 Bump app version to 0.5.0 and implement offline mode support across components
- Added offline detection logic with `OfflineContext` to improve app functionality in offline scenarios.
- Integrated Tauri IPC functions to handle local tool settings and character attributes when offline.
- Refined indentation logic in `TextEditor` for better compatibility with WebKit engines.
- Removed unused `indent` property and related settings in editor components to simplify configuration.
- Updated locale files with improved translation consistency and parameterized placeholders.
2026-03-24 22:45:10 -04:00
natreex
a114592ac9 Add terms of use translations, sync detection, and refactor book components
- Introduced new translations for terms of use in French and English locales.
- Added sync status detection logic for books in `BookList` and `BookCard` components.
- Refactored `BookCard` to handle additional props and improve layout flexibility.
- Enhanced `TermsOfUse` component with complete localization support and refuse functionality.
- Updated data decryption logic in Rust services to handle optional fields and additional metadata consistently.
- Improved offline/online synchronization workflows with extended context properties.
2026-03-23 11:56:35 -04:00
natreex
64ed90d993 Remove unused components and models for improved maintainability
- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files.
- Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter.
- Updated project structure and references to reflect these removals.
2026-03-22 22:37:31 -04:00
natreex
e8aaef108b Refactor decryption logic to handle empty fields consistently across services 2026-03-22 15:50:36 -04:00
natreex
32d2b0fa5a Refactor: Remove unused structs, redundant services, and streamline repository models 2026-03-21 23:01:27 -04:00
natreex
1478fe10dd Refactor and clean up
- Removed unused services (`cover`, `character`, `series_location` modules) and legacy methods to reduce code clutter.
- Consolidated `IncidentProps` and `PlotPointProps` into `incident.service` and `plotpoint.service` modules, replacing duplicated definitions.
- Updated references across modules (`act`, `incident.service`, `character`) for consistency.
- Improved serialization with `serde` for `IncidentProps`.
- Enhanced `get_incitents_incidents` to include optional chapters.
2026-03-21 11:29:58 -04:00
natreex
1f99fe0bdc Add database module with connection manager and schema initialization
- Introduced `DatabaseManager` for handling SQLite connections per user with WAL and foreign key support.
- Implemented `initialize_schema` to set up comprehensive database schema covering AI, books, characters, locations, series, and sync tracking.
- Added migration helpers for schema versioning and column updates.
- Structured database module into `connection.rs` and `schema.rs` for clearer organization.
2026-03-21 09:35:06 -04:00
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
94cac463fb Bump app version to 0.3.1 and update dependencies in package-lock.json 2026-02-09 19:59:36 -05:00
natreex
49bb6e06f5 Add deletedAt timestamps to delete operations for better audit tracking
- Updated delete methods across hooks and components to include `deletedAt: System.timeStampInSeconds()`.
- Refactored synchronized delete logic to pass `deletedAt` for both offline and online states.
- Improved synchronization workflows to include `deletedAt` in server and IPC requests.
- Enhanced destructuring patterns for cleaner and more consistent request data.
2026-02-09 17:12:03 -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
cec5830360 Introduce series management functionality and repository updates
- Added `series-world.repo.ts` to handle database operations related to series worlds and their elements.
- Implemented `series-sync.repo.ts` for managing synchronization between books and series.
- Expanded `spell.ipc.ts` data models to include `seriesSpellId` for spell synchronization.
- Refactored `insertSpellTag` method in `spelltag.repo.ts` for improved error handling and logic clarity.
2026-01-26 19:57:56 -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
512955d10a Remove temporary dev queries from schema initialization 2026-01-26 12:15: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
57bf0c6ec3 Bump app version to 0.1.1 in package.json 2026-01-23 10:48:08 -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
e7d35c0f0b Expand database schema to support spell management
- Added `spells_enabled` column to `book_tools` table.
- Introduced `book_spells` and `book_spell_tags` tables with related indexes for spell and tag storage.
- Updated database initialization and migration scripts to include new tables and fields.
2026-01-19 22:31:44 -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
0020b3abbd Add auto-update functionality for Electron app
- Integrated `electron-updater` dependency for managing app updates.
- Configured publishing settings with a generic provider and download URL.
- Added `initAutoUpdater` method to handle app updates and implemented it in the main process.
- Updated `package.json` and `package-lock.json` to include `electron-updater` and related dependencies.
2026-01-15 20:00:25 -05:00
natreex
da03f221ae Remove unused OfflineIndicator, OfflineSyncDetails, and OfflineSyncManager components
- Deleted obsolete offline-related components as they are no longer in use.
- Simplified imports and removed related context dependencies.
- Updated synchronization and toggle switch handling in `CharacterComponent`, `WorldSetting`, and `LocationComponent` to improve consistency.
2026-01-15 19:26:09 -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
ac968b7764 Refactor Book model and related components for consistent property naming
- Replaced `id` with `bookId` in `BookProps` and updated corresponding references.
- Added `tools` property to book-related components for tool management.
- Removed unused `books` property from `User` model.
- Added debug logs in `deleteBook` and `BookList` for troubleshooting.
2026-01-15 17:22:59 -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
7215ac5c4f Update QuillSense conditional logic in UI components
- Adjusted conditions in `ScribeControllerBar`, `DraftCompanion`, and `DraftWordCount` to respect `QuillSense` enablement.
- Ensured consistent handling of `quillsenseEnabled` property across features.
2026-01-14 09:23:08 -05:00
natreex
fc42269c8c Add synchronization support for guidelines and AI guidelines
- Implemented syncing for `GuideLine` and `AIGuideLine` entities with encryption and decryption workflows.
- Refined `GuidelineRepo` methods to check existence and update/insert records for both guideline types.
- Updated timestamp handling in `GuideLine` and `AIGuideLine` models for accurate tracking.
- Corrected QuillSense localization keys for labels and descriptions.
- Improved database queries and modularized logic for consistency.
2026-01-14 09:17:56 -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
8bad6159cf Refactor imports and types for consistency and remove redundant paths
- Updated relative imports by replacing `@/` aliases with proper `../` paths for consistency.
- Refined type definitions in IPC handlers and repositories (`User`, `Chapter`, `Act`, etc.).
- Simplified return types in `Location` model methods for streamlined usage.
2026-01-12 14:22:27 -05:00
natreex
cc7d03bee9 Refactor IPC handlers to integrate new models and improve maintainability
- Replaced `Book`-based references with specialized models (`Act`, `Issue`, `World`, `GuideLine`, etc.) for enhanced modularity.
- Updated synchronization, story, guideline, plot, and world-related methods to align with new models.
- Removed redundant type definitions and adjusted interfaces for consistency.
2026-01-12 13:49:51 -05:00
natreex
cf6fb97bf0 Add models for guidelines, incidents, plot points, issues, acts, and world data
- Introduced new models: `GuideLine`, `Incident`, `PlotPoint`, `Issue`, `Act`, and `World` for managing book-related entities.
- Integrated encryption/decryption for sensitive properties in all models using user-specific keys.
- Added methods for CRUD operations and synchronization workflows with error handling and multilingual support.
- Improved maintainability with JSDoc comments and streamlined queries.
2026-01-12 13:38:10 -05:00
natreex
d9bf089e32 Refactor BookRepo methods and improve error handling
- Add JSDoc comments for better maintainability and code clarity in `BookRepo` methods.
- Streamline query definitions using variables to improve readability.
- Consolidate error handling logic across all methods.
- Ensure multilingual support in error messages for consistent user feedback.
- Remove redundant error branches and simplify unknown error processing.
2026-01-12 09:57:37 -05:00
natreex
9ad2ee9692 Remove redundant interfaces and methods related to book repository
- Deleted unused database table interfaces and repository methods for book acts, chapters, characters, locations, worlds, and related entities.
- Reduced code complexity by consolidating remaining logic under streamlined methods in `BookRepo`.
- Improved maintainability by cleaning up outdated query interfaces and redundant synchronization code.
2026-01-12 09:34:02 -05:00