OpenAuth_server/src/views/admin.ts

21 lines
548 B
TypeScript

import * as handlebars from "handlebars"
import { readFileSync } from "fs";
import { __ as i__ } from "i18n"
import config from "../config";
let template: handlebars.TemplateDelegate<any>;
function loadStatic() {
let html = readFileSync("./views/out/admin/admin.html").toString();
template = handlebars.compile(html);
}
export default function GetAdminPage(__: typeof i__): string {
if (config.core.dev) {
loadStatic()
}
let data = {}
return template(data, { helpers: { "i18n": __ } })
}
loadStatic()