diff --git a/app/api.js b/app/api.js
index f271ea2e..2d1238c2 100644
--- a/app/api.js
+++ b/app/api.js
@@ -43,7 +43,7 @@ function post(obj, bearerToken) {
'Content-Type': 'application/json'
};
if (bearerToken) {
- h['Authentication'] = `Bearer ${bearerToken}`;
+ h['Authorization'] = `Bearer ${bearerToken}`;
}
return {
method: 'POST',
diff --git a/app/main.css b/app/main.css
index db3852fc..6a42290e 100644
--- a/app/main.css
+++ b/app/main.css
@@ -167,6 +167,22 @@ footer li a:hover {
width: auto;
}
+.text-underline {
+ text-decoration: underline;
+}
+
+.d-block {
+ display: block;
+}
+
+.d-inline-block {
+ display: inline-block;
+}
+
+.align-middle {
+ vertical-align: middle;
+}
+
.main {
display: flex;
position: relative;
diff --git a/app/ui/archiveTile.js b/app/ui/archiveTile.js
index 9a22cdf5..84ecf1f6 100644
--- a/app/ui/archiveTile.js
+++ b/app/ui/archiveTile.js
@@ -486,12 +486,12 @@ module.exports.empty = function(state, emit) {
})}
`;
- const warning = state.WEB_UI.UPLOAD_AREA_WARNING_HTML
+ const uploadNotice = state.WEB_UI.UPLOAD_AREA_NOTICE_HTML
? html`
- ${raw(state.WEB_UI.UPLOAD_AREA_WARNING_HTML)}
+ ${raw(state.WEB_UI.UPLOAD_AREA_NOTICE_HTML)}
`
: '';
@@ -536,7 +536,7 @@ module.exports.empty = function(state, emit) {
>
${state.translate('addFilesButton')}
- ${upsell} ${warning}
+ ${upsell} ${uploadNotice}
`;
@@ -569,15 +569,37 @@ module.exports.preview = function(state, emit) {
${archiveDetails(state.translate, archive)}
`;
- const warning = state.WEB_UI.DOWNLOAD_WARNING_HTML
+ const notice = state.WEB_UI.DOWNLOAD_NOTICE_HTML
? html`
- ${raw(state.WEB_UI.DOWNLOAD_WARNING_HTML)}
+ ${raw(state.WEB_UI.DOWNLOAD_NOTICE_HTML)}
`
: '';
+ const sponsor = state.WEB_UI.SHOW_THUNDERBIRD_SPONSOR
+ ? html`
+
+
+ ${state.translate('sponsoredByThunderbird')}
+
+ `
+ : '';
return html`
${state.translate('downloadButtonLabel')}
- ${warning}
+ ${notice} ${sponsor}
`;
diff --git a/app/ui/home.js b/app/ui/home.js
index cfa38564..86550ff4 100644
--- a/app/ui/home.js
+++ b/app/ui/home.js
@@ -1,8 +1,10 @@
const html = require('choo/html');
+const raw = require('choo/html/raw');
const { list } = require('../utils');
const archiveTile = require('./archiveTile');
const modal = require('./modal');
const intro = require('./intro');
+const assets = require('../../common/assets');
module.exports = function(state, emit) {
const archives = state.storage.files
@@ -16,7 +18,42 @@ module.exports = function(state, emit) {
} else {
left = archiveTile.empty(state, emit);
}
+
+ if (archives.length > 0 && state.WEB_UI.UPLOADS_LIST_NOTICE_HTML) {
+ archives.push(html`
+
+ ${raw(state.WEB_UI.UPLOADS_LIST_NOTICE_HTML)}
+
+ `);
+ }
+
archives.reverse();
+
+ if (archives.length > 0 && state.WEB_UI.SHOW_THUNDERBIRD_SPONSOR) {
+ archives.push(html`
+
+
+ Sponsored by Thunderbird
+
+ `);
+ }
+
const right =
archives.length === 0
? intro(state)
diff --git a/app/ui/intro.js b/app/ui/intro.js
index c9181837..9a53c404 100644
--- a/app/ui/intro.js
+++ b/app/ui/intro.js
@@ -1,10 +1,46 @@
const html = require('choo/html');
+const raw = require('choo/html/raw');
+const assets = require('../../common/assets');
module.exports = function intro(state) {
+ const notice = state.WEB_UI.MAIN_NOTICE_HTML
+ ? html`
+
+ ${raw(state.WEB_UI.MAIN_NOTICE_HTML)}
+
+ `
+ : '';
+
+ const sponsor = state.WEB_UI.SHOW_THUNDERBIRD_SPONSOR
+ ? html`
+
+
+ Sponsored by Thunderbird
+
+ `
+ : '';
+
return html`
+ ${notice}
${state.translate('introTitle')}
@@ -13,6 +49,7 @@ module.exports = function intro(state) {
${state.translate('introDescription')}
+ ${sponsor}
`;
};
diff --git a/assets/thunderbird-icon.svg b/assets/thunderbird-icon.svg
new file mode 100644
index 00000000..4f555086
--- /dev/null
+++ b/assets/thunderbird-icon.svg
@@ -0,0 +1,65 @@
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 5e3567b8..2af3dd62 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "send",
- "version": "3.4.24",
+ "version": "3.4.27",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "send",
- "version": "3.4.24",
+ "version": "3.4.27",
"license": "MPL-2.0",
"dependencies": {
"@dannycoates/express-ws": "^5.0.3",
diff --git a/package.json b/package.json
index 7e492253..371e932d 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "send",
"description": "File Sharing Experiment",
- "version": "3.4.24",
+ "version": "3.4.27",
"author": "Mozilla (https://mozilla.org)",
"contributors": [
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
diff --git a/public/contribute.json b/public/contribute.json
index c54a6262..df405da9 100644
--- a/public/contribute.json
+++ b/public/contribute.json
@@ -1,17 +1,17 @@
{
- "name": "firefox-send",
+ "name": "send",
"description": "File Sharing Experiment",
"repository": {
- "url": "https://github.com/send/send/",
+ "url": "https://github.com/timvisee/send/",
"license": "MPL-2.0"
},
"participate": {
- "home": "https://github.com/send/send/blob/master/README.md",
- "docs": "https://github.com/send/send/blob/master/README.md"
+ "home": "https://github.om/timvisee/send/blob/master/README.md",
+ "docs": "https://github.com/timvisee/send/blob/master/README.md"
},
"bugs": {
- "list": "https://gitlab.com/send/send/issues",
- "report": "https://gitlab.com/send/send/issues/new"
+ "list": "https://github.com/timvisee/send/issues",
+ "report": "https://github.com/timvisee/send/issues/new"
},
"keywords": [
"JavaScript",
diff --git a/public/locales/en-CA/send.ftl b/public/locales/en-CA/send.ftl
index 35fd7ba7..a7b71adf 100644
--- a/public/locales/en-CA/send.ftl
+++ b/public/locales/en-CA/send.ftl
@@ -147,3 +147,5 @@ shareLinkButton = Share link
shareMessage = Download “{ $name }” with { -send-brand }: simple, safe file sharing
trailheadPromo = There is a way to protect your privacy. Join Firefox.
learnMore = Learn more.
+
+sponsoredByThunderbird = Sponsored by Thunderbird
diff --git a/public/locales/en-GB/send.ftl b/public/locales/en-GB/send.ftl
index 1fb7a3f8..3b57c4e4 100644
--- a/public/locales/en-GB/send.ftl
+++ b/public/locales/en-GB/send.ftl
@@ -152,3 +152,5 @@ shareLinkButton = Share link
shareMessage = Download “{ $name }” with { -send-brand }: simple, safe file sharing
trailheadPromo = There is a way to protect your privacy. Join Firefox.
learnMore = Learn more.
+
+sponsoredByThunderbird = Sponsored by Thunderbird
diff --git a/public/locales/en-US/send.ftl b/public/locales/en-US/send.ftl
index 36e482f4..f42090c7 100644
--- a/public/locales/en-US/send.ftl
+++ b/public/locales/en-US/send.ftl
@@ -143,3 +143,5 @@ shareLinkButton = Share link
# $name is the name of the file
shareMessage = Download “{ $name }” with { -send-brand }: simple, safe file sharing
learnMore = Learn more.
+
+sponsoredByThunderbird = Sponsored by Thunderbird
diff --git a/public/locales/nl/send.ftl b/public/locales/nl/send.ftl
index ba738802..15f091d4 100644
--- a/public/locales/nl/send.ftl
+++ b/public/locales/nl/send.ftl
@@ -52,7 +52,7 @@ passwordSetError = Dit wachtwoord kon niet worden ingesteld
-send-short-brand = Send
-firefox = Firefox
-mozilla = Mozilla
-introTitle = Bestanden delen, eenvoudig en privé
+introTitle = Bestanden delen, eenvoudig en privé
introDescription = Met { -send-brand } kunt u bestanden delen met end-to-endversleuteling en een koppeling die automatisch verloopt. Hierdoor kunt u privé houden wat u wilt delen en er zeker van zijn dat uw zaken niet voor altijd online blijven.
notifyUploadEncryptDone = Uw bestand is versleuteld en klaar voor verzending
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
@@ -152,3 +152,5 @@ shareLinkButton = Koppeling delen
shareMessage = Download ‘{ $name }’ met { -send-brand }: eenvoudig, veilig bestanden delen
trailheadPromo = Er is een manier om uw privacy te beschermen. Doe mee met Firefox.
learnMore = Meer info.
+
+sponsoredByThunderbird = Gesponsord door Thunderbird
diff --git a/server/clientConstants.js b/server/clientConstants.js
index 4786bcff..b340f585 100644
--- a/server/clientConstants.js
+++ b/server/clientConstants.js
@@ -15,8 +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,
- UPLOAD_AREA_WARNING_HTML: config.upload_area_warning_html,
- DOWNLOAD_WARNING_HTML: config.download_warning_html,
+ MAIN_NOTICE_HTML: config.main_notice_html,
+ UPLOAD_AREA_NOTICE_HTML: config.upload_area_notice_html,
+ UPLOADS_LIST_NOTICE_HTML: config.uploads_list_notice_html,
+ DOWNLOAD_NOTICE_HTML: config.download_notice_html,
+ SHOW_THUNDERBIRD_SPONSOR: config.show_thunderbird_sponsor,
COLORS: {
PRIMARY: config.ui_color_primary,
ACCENT: config.ui_color_accent
diff --git a/server/config.js b/server/config.js
index ffab7bd3..07b94d61 100644
--- a/server/config.js
+++ b/server/config.js
@@ -264,15 +264,30 @@ const conf = convict({
default: '',
env: 'CUSTOM_FOOTER_URL'
},
- upload_area_warning_html: {
+ main_notice_html: {
format: String,
default: '',
- env: 'SEND_UPLOAD_AREA_WARNING_HTML'
+ env: 'SEND_MAIN_NOTICE_HTML'
},
- download_warning_html: {
+ upload_area_notice_html: {
format: String,
default: '',
- env: 'SEND_DOWNLOAD_WARNING_HTML'
+ env: 'SEND_UPLOAD_AREA_NOTICE_HTML'
+ },
+ uploads_list_notice_html: {
+ format: String,
+ default: '',
+ env: 'SEND_UPLOADS_LIST_NOTICE_HTML'
+ },
+ download_notice_html: {
+ format: String,
+ default: '',
+ env: 'SEND_DOWNLOAD_NOTICE_HTML'
+ },
+ show_thunderbird_sponsor: {
+ format: Boolean,
+ default: false,
+ env: 'SHOW_THUNDERBIRD_SPONSOR'
},
ui_color_primary: {
format: String,