Create helpers folder and move helpers.
This commit is contained in:
Родитель
e3690dc377
Коммит
561e7068c3
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const HBSHelpers = require("../hbs-helpers");
|
||||
const HBSHelpers = require("../template-helpers/hbs-helpers");
|
||||
|
||||
|
||||
function getEmailMockUps(req, res) {
|
||||
|
|
|
@ -7,7 +7,7 @@ const DB = require("../db/DB");
|
|||
const EmailUtils = require("../email-utils");
|
||||
const HIBP = require("../hibp");
|
||||
const { LocaleUtils } = require ("../locale-utils");
|
||||
const HBSHelpers = require("../hbs-helpers");
|
||||
const HBSHelpers = require("../template-helpers/hbs-helpers");
|
||||
const mozlog = require("../log");
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const AppConstants = require("../app-constants");
|
|||
const DB = require("../db/DB");
|
||||
const EmailUtils = require("../email-utils");
|
||||
const { FluentError } = require("../locale-utils");
|
||||
const HBSHelpers = require("../hbs-helpers");
|
||||
const HBSHelpers = require("../template-helpers/hbs-helpers");
|
||||
const HIBP = require("../hibp");
|
||||
const mozlog = require("../log");
|
||||
const sha1 = require("../sha1-utils");
|
||||
|
|
|
@ -8,7 +8,7 @@ const DB = require("../db/DB");
|
|||
const EmailUtils = require("../email-utils");
|
||||
const { FluentError } = require("../locale-utils");
|
||||
const FXA = require("../lib/fxa");
|
||||
const HBSHelpers = require("../hbs-helpers");
|
||||
const HBSHelpers = require("../template-helpers/hbs-helpers");
|
||||
const HIBP = require("../hibp");
|
||||
const sha1 = require("../sha1-utils");
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ const AppConstants = require("./app-constants");
|
|||
const nodemailer = require("nodemailer");
|
||||
const hbs = require("nodemailer-express-handlebars");
|
||||
|
||||
const HBSHelpers = require("./hbs-helpers");
|
||||
const HBSHelpers = require("./template-helpers/hbs-helpers");
|
||||
const mozlog = require("./log");
|
||||
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1 @@
|
|||
body.email-locale-testing{background:#ededf0;background-color:#ededf0;background-image:none;color:rgba(12,12,13,.7)}body.email-locale-testing .section-wrapper{justify-content:center;position:relative;flex-wrap:nowrap}.email-test-wrapper{width:600px}.email-locale-testing nav{margin:30px}.email-locale-testing nav a{color:#000;display:block;font-size:13px;margin:10px 0}.email-body,.email-footer,.email-logo{padding:30px}.email-content{overflow:hidden;border-radius:3px;box-shadow:2px 2px 5px rgba(119,136,153,.361)}.email-test-wrapper .firefox-monitor-logo,.email-test-wrapper h1{display:inline-block}.email-body{background:#fff;min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center}.email-footer{font-size:13px}.email-footer img{height:40px;width:40px;margin-top:20px}.email-footer a{color:#0060df}.footer-copy{margin:10px 0}.email-test-wrapper .firefox-monitor-logo{max-width:auto;width:auto;height:70px;background:0 0}.email-footer,.verify-email{text-align:center}.email-button-wrapper{background-color:transparent!important}.email-button-wrapper .email-button{padding:10px 30px!important;display:inline-block;border-radius:3px!important;background-color:#0060df}.email-headline-copy{margin-top:30px!important}.email-body tr,.email-footer tr{display:flex;justify-content:center}.email-footer,.email-headline-copy h2:last-of-type,.email-wtd{margin-top:15px}td{overflow:hidden}td.logomark-wrapper{width:70px}td h1.firefox-monitor-logotype{font-size:2rem;font-weight:400!important;color:#fff}table.table-button tr{display:flex!important;justify-content:center!important}.email-main-copy tr{justify-content:flex-start;margin-top:30px!important}p.body-copy.email-sub-head{font-size:21px}.email-wtd-step td:last-of-type p:first-of-type,p.body-copy.medium{font-weight:500!important}p.body-copy.medium a,p.body-copy.medium span{margin-left:6px;color:rgba(12,12,13,.7)}.email-wtd td,td.email-breach-image,td.email-pwt-image{min-width:60px}td.email-pwt-image img{width:50px;min-width:50px}.email-breach-listing,.email-main-copy,.email-subject,.verify-email,table.table-button{margin-bottom:30px}.email-locale-testing nav a,.email-test-wrapper,body.email-locale-testing,p.body-copy.medium a,p.body-copy.medium span,td h1.firefox-monitor-logotype span{font-weight:300}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -15,7 +15,7 @@ const sessions = require("client-sessions");
|
|||
const { URL } = require("url");
|
||||
|
||||
const EmailUtils = require("./email-utils");
|
||||
const HBSHelpers = require("./hbs-helpers");
|
||||
const HBSHelpers = require("./template-helpers/");
|
||||
const HIBP = require("./hibp");
|
||||
const {addRequestToResponse, pickLanguage, logErrors, localizeErrorMessages, clientErrorHandler, errorHandler} = require("./middleware");
|
||||
const { LocaleUtils } = require("./locale-utils");
|
||||
|
@ -138,7 +138,7 @@ const hbs = exphbs.create({
|
|||
layoutsDir: __dirname + "/views/layouts",
|
||||
defaultLayout: "default",
|
||||
partialsDir: __dirname + "/views/partials",
|
||||
helpers: HBSHelpers,
|
||||
helpers: HBSHelpers.helpers,
|
||||
});
|
||||
app.engine("hbs", hbs.engine);
|
||||
app.set("view engine", "hbs");
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
const AppConstants = require("./app-constants");
|
||||
const { LocaleUtils } = require("./locale-utils");
|
||||
const modifiedStringMap = require("./modified-strings");
|
||||
const mozlog = require("./log");
|
||||
const AppConstants = require("./../app-constants");
|
||||
const { LocaleUtils } = require("./../locale-utils");
|
||||
const modifiedStringMap = require("./../modified-strings");
|
||||
const mozlog = require("./../log");
|
||||
|
||||
|
||||
const log = mozlog("hbs-helpers");
|
||||
const log = mozlog("template-helpers/hbs-helpers");
|
||||
|
||||
|
||||
function fluentFormat (supportedLocales, id, args) {
|
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
const legacyHelpers = require("./hbs-helpers");
|
||||
|
||||
|
||||
module.exports = {
|
||||
helpers: Object.assign(
|
||||
legacyHelpers,
|
||||
)
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const HBSHelpers = require("../hbs-helpers");
|
||||
const HBSHelpers = require("../template-helpers/hbs-helpers");
|
||||
const { LocaleUtils } = require("../locale-utils");
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче