Commit Graph

2 Commits

Author SHA1 Message Date
Rice cd2c18b77c feat: add tree view mode for host list with sorting and persistence
- Add tree view mode alongside existing grid and list views
- Implement hierarchical display of hosts organized by groups
- Add expand/collapse all controls with Chinese translations
- Support all sorting modes (A-Z, Z-A, newest, oldest) in tree view
- Persist expand/collapse state across view switches and app restarts
- Hide Groups section in tree view to avoid duplication
- Display ungrouped hosts at root level instead of "General" group
- Add missing delete group dialog with proper translations
- Maintain full functionality: search, filtering, drag-drop, context menus

Technical changes:
- Create HostTreeView component with TreeNode recursive structure
- Add useTreeExpandedState hook for persistent state management
- Extend ViewMode type to include "tree" option
- Add sortMode prop to enable dynamic sorting in tree structure
- Separate group tree logic for tree view vs other view modes
- Add comprehensive English and Chinese translations
2026-01-28 11:13:17 +08:00
LAPTOP-O016UC3M\Qi Chen 1d1c509cbb Persists view mode selection across app sections
Introduces persistent view mode storage for hosts, keys, snippets,
known hosts, and port forwarding by using dedicated storage keys
and a reusable view mode hook. Improves user experience by
remembering individual section preferences instead of defaulting
to "grid" on each visit.
2025-12-19 16:23:52 +08:00