Running prettier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm
2020-08-07 16:16:39 +02:00
parent 77fedd2815
commit 51a8609880
87 changed files with 4000 additions and 2812 deletions

View File

@ -1,6 +1,6 @@
import * as handlebars from "handlebars"
import * as handlebars from "handlebars";
import { readFileSync } from "fs";
import { __ as i__ } from "i18n"
import { __ as i__ } from "i18n";
import config from "../config";
let template: handlebars.TemplateDelegate<any>;
@ -11,11 +11,11 @@ function loadStatic() {
export default function GetAdminPage(__: typeof i__): string {
if (config.core.dev) {
loadStatic()
loadStatic();
}
let data = {}
return template(data, { helpers: { "i18n": __ } })
let data = {};
return template(data, { helpers: { i18n: __ } });
}
loadStatic()
loadStatic();

View File

@ -1,26 +1,34 @@
import { compile, TemplateDelegate } from "handlebars"
import { compile, TemplateDelegate } from "handlebars";
import { readFileSync } from "fs";
import { __ as i__ } from "i18n"
import { __ as i__ } from "i18n";
import config from "../config";
let template: TemplateDelegate<any>;
function loadStatic() {
let html = readFileSync("./views/out/authorize/authorize.html").toString();
template = compile(html)
template = compile(html);
}
export default function GetAuthPage(__: typeof i__, appname: string, scopes: { name: string, description: string, logo: string }[]): string {
export default function GetAuthPage(
__: typeof i__,
appname: string,
scopes: { name: string; description: string; logo: string }[]
): string {
if (config.core.dev) {
loadStatic()
loadStatic();
}
return template({
title: __("Authorize %s", appname),
information: __("By clicking on ALLOW, you allow this app to access the requested recources."),
scopes: scopes,
// request: request
}, { helpers: { "i18n": __ } });
return template(
{
title: __("Authorize %s", appname),
information: __(
"By clicking on ALLOW, you allow this app to access the requested recources."
),
scopes: scopes,
// request: request
},
{ helpers: { i18n: __ } }
);
}
loadStatic()
loadStatic();

View File

@ -1,6 +1,6 @@
import * as handlebars from "handlebars"
import * as handlebars from "handlebars";
import { readFileSync } from "fs";
import { __ as i__ } from "i18n"
import { __ as i__ } from "i18n";
import config from "../config";
let template: handlebars.TemplateDelegate<any>;
@ -16,8 +16,8 @@ function loadStatic() {
* - prod 6sec
* Mustache:
* - dev : 15sec
* - prod: 12sec
*
* - prod: 12sec
*
* Handlebars:
* Compile + Render
* - dev 13sec
@ -29,11 +29,11 @@ function loadStatic() {
export default function GetLoginPage(__: typeof i__): string {
if (config.core.dev) {
loadStatic()
loadStatic();
}
let data = {}
return template(data, { helpers: { "i18n": __ } });
let data = {};
return template(data, { helpers: { i18n: __ } });
}
loadStatic()
loadStatic();

View File

@ -1,6 +1,6 @@
import * as handlebars from "handlebars"
import * as handlebars from "handlebars";
import { readFileSync } from "fs";
import { __ as i__ } from "i18n"
import { __ as i__ } from "i18n";
import config from "../config";
let template: handlebars.TemplateDelegate<any>;
@ -11,11 +11,11 @@ function loadStatic() {
export default function GetRegistrationPage(__: typeof i__): string {
if (config.core.dev) {
loadStatic()
loadStatic();
}
let data = {}
return template(data, { helpers: { "i18n": __ } })
let data = {};
return template(data, { helpers: { i18n: __ } });
}
loadStatic()
loadStatic();