Page MenuHomeSealhub

page.ts
No OneTemporary

import { curryImportPath } from "../utils/import-path.js";
export async function pageTemplate(
action_name: string,
newfilefullpath: string
): Promise<string> {
const rel = curryImportPath(newfilefullpath);
return `import type { Context } from "koa";
import { TempstreamJSX } from "tempstream";
import { Page } from "@sealcode/sealgen";
import html from "src/back/html.js";
export const actionName = "${action_name}";
export default new (class ${action_name}Page extends Page {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async canAccess(_: Context) {
return { canAccess: true, message: "" };
}
async render(ctx: Context) {
return html({ ctx: ctx, title: "${action_name}", body: <div></div>, description: "" });
}
})();
`;
}

File Metadata

Mime Type
text/x-java
Expires
Sun, Jul 13, 06:53 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
628873
Default Alt Text
page.ts (759 B)

Event Timeline