From ab53f9cf3ed8130fad0548948b13662580c21bdb Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Wed, 29 Jul 2020 20:56:39 -0700 Subject: [PATCH] give 404 and error pages the loggedin/ok treatment Co-authored-by: timvisee --- app/ui/error.js | 10 ++++++++-- app/ui/notFound.js | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/ui/error.js b/app/ui/error.js index 5de79358..1996c841 100644 --- a/app/ui/error.js +++ b/app/ui/error.js @@ -3,6 +3,7 @@ const assets = require('../../common/assets'); const modal = require('./modal'); module.exports = function(state, emit) { + const btnText = state.user.loggedIn ? 'okButton' : 'sendYourFilesLink'; return html`
${state.modal && modal(state, emit)} @@ -13,12 +14,17 @@ module.exports = function(state, emit) { ${state.translate('errorPageHeader')} -

+

${state.translate('trySendDescription')}

${state.translate('sendYourFilesLink')}${state.translate(btnText)}

diff --git a/app/ui/notFound.js b/app/ui/notFound.js index f3cd4b9f..424825aa 100644 --- a/app/ui/notFound.js +++ b/app/ui/notFound.js @@ -3,6 +3,7 @@ const assets = require('../../common/assets'); const modal = require('./modal'); module.exports = function(state, emit) { + const btnText = state.user.loggedIn ? 'okButton' : 'sendYourFilesLink'; return html`
${state.modal && modal(state, emit)} @@ -13,12 +14,17 @@ module.exports = function(state, emit) { ${state.translate('expiredTitle')} -

+

${state.translate('trySendDescription')}

${state.translate('sendYourFilesLink')}${state.translate(btnText)}