Page MenuHomeSealhub

page.ts
No OneTemporary

import { curryImportPath } from "../utils/import-path";
export async function pageTemplate(
action_name: string,
newfilefullpath: string
): Promise<string> {
const rel = curryImportPath(newfilefullpath);
return `import { Context } from "koa";
import { tempstream } from "tempstream";
import { Page } from "@sealcode/sealgen";
import html from "${rel("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, "${action_name}", tempstream/* HTML */ \`<div></div>\`);
}
})();
`;
}

File Metadata

Mime Type
text/x-java
Expires
Sat, Jun 7, 23:21 (5 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
662592
Default Alt Text
page.ts (744 B)

Event Timeline