feat: add authentication

This commit is contained in:
2023-08-04 22:35:25 +02:00
parent f9638c35fc
commit 469db6525d
33 changed files with 492 additions and 100 deletions

View File

@@ -1,5 +1,6 @@
import { MenuEntry } from "@islands/KMenu/types.ts";
import { fetchStream, isValidUrl } from "@lib/helpers.ts";
import { getCookie } from "@lib/string.ts";
export const createNewArticle: MenuEntry = {
title: "Create new article",
@@ -35,5 +36,8 @@ export const createNewArticle: MenuEntry = {
}
});
},
visible: () => true,
visible: () => {
if (!getCookie("session_cookie")) return false;
return true;
},
};