mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-11 02:46:16 -08:00
feat(portal): add category sorting controls (#940)
* feat(portal): add category sort modes * fix(portal): address category sort review feedback
This commit is contained in:
1 parent
2a5b1d1da7
commit
8232a86a1e
34 files changed
+579
-51
No files matched your search
@@ -36,11 +36,11 @@ ALTER TABLE categories ADD COLUMN hidden INTEGER DEFAULT 0
|
||||
|
||||
**File**: `apps/electron-backend/src/app/events/database/category.events.ts`
|
||||
|
||||
| IPC Handler | Purpose |
|
||||
| ------------------------------- | -------------------------------------------------- |
|
||||
| `DB_GET_CATEGORIES` | Returns visible categories only (`hidden = false`) |
|
||||
| `DB_GET_ALL_CATEGORIES` | Returns all categories (for management dialog) |
|
||||
| `DB_UPDATE_CATEGORY_VISIBILITY` | Batch updates `hidden` status for category IDs |
|
||||
| IPC Handler | Purpose |
|
||||
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `DB_GET_CATEGORIES` | Returns visible categories only (`hidden = false`) in SQLite insertion order, preserving the Xtream server order by default |
|
||||
| `DB_GET_ALL_CATEGORIES` | Returns all categories (for management dialog) |
|
||||
| `DB_UPDATE_CATEGORY_VISIBILITY` | Batch updates `hidden` status for category IDs |
|
||||
|
||||
### Frontend Services
|
||||
|
||||
@@ -85,6 +85,8 @@ Added `reloadCategories()` method to refresh categories from database after visi
|
||||
- **Persistence**: Visibility settings survive playlist refresh (see below)
|
||||
- **Per-playlist, per-type**: Categories are managed per playlist and per content type (live/movies/series)
|
||||
- **No content deletion**: Hiding a category only affects sidebar visibility; the category and its content remain in the database
|
||||
- **Display order**: The sidebar defaults to server order. Users can switch the
|
||||
category panel to `A-Z` or `Z-A` from the sort menu next to category search.
|
||||
- **All-hidden recovery**: Once the selected Xtream type is loaded, the manage
|
||||
categories button remains available even if every visible category has been
|
||||
hidden. The sidebar category list is filtered, but the dialog reads all
|
||||
|
||||
@@ -101,6 +101,12 @@ The context panel is part of the shell contract. New workspace-level routes
|
||||
should explicitly decide whether they need one rather than adding local
|
||||
sidebars inside feature pages.
|
||||
|
||||
Xtream and Stalker category panels preserve provider/server category order by
|
||||
default. The panel header exposes a sort menu next to category search with
|
||||
`Server sorting`, `A-Z`, and `Z-A`; when alphabetical sorting is active,
|
||||
synthetic "all categories" entries stay pinned before sorted provider
|
||||
categories.
|
||||
|
||||
## Search And Navigation Rules
|
||||
|
||||
Search is shell-owned and route-aware:
|
||||
|
||||
Reference in new issue
Block a user