feat(navigation): clearer labels, context and direct destinations
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Shows the current page in the app bar, labels every top-level icon action, adds Search/Favorites and a Shows shortcut to the main navigation, removes the redundant search icon on the search page, and cleans up page titles on leave.
This commit is contained in:
1 parent
b592680006
commit
7c5fa8f869
13 files changed
+214
-60
No files matched your search
@@ -22,12 +22,20 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
const moviesLibrary = libraries.find(
|
||||
(library) => library.CollectionType === "movies",
|
||||
);
|
||||
const showsLibrary = libraries.find(
|
||||
(library) => library.CollectionType === "tvshows",
|
||||
);
|
||||
|
||||
const openMovies = useCallback(() => {
|
||||
if (!moviesLibrary?.Id) return;
|
||||
navigate({ to: "/library/$id", params: { id: moviesLibrary.Id } });
|
||||
}, [moviesLibrary?.Id, navigate]);
|
||||
|
||||
const openShows = useCallback(() => {
|
||||
if (!showsLibrary?.Id) return;
|
||||
navigate({ to: "/library/$id", params: { id: showsLibrary.Id } });
|
||||
}, [showsLibrary?.Id, navigate]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<header className="home-header" data-tauri-drag-region>
|
||||
@@ -47,6 +55,15 @@ const HomeHeader = ({ libraries, onNewAndPopular }: HomeHeaderProps) => {
|
||||
Movies
|
||||
</button>
|
||||
)}
|
||||
{showsLibrary?.Id && (
|
||||
<button
|
||||
type="button"
|
||||
className="home-nav-link"
|
||||
onClick={openShows}
|
||||
>
|
||||
Shows
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
className="home-nav-link"
|
||||
|
||||
Reference in new issue
Block a user