Added new environment variables for custom css, custom title, and custom description.
Fully tested using the Dockerfile, example can be found on https://fileshare.thenextweb.co.za
This commit is contained in:
parent
000854104f
commit
310271c10f
|
@ -168,6 +168,16 @@ const conf = convict({
|
|||
default: 'https://send.firefox.com',
|
||||
env: 'BASE_URL'
|
||||
},
|
||||
custom_title: {
|
||||
format: String,
|
||||
default: 'Send',
|
||||
env: 'CUSTOM_TITLE'
|
||||
},
|
||||
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.',
|
||||
env: 'CUSTOM_DESCRIPTION'
|
||||
},
|
||||
detect_base_url: {
|
||||
format: Boolean,
|
||||
default: false,
|
||||
|
@ -303,6 +313,11 @@ const conf = convict({
|
|||
format: String,
|
||||
default: '',
|
||||
env: 'UI_CUSTOM_ASSETS_WORDMARK'
|
||||
},
|
||||
custom_css: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'UI_CUSTOM_CSS'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -40,6 +40,11 @@ module.exports = function(state, body = '') {
|
|||
type="text/css"
|
||||
href="${assets.get('app.css')}"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="${state.ui.assets.custom_css}"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
|
|
|
@ -34,7 +34,8 @@ module.exports = async function(req) {
|
|||
safari_pinned_tab: assets.get('safari-pinned-tab.svg'),
|
||||
facebook: baseUrl + '/' + assets.get('send-fb.jpg'),
|
||||
twitter: baseUrl + '/' + assets.get('send-twitter.jpg'),
|
||||
wordmark: assets.get('wordmark.svg') + '#logo'
|
||||
wordmark: assets.get('wordmark.svg') + '#logo',
|
||||
custom_css: assets.get('undefined')
|
||||
};
|
||||
Object.keys(uiAssets).forEach(index => {
|
||||
if (config.ui_custom_assets[index] !== '')
|
||||
|
@ -47,9 +48,8 @@ module.exports = async function(req) {
|
|||
locale,
|
||||
capabilities: { account: false },
|
||||
translate: getTranslator(locale),
|
||||
title: 'Send',
|
||||
description:
|
||||
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||
title: config.custom_title,
|
||||
description: config.custom_description,
|
||||
baseUrl,
|
||||
ui: {
|
||||
colors: {
|
||||
|
|
Loading…
Reference in New Issue