OpenAuth_server/src/views/popup.ts

22 lines
533 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/popup/popup.html").toString();
template = handlebars.compile(html);
}
export default function GetPopupPage(__: typeof i__): string {
if (config.core.dev) {
loadStatic();
}
let data = {};
return template(data, { helpers: { i18n: __ } });
}
loadStatic();