feat: fix some shit
This commit is contained in:
@ -106,6 +106,7 @@ export const KMenu = (
|
||||
if (ev?.target?.nodeName == "INPUT") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!visible.value) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
@ -37,6 +37,10 @@ export const createNewArticle: MenuEntry = {
|
||||
},
|
||||
visible: () => {
|
||||
if (!getCookie("session_cookie")) return false;
|
||||
if (
|
||||
!globalThis?.location?.pathname?.includes("article") &&
|
||||
globalThis?.location?.pathname !== "/"
|
||||
) return false;
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
@ -69,6 +69,10 @@ export const createNewMovie: MenuEntry = {
|
||||
},
|
||||
visible: () => {
|
||||
if (!getCookie("session_cookie")) return false;
|
||||
if (
|
||||
!globalThis?.location?.pathname?.includes("movie") &&
|
||||
globalThis?.location?.pathname !== "/"
|
||||
) return false;
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user