Added the following ENVIRONMENT VARIABLES > send.ftl - if not set it will use translate().
CUSTOM_INTRO_TITLE > introTitle CUSTOM_INTRO_DESCRIPTION: > introDescription CUSTOM_DOWNLOAD_DESCRIPTION: downloadDescription CUSTOM_TRY_SEND_DESCRIPTION: trySendDescription CUSTOM_SEND_YOUR_FILES_LINK: sendYourFilesLink CUSTOM_INTRO_TITLE: "Secure & Simple" CUSTOM_INTRO_DESCRIPTION: "Share files with end-to-end encryption and a link that expires." CUSTOM_DOWNLOAD_DESCRIPTION: "Shared with end-to-end encryption and a link that expires." CUSTOM_TRY_SEND_DESCRIPTION: "Secure, Simple file sharing" CUSTOM_SEND_YOUR_FILES_LINK: "Upload Files"
This commit is contained in:
parent
5124572dba
commit
2f491fac86
8 changed files with 83 additions and 15 deletions
|
@ -34,6 +34,9 @@ function preview(state, emit) {
|
|||
if (!state.capabilities.streamDownload && state.fileInfo.size > BIG_SIZE) {
|
||||
return noStreams(state, emit);
|
||||
}
|
||||
const downloadDescription =
|
||||
state.WEB_UI.CUSTOM_DOWNLOAD_DESCRIPTION ||
|
||||
state.translate('downloadDescription');
|
||||
return html`
|
||||
<div
|
||||
class="flex flex-col w-full max-w-md h-full mx-auto items-center justify-center"
|
||||
|
@ -44,7 +47,7 @@ function preview(state, emit) {
|
|||
<p
|
||||
class="w-full text-grey-80 text-center leading-normal dark:text-grey-40"
|
||||
>
|
||||
${state.translate('downloadDescription')}
|
||||
${downloadDescription}
|
||||
</p>
|
||||
${archiveTile.preview(state, emit)}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,14 @@ const html = require('choo/html');
|
|||
const assets = require('../../common/assets');
|
||||
|
||||
module.exports = function(state) {
|
||||
const btnText = state.user.loggedIn ? 'okButton' : 'sendYourFilesLink';
|
||||
const btnText = state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
? state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
: state.user.loggedIn
|
||||
? 'okButton'
|
||||
: 'sendYourFilesLink';
|
||||
const trySendDescription =
|
||||
state.WEB_UI.CUSTOM_TRY_SEND_DESCRIPTION ||
|
||||
state.translate('trySendDescription');
|
||||
return html`
|
||||
<div
|
||||
id="download-complete"
|
||||
|
@ -20,11 +27,13 @@ module.exports = function(state) {
|
|||
? 'hidden'
|
||||
: ''}"
|
||||
>
|
||||
${state.translate('trySendDescription')}
|
||||
${trySendDescription}
|
||||
</p>
|
||||
<p class="my-5">
|
||||
<a href="/" class="btn rounded-lg flex items-center mt-4" role="button"
|
||||
>${state.translate(btnText)}</a
|
||||
>${state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
? btnText
|
||||
: state.translate(btnText)}</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,9 @@ const html = require('choo/html');
|
|||
module.exports = function(state, emit) {
|
||||
const fileInfo = state.fileInfo;
|
||||
const invalid = fileInfo.password === null;
|
||||
|
||||
const downloadDescription =
|
||||
state.WEB_UI.CUSTOM_DOWNLOAD_DESCRIPTION ||
|
||||
state.translate('downloadDescription');
|
||||
const div = html`
|
||||
<div
|
||||
class="h-full w-full flex flex-col items-center justify-center bg-white py-8 max-w-md mx-auto dark:bg-grey-90"
|
||||
|
@ -14,7 +16,7 @@ module.exports = function(state, emit) {
|
|||
<p
|
||||
class="w-full mb-4 text-center text-grey-80 dark:text-grey-40 leading-normal"
|
||||
>
|
||||
${state.translate('downloadDescription')}
|
||||
${downloadDescription}
|
||||
</p>
|
||||
<form
|
||||
class="flex flex-row flex-nowrap w-full md:w-4/5"
|
||||
|
|
|
@ -3,7 +3,14 @@ const assets = require('../../common/assets');
|
|||
const modal = require('./modal');
|
||||
|
||||
module.exports = function(state, emit) {
|
||||
const btnText = state.user.loggedIn ? 'okButton' : 'sendYourFilesLink';
|
||||
const btnText = state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
? state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
: state.user.loggedIn
|
||||
? 'okButton'
|
||||
: 'sendYourFilesLink';
|
||||
const trySendDescription =
|
||||
state.WEB_UI.CUSTOM_TRY_SEND_DESCRIPTION ||
|
||||
state.translate('trySendDescription');
|
||||
return html`
|
||||
<main class="main">
|
||||
${state.modal && modal(state, emit)}
|
||||
|
@ -22,11 +29,13 @@ module.exports = function(state, emit) {
|
|||
? 'hidden'
|
||||
: ''}"
|
||||
>
|
||||
${state.translate('trySendDescription')}
|
||||
${trySendDescription}
|
||||
</p>
|
||||
<p class="my-5">
|
||||
<a href="/" class="btn rounded-lg flex items-center" role="button"
|
||||
>${state.translate(btnText)}</a
|
||||
>${state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
? btnText
|
||||
: state.translate(btnText)}</a
|
||||
>
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
const html = require('choo/html');
|
||||
|
||||
module.exports = function intro(state) {
|
||||
const introTitle =
|
||||
state.WEB_UI.CUSTOM_INTRO_TITLE || state.translate('introTitle');
|
||||
const introDescription =
|
||||
state.WEB_UI.CUSTOM_INTRO_DESCRIPTION ||
|
||||
state.translate('introDescription');
|
||||
return html`
|
||||
<send-intro
|
||||
class="flex flex-col items-center justify-center bg-white px-6 md:py-0 py-6 mb-0 h-full w-full dark:bg-grey-90"
|
||||
>
|
||||
<div class="mt-12 flex flex-col h-full">
|
||||
<h1 class="text-3xl font-bold md:pb-2">
|
||||
${state.translate('introTitle')}
|
||||
${introTitle}
|
||||
</h1>
|
||||
<p class="max-w-sm leading-loose mt-6 md:mt-2 md:pr-14">
|
||||
${state.translate('introDescription')}
|
||||
${introDescription}
|
||||
</p>
|
||||
</div>
|
||||
</send-intro>
|
||||
|
|
|
@ -3,7 +3,14 @@ const assets = require('../../common/assets');
|
|||
const modal = require('./modal');
|
||||
|
||||
module.exports = function(state, emit) {
|
||||
const btnText = state.user.loggedIn ? 'okButton' : 'sendYourFilesLink';
|
||||
const btnText = state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
? state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
: state.user.loggedIn
|
||||
? 'okButton'
|
||||
: 'sendYourFilesLink';
|
||||
const trySendDescription =
|
||||
state.WEB_UI.CUSTOM_TRY_SEND_DESCRIPTION ||
|
||||
state.translate('trySendDescription');
|
||||
return html`
|
||||
<main class="main">
|
||||
${state.modal && modal(state, emit)}
|
||||
|
@ -22,11 +29,13 @@ module.exports = function(state, emit) {
|
|||
? 'hidden'
|
||||
: ''}"
|
||||
>
|
||||
${state.translate('trySendDescription')}
|
||||
${trySendDescription}
|
||||
</p>
|
||||
<p class="my-5">
|
||||
<a href="/" class="btn rounded-lg flex items-center" role="button"
|
||||
>${state.translate(btnText)}</a
|
||||
>${state.WEB_UI.CUSTOM_SEND_YOUR_FILES_LINK
|
||||
? btnText
|
||||
: state.translate(btnText)}</a
|
||||
>
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -15,6 +15,11 @@ module.exports = {
|
|||
FOOTER_SOURCE_URL: config.footer_source_url,
|
||||
CUSTOM_FOOTER_TEXT: config.custom_footer_text,
|
||||
CUSTOM_FOOTER_URL: config.custom_footer_url,
|
||||
CUSTOM_INTRO_TITLE: config.custom_intro_title,
|
||||
CUSTOM_INTRO_DESCRIPTION: config.custom_intro_description,
|
||||
CUSTOM_DOWNLOAD_DESCRIPTION: config.custom_download_description,
|
||||
CUSTOM_TRY_SEND_DESCRIPTION: config.custom_try_send_description,
|
||||
CUSTOM_SEND_YOUR_FILES_LINK: config.custom_send_your_files_link,
|
||||
COLORS: {
|
||||
PRIMARY: config.ui_color_primary,
|
||||
ACCENT: config.ui_color_accent
|
||||
|
|
|
@ -175,9 +175,35 @@ const conf = convict({
|
|||
},
|
||||
custom_description: {
|
||||
format: String,
|
||||
default: 'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||
default:
|
||||
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||
env: 'CUSTOM_DESCRIPTION'
|
||||
},
|
||||
custom_intro_title: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_INTRO_TITLE'
|
||||
},
|
||||
custom_intro_description: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_INTRO_DESCRIPTION'
|
||||
},
|
||||
custom_download_description: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_DOWNLOAD_DESCRIPTION'
|
||||
},
|
||||
custom_try_send_description: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_TRY_SEND_DESCRIPTION'
|
||||
},
|
||||
custom_send_your_files_link: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_SEND_YOUR_FILES_LINK'
|
||||
},
|
||||
detect_base_url: {
|
||||
format: Boolean,
|
||||
default: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue