17 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
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
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