Enhancement for Custom Title Bar and general improved App behavior#36
Conversation
…o custom title bar - Add File menu with New Database, Open Recent, Save, and Close Database options - Add Edit menu with Undo/Redo functionality (Ctrl+Z/Ctrl+Y shortcuts) - Add View menu with Toggle Search option - Add Help menu with About dialog - Implement undo/redo system using new useUndoRedo hook - Add OpenRecentDialog component for quick access to recent databases - Add recent database tracking via addRecentDatabase calls
- Add addToHistory prop to EntryList, EntryListItem, and GroupTree components - Implement undo/redo tracking for entry creation, deletion, and favorite toggle operations - Implement undo/redo tracking for group creation, rename, and move operations - Implement undo/redo tracking for entry move operations between groups - Add findGroupByName utility function to locate groups by name and parent UUID - Set global __addToHistory on window object
…databases - Remove OpenRecentDialog component and related state/handlers from MainApp - Add DropdownMenuSub components to CustomTitleBar for inline recent databases submenu - Load recent databases on mount using getRecentDatabases and store in local state - Implement openDatabaseInNewInstance function to open databases in new app instances via shell - Display recent database filenames with truncation and full path tooltips
…ment toggle behavior for search - Add data-tauri-drag-region to app icon, title text, right controls container, and menu separator - Simplify database path splitting regex to handle both forward and backslashes - Change onToggleSearch to toggle search visibility instead of only opening - Clear search when toggling off via onToggleSearch handler
…n for new instance spawning - Move openDatabaseInNewInstance logic from CustomTitleBar to lib/tauri.ts - Add open_database_in_new_instance Tauri command to spawn new app instances via std::process::Command - Replace shell plugin usage with invoke call to new Tauri command - Rename openDatabaseInNewInstance to handleOpenDatabase in CustomTitleBar for clarity - Register open_database_in_new_instance command in main.rs invoke_handler
There was a problem hiding this comment.
Pull request overview
This pull request adds significant UI enhancements to the password manager, including a custom title bar with multi-level dropdown menus (File, Edit, View, Help), an About dialog/page, recent database tracking, and an experimental undo/redo system. The changes aim to improve the user experience by making key features more accessible through menu actions and keyboard shortcuts.
Changes:
- Added custom title bar menus with File (New/Open Recent/Save/Close), Edit (Undo/Redo), View (Toggle Search), and Help (About) options
- Implemented recent database tracking in localStorage with UI integration in the File menu
- Added undo/redo functionality for database operations (create/delete/move entries and groups)
- Created About dialog and dedicated About page to display app information
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
| src-tauri/tauri.conf.json | Added shell permissions and about window capability |
| src-tauri/src/main.rs | Registered new open_database_in_new_instance command |
| src-tauri/src/commands/database.rs | Implemented command to spawn new app instance with database path |
| lib/window.ts | Added openAboutWindow function for About page |
| lib/tauri.ts | Added TypeScript binding for opening database in new instance |
| lib/storage.ts | Implemented recent databases tracking functions (add, get, clear) |
| components/main-app/index.tsx | Integrated undo/redo, menu handlers, and CreateDatabaseDialog |
| components/main-app/hooks/useUndoRedo.ts | New hook implementing undo/redo history management |
| components/main-app/hooks/useKeyboardShortcuts.ts | Added keyboard shortcuts for new features (Ctrl+W, Ctrl+N, Ctrl+Z, Ctrl+Y) |
| components/group-tree/utils.ts | Added findGroupByName helper function for undo operations |
| components/group-tree/types.ts | Added addToHistory prop for undo/redo integration |
| components/group-tree/index.tsx | Integrated undo/redo tracking for group operations |
| components/entry-list/types.ts | Added addToHistory prop for undo/redo integration |
| components/entry-list/index.tsx | Integrated undo/redo tracking for entry create/delete |
| components/entry-list/EntryListItem.tsx | Added undo/redo tracking for favorite toggle |
| components/UnlockScreen.tsx | Added recent database tracking on unlock |
| components/QuickUnlockScreen.tsx | Added recent database tracking on quick unlock |
| components/OpenRecentDialog.tsx | New dialog component for viewing/managing recent databases (unused) |
| components/CustomTitleBar.tsx | Expanded with multi-level dropdown menus and new actions |
| components/CreateDatabaseDialog.tsx | Added recent database tracking on create |
| components/AboutDialog.tsx | New dialog component showing app information |
| components/About.tsx | New full-page About component with app details |
| app/about/page.tsx | New Next.js page for About window |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@jonax1337 I've opened a new pull request, #37, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
…tabase is already open - Add openedInNewInstance parameter to CreateDatabaseDialog onSuccess callback - Add hasOpenDatabase prop to CreateDatabaseDialog to detect if database is currently open - Import openDatabaseInNewInstance from lib/tauri in CreateDatabaseDialog - Implement conditional logic: open new database in new instance if database already open, otherwise open in current instance - Update handleNewDatabaseSuccess
…nax1337/Password-Manager into enhancement/title-bar-actions
- Remove handleCopyPassword function and its dependencies (selectedEntryForCopy, toast) - Remove handlePaste function - Remove onCopy and onPaste props from child component
Remove non-functional handlePaste placeholder
|
@jonax1337 I've opened a new pull request, #38, to work on those changes. Once the pull request is ready, I'll request review from you. |
… valid KDBX files Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
…file Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
Validate recent database paths before display and auto-cleanup stale entries
This pull request introduces several user interface enhancements and improvements to database management in the password manager app. The main changes include new dialogs for "About" and "Open Recent Database", a more feature-rich custom title bar with menus, and improved tracking of recent databases throughout the app.
UI Enhancements
Aboutpage (app/about/page.tsx) and an interactiveAboutDialogcomponent (components/AboutDialog.tsx) to provide information about the app, its features, tech stack, and links to GitHub and issue reporting. [1] [2] [3]OpenRecentDialogcomponent to allow users to view, select, and remove recently opened databases in a dedicated dialog.Custom Title Bar Improvements
CustomTitleBarto support multiple dropdown menus (File, Edit, View, Help), including actions for creating a new database, opening recent databases, undo/redo, search, and accessing the About dialog. Recent databases are now listed in the File menu with quick open functionality. [1] [2] [3] [4] [5] [6] [7]Recent Database Tracking
addRecentDatabasewhenever a database is created or opened, including inCreateDatabaseDialogandQuickUnlockScreen. [1] [2] [3] [4] [5]These changes collectively improve the user experience by making key features and information more accessible, and by streamlining database management workflows.