feat: enhance layout of search
This commit is contained in:
@ -34,6 +34,16 @@ export const menus: Record<string, Menu> = {
|
||||
return !getCookie("session_cookie");
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Search",
|
||||
icon: "IconSearch",
|
||||
cb: () => {
|
||||
window.location.href += "?q=";
|
||||
},
|
||||
visible: () => {
|
||||
return !!getCookie("session_cookie") && window.location.search === "";
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "Logout",
|
||||
icon: "IconLogout",
|
||||
|
@ -45,6 +45,6 @@ export const addMovieInfos: MenuEntry = {
|
||||
visible: () => {
|
||||
const loc = globalThis["location"];
|
||||
if (!getCookie("session_cookie")) return false;
|
||||
return loc?.pathname?.includes("movie");
|
||||
return loc?.pathname?.includes("movie") && !loc.pathname.endsWith("movies");
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user