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
@@ -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 />
|
||||
|
||||
Reference in new issue
Block a user