vuefy login page
This commit is contained in:
+4
-8
@@ -39,7 +39,6 @@ const assert = require('assert'),
|
||||
safe = require('safetydance'),
|
||||
settings = require('./settings.js'),
|
||||
tokens = require('./tokens.js'),
|
||||
translations = require('./translations.js'),
|
||||
url = require('url'),
|
||||
users = require('./users.js'),
|
||||
groups = require('./groups.js'),
|
||||
@@ -467,8 +466,6 @@ function renderInteractionPage(provider) {
|
||||
assert.strictEqual(typeof provider, 'object');
|
||||
|
||||
return async function (req, res) {
|
||||
const translationAssets = await translations.getTranslations();
|
||||
|
||||
try {
|
||||
const { uid, prompt, params, session } = await provider.interactionDetails(req, res);
|
||||
|
||||
@@ -493,8 +490,7 @@ function renderInteractionPage(provider) {
|
||||
}
|
||||
|
||||
// great ejs replacement!
|
||||
const template = fs.readFileSync(__dirname + '/../dashboard/login.html', 'utf-8');
|
||||
let html = translations.translate(template, translationAssets);
|
||||
let html = fs.readFileSync(__dirname + '/../dashboard/dist/login.html', 'utf-8');
|
||||
Object.keys(options).forEach(key => {
|
||||
html = html.replaceAll(`##${key}##`, options[key]);
|
||||
});
|
||||
@@ -523,7 +519,7 @@ function renderInteractionPage(provider) {
|
||||
|
||||
data.SUBMIT_URL = `${ROUTE_PREFIX}/interaction/${uid}/${hasAccess ? 'confirm' : 'abort'}`;
|
||||
|
||||
let html = fs.readFileSync(path.join(__dirname, hasAccess ? '/../dashboard/oidc_interaction_confirm.html' : '/../dashboard/oidc_interaction_abort.html'), 'utf8');
|
||||
let html = fs.readFileSync(path.join(__dirname, hasAccess ? '/../dashboard/dist/oidc_interaction_confirm.html' : '/../dashboard/dist/oidc_interaction_abort.html'), 'utf8');
|
||||
Object.keys(data).forEach(key => {
|
||||
html = html.replaceAll(`##${key}##`, data[key]);
|
||||
});
|
||||
@@ -541,7 +537,7 @@ function renderInteractionPage(provider) {
|
||||
FOOTER: marked.parse(await branding.renderFooter())
|
||||
};
|
||||
|
||||
let html = fs.readFileSync(path.join(__dirname, '/../dashboard/oidc_error.html'), 'utf8');
|
||||
let html = fs.readFileSync(path.join(__dirname, '/../dashboard/dist/oidc_error.html'), 'utf8');
|
||||
Object.keys(data).forEach(key => {
|
||||
html = html.replaceAll(`##${key}##`, data[key]);
|
||||
});
|
||||
@@ -781,7 +777,7 @@ async function renderError(ctx, out, error) {
|
||||
};
|
||||
|
||||
debug('renderError: %o', error);
|
||||
let html = fs.readFileSync(path.join(__dirname, '/../dashboard/oidc_error.html'), 'utf8');
|
||||
let html = fs.readFileSync(path.join(__dirname, '/../dashboard/dist/oidc_error.html'), 'utf8');
|
||||
Object.keys(data).forEach(key => {
|
||||
html = html.replaceAll(`##${key}##`, data[key]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user