Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3011034
page.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
725 B
Referenced Files
None
Subscribers
None
page.ts
View Options
import
{
curryImportPath
}
from
"../utils/import-path.js"
;
export
async
function
pageTemplate
(
action_name
:
string
,
newfilefullpath
:
string
)
:
Promise
<
string
>
{
const
rel
=
curryImportPath
(
newfilefullpath
);
return
`import { Context } from "koa";
import { TempstreamJSX } 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
}
", <div></div>);
}
})();
`
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:51 (17 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
624966
Default Alt Text
page.ts (725 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment