mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-01 23:19:34 +00:00
feat: implement library view with Authors, Genres, and Series browsing
This commit implements a comprehensive library browsing feature: - Add LibraryBrowserProvider with providers for authors, genres, and series data - Create LibraryAuthorsPage with grid view of authors including images and book counts - Create LibraryGenresPage with list view of all genres - Create LibrarySeriesPage with list view of series and book counts - Update LibraryBrowserPage navigation to route to the new views - Add routes for /browser/authors, /browser/genres, and /browser/series - Replace "Not Implemented" toasts with functional navigation The implementation uses the Audiobookshelf API via shelfsdk to fetch: - Authors list with metadata (getAuthors) - Genres from library filter data (getFilterData) - Series with pagination support (getSeries) All views follow Material Design 3 patterns and include proper loading/error states.
This commit is contained in:
parent
07aea41c6e
commit
53027bf74c
7 changed files with 485 additions and 5 deletions
|
|
@ -82,6 +82,25 @@ class Routes {
|
|||
// parentRoute: library,
|
||||
);
|
||||
|
||||
// library browser sub-routes
|
||||
static const libraryAuthors = _SimpleRoute(
|
||||
pathName: 'authors',
|
||||
name: 'libraryAuthors',
|
||||
parentRoute: libraryBrowser,
|
||||
);
|
||||
|
||||
static const libraryGenres = _SimpleRoute(
|
||||
pathName: 'genres',
|
||||
name: 'libraryGenres',
|
||||
parentRoute: libraryBrowser,
|
||||
);
|
||||
|
||||
static const librarySeries = _SimpleRoute(
|
||||
pathName: 'series',
|
||||
name: 'librarySeries',
|
||||
parentRoute: libraryBrowser,
|
||||
);
|
||||
|
||||
// you page for the user
|
||||
static const you = _SimpleRoute(
|
||||
pathName: 'you',
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ import 'package:vaani/features/downloads/view/downloads_page.dart';
|
|||
import 'package:vaani/features/explore/view/explore_page.dart';
|
||||
import 'package:vaani/features/explore/view/search_result_page.dart';
|
||||
import 'package:vaani/features/item_viewer/view/library_item_page.dart';
|
||||
import 'package:vaani/features/library_browser/view/library_authors_page.dart';
|
||||
import 'package:vaani/features/library_browser/view/library_browser_page.dart';
|
||||
import 'package:vaani/features/library_browser/view/library_genres_page.dart';
|
||||
import 'package:vaani/features/library_browser/view/library_series_page.dart';
|
||||
import 'package:vaani/features/logging/view/logs_page.dart';
|
||||
import 'package:vaani/features/onboarding/view/callback_page.dart';
|
||||
import 'package:vaani/features/onboarding/view/onboarding_single_page.dart';
|
||||
|
|
@ -121,6 +124,23 @@ class MyAppRouter {
|
|||
path: Routes.libraryBrowser.localPath,
|
||||
name: Routes.libraryBrowser.name,
|
||||
pageBuilder: defaultPageBuilder(const LibraryBrowserPage()),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: Routes.libraryAuthors.pathName,
|
||||
name: Routes.libraryAuthors.name,
|
||||
pageBuilder: defaultPageBuilder(const LibraryAuthorsPage()),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.libraryGenres.pathName,
|
||||
name: Routes.libraryGenres.name,
|
||||
pageBuilder: defaultPageBuilder(const LibraryGenresPage()),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.librarySeries.pathName,
|
||||
name: Routes.librarySeries.name,
|
||||
pageBuilder: defaultPageBuilder(const LibrarySeriesPage()),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue