feat: add new search dialog

This commit is contained in:
--remove-section committed 2026-01-17 19:30:43 +05:30
1 parent cf1f3c772d
commit 79c70e6d46
17 files changed
+751 -7

No files matched your search

+7 -2
View File
@@ -15,6 +15,7 @@ import { useShallow } from "zustand/shallow";
import { useApiInContext } from "@/utils/store/api";
import { useCentralStore } from "@/utils/store/central";
import useHeaderStore from "@/utils/store/header";
import useSearchStore from "@/utils/store/search";
import {
setSettingsDialogOpen,
setSettingsTabValue,
@@ -42,6 +43,10 @@ export const AppBar = () => {
const navigate = useNavigate();
const location = useLocation();
const toggleSearchDialog = useSearchStore(
useShallow((s) => s.toggleSearchDialog),
);
const display = !HIDDEN_PATHS.some(
(path) =>
(location.pathname.startsWith(path) &&
@@ -87,7 +92,7 @@ export const AppBar = () => {
};
}, []);
const handleNavigateToSearch = useCallback(
const _handleNavigateToSearch = useCallback(
() => navigate({ to: "/search", search: { query: "" } }),
[navigate],
);
@@ -142,7 +147,7 @@ export const AppBar = () => {
</div>
<div className="flex flex-row" style={{ gap: "0.6em" }}>
<IconButton onClick={handleNavigateToSearch}>
<IconButton onClick={toggleSearchDialog}>
<div className="material-symbols-rounded">search</div>
</IconButton>
<IconButton onClick={handleNavigateToFavorite}>