feat: enhance layout of search

This commit is contained in:
2023-08-06 17:47:26 +02:00
parent 0e0d26c939
commit 6f650b568d
25 changed files with 518 additions and 172 deletions

View File

@ -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",

View File

@ -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");
},
};