28 lines
779 B
TypeScript
28 lines
779 B
TypeScript
import { Menu } from "@islands/KMenu/types.ts";
|
|
import { addMovieInfos } from "@islands/KMenu/commands/add_movie_infos.ts";
|
|
import { createNewMovie } from "@islands/KMenu/commands/create_movie.ts";
|
|
import { createNewArticle } from "@islands/KMenu/commands/create_article.ts";
|
|
|
|
export const menus: Record<string, Menu> = {
|
|
main: {
|
|
title: "Run",
|
|
entries: [
|
|
{
|
|
title: "Clear Cache",
|
|
icon: "IconRefresh",
|
|
cb: async (state) => {
|
|
state.activeState.value = "loading";
|
|
await fetch("/api/cache", {
|
|
method: "DELETE",
|
|
});
|
|
state.activeState.value = "normal";
|
|
state.visible.value = false;
|
|
},
|
|
},
|
|
createNewArticle,
|
|
createNewMovie,
|
|
addMovieInfos,
|
|
],
|
|
},
|
|
};
|