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

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:
1xDed committed 2026-11-28 17:47:35 +03:00
1 parent b592680006
commit 7c5fa8f869
13 files changed
+214 -60

No files matched your search

+17
View File
@@ -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"
+1
View File
@@ -89,6 +89,7 @@ function Library() {
useEffect(() => {
const title = storeLibraryName ?? "Library";
setPageTitle(title);
return () => setPageTitle(null);
}, [storeLibraryName, setPageTitle]);
/* if (!id) {
+15 -10
View File
@@ -32,7 +32,6 @@ import { UserAvatarMenu } from "@/components/userAvatarMenu";
import { useApiInContext } from "@/utils/store/api";
import useDebounce from "@/utils/hooks/useDebounce";
import { useCentralStore } from "@/utils/store/central";
import useSearchStore from "@/utils/store/search";
export const Route = createFileRoute("/_api/search/")({
component: SearchPage,
@@ -183,9 +182,6 @@ function SearchAppBar({
navigate({ to: "/favorite" });
}, []);
const toggleSearchDialog = useSearchStore(
useShallow((s) => s.toggleSearchDialog),
);
const [showDrawer, setShowDrawer] = useState(false);
return (
@@ -201,11 +197,19 @@ function SearchAppBar({
color="transparent"
>
<div className="flex flex-row" style={{ gap: "0.6em" }}>
<IconButton onClick={() => setShowDrawer(true)}>
<IconButton
onClick={() => setShowDrawer(true)}
aria-label="Open navigation"
title="Open navigation"
>
<div className="material-symbols-rounded">menu</div>
</IconButton>
<BackButton />
<IconButton onClick={handleNavigateToHome}>
<IconButton
onClick={handleNavigateToHome}
aria-label="Home"
title="Home"
>
<div
className={
location.pathname === "/home"
@@ -349,10 +353,11 @@ function SearchAppBar({
</Box>
</div>
<div className="flex flex-row" style={{ gap: "0.6em" }}>
<IconButton onClick={toggleSearchDialog}>
<span className="material-symbols-rounded">search</span>
</IconButton>
<IconButton onClick={handleNavigateToFavorite}>
<IconButton
onClick={handleNavigateToFavorite}
aria-label="Favorites"
title="Favorites"
>
<div className="material-symbols-rounded">favorite</div>
</IconButton>
<UserAvatarMenu />
+2
View File
@@ -32,6 +32,8 @@ function SettingsRoute() {
<BackButton />
<IconButton
onClick={handleNavigateHome}
aria-label="Home"
title="Home"
sx={{
background: "rgba(255, 255, 255, 0.05)",
"&:hover": { background: "rgba(255, 255, 255, 0.1)" },