Merge branch 'HrBingR-master' into master
See https://github.com/timvisee/send/pull/100
This commit is contained in:
commit
55ad08fd96
@ -168,6 +168,16 @@ const conf = convict({
|
|||||||
default: 'https://send.firefox.com',
|
default: 'https://send.firefox.com',
|
||||||
env: 'BASE_URL'
|
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: {
|
detect_base_url: {
|
||||||
format: Boolean,
|
format: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@ -303,7 +313,12 @@ const conf = convict({
|
|||||||
format: String,
|
format: String,
|
||||||
default: '',
|
default: '',
|
||||||
env: 'UI_CUSTOM_ASSETS_WORDMARK'
|
env: 'UI_CUSTOM_ASSETS_WORDMARK'
|
||||||
}
|
},
|
||||||
|
custom_css: {
|
||||||
|
format: String,
|
||||||
|
default: '',
|
||||||
|
env: 'UI_CUSTOM_CSS'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -40,6 +40,16 @@ module.exports = function(state, body = '') {
|
|||||||
type="text/css"
|
type="text/css"
|
||||||
href="${assets.get('app.css')}"
|
href="${assets.get('app.css')}"
|
||||||
/>
|
/>
|
||||||
|
<script>
|
||||||
|
var custom_css_file = '${state.ui.assets.custom_css}';
|
||||||
|
if (custom_css_file!="undefined") {
|
||||||
|
var custom_css_enabled = document.createElement('link');
|
||||||
|
custom_css_enabled.rel = 'stylesheet';
|
||||||
|
custom_css_enabled.type = 'text/css';
|
||||||
|
custom_css_enabled.href = '${state.ui.assets.custom_css}';
|
||||||
|
document.head.appendChild(custom_css_enabled);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<link
|
<link
|
||||||
rel="apple-touch-icon"
|
rel="apple-touch-icon"
|
||||||
sizes="180x180"
|
sizes="180x180"
|
||||||
|
@ -34,7 +34,8 @@ module.exports = async function(req) {
|
|||||||
safari_pinned_tab: assets.get('safari-pinned-tab.svg'),
|
safari_pinned_tab: assets.get('safari-pinned-tab.svg'),
|
||||||
facebook: baseUrl + '/' + assets.get('send-fb.jpg'),
|
facebook: baseUrl + '/' + assets.get('send-fb.jpg'),
|
||||||
twitter: baseUrl + '/' + assets.get('send-twitter.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 => {
|
Object.keys(uiAssets).forEach(index => {
|
||||||
if (config.ui_custom_assets[index] !== '')
|
if (config.ui_custom_assets[index] !== '')
|
||||||
@ -47,9 +48,8 @@ module.exports = async function(req) {
|
|||||||
locale,
|
locale,
|
||||||
capabilities: { account: false },
|
capabilities: { account: false },
|
||||||
translate: getTranslator(locale),
|
translate: getTranslator(locale),
|
||||||
title: 'Send',
|
title: config.custom_title,
|
||||||
description:
|
description: config.custom_description,
|
||||||
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
|
||||||
baseUrl,
|
baseUrl,
|
||||||
ui: {
|
ui: {
|
||||||
colors: {
|
colors: {
|
||||||
|
Loading…
Reference in New Issue
Block a user