${state.translate('accountBenefitTitle')}
diff --git a/app/pages/split.js b/app/pages/split.js
new file mode 100644
index 00000000..f5b50de1
--- /dev/null
+++ b/app/pages/split.js
@@ -0,0 +1,18 @@
+const html = require('choo/html');
+const title = require('../templates/title');
+const signupPromo = require('../templates/signupPromo');
+
+module.exports = function(state, a, b) {
+ return html`
+
+
+ ${title(state)}
+ ${a}
+
+
+ ${signupPromo(state)}
+ ${b}
+
+
+ `;
+};
diff --git a/app/pages/welcome/index.js b/app/pages/welcome/index.js
index f56f5bc9..675b9e9b 100644
--- a/app/pages/welcome/index.js
+++ b/app/pages/welcome/index.js
@@ -1,163 +1,6 @@
-const html = require('choo/html');
-const assets = require('../../../common/assets');
-const title = require('../../templates/title');
-const signupPromo = require('../../templates/signupPromo');
-const fileList = require('../../templates/fileList');
-const setPasswordSection = require('../../templates/setPasswordSection');
-const uploadBox = require('../../templates/uploadedFileList');
-const expireInfo = require('../../templates/expireInfo');
+const fileManager = require('../../templates/fileManager');
+const split = require('../split');
module.exports = function(state, emit) {
- // the page flickers if both the server and browser set 'effect--fadeIn'
- const fade = state.layout ? '' : 'effect--fadeIn';
-
- const hasAnUpload = state.archive && state.archive.numFiles > 0;
-
- const optionClass = state.uploading ? 'uploadOptions--faded' : '';
- const btnUploading = state.uploading ? 'btn--stripes' : '';
- const cancelVisible = state.uploading ? '' : 'noDisplay';
- const faded = hasAnUpload ? 'uploadArea--faded' : '';
- const selectFileClass = hasAnUpload > 0 ? 'btn--hidden' : '';
- const sendFileClass = hasAnUpload > 0 ? '' : 'btn--hidden';
-
- let btnText = '';
-
- if (state.encrypting) {
- btnText = state.translate('encryptingFile');
- } else if (state.uploading) {
- btnText = `sending... ${Math.floor(state.transfer.progressRatio * 100)}%`;
- } else {
- //default pre-upload text
- btnText = state.translate('uploadSuccessConfirmHeader');
- }
-
- return html`
-
- ${title(state)}
-
-
-
-
-
- ${signupPromo(state)}
-
-
- ${fileList(state)}
-
-
-
-
-
-
-
- ${expireInfo(state, emit)}
- ${setPasswordSection(state)}
-
-
-
-
-
-
-
-
-
- `;
-
- function noop() {}
-
- function dragover(event) {
- const div = document.querySelector('.uploadArea');
- div.classList.add('uploadArea--dragging');
- }
-
- function dragleave(event) {
- const div = document.querySelector('.uploadArea');
- div.classList.remove('uploadArea--dragging');
- }
-
- function onfocus(event) {
- event.target.classList.add('inputFile--focused');
- }
-
- function onblur(event) {
- event.target.classList.remove('inputFile--focused');
- }
-
- function cancel(event) {
- if (state.uploading) {
- emit('cancel');
- const cancelBtn = document.querySelector('.uploadCancel');
- cancelBtn.innerHTML = state.translate('uploadCancelNotification');
- }
- }
-
- function addFiles(event) {
- event.preventDefault();
- const newFiles = Array.from(event.target.files);
-
- emit('addFiles', { files: newFiles });
- }
-
- function upload(event) {
- event.preventDefault();
- event.target.disabled = true;
- if (!state.uploading) {
- emit('upload', {
- type: 'click',
- dlimit: state.downloadCount || 1,
- password: state.password
- });
- }
- }
+ return split(state, fileManager(state, emit));
};
diff --git a/app/routes/index.js b/app/routes/index.js
index dcb74644..9e485f17 100644
--- a/app/routes/index.js
+++ b/app/routes/index.js
@@ -31,17 +31,6 @@ module.exports = function() {
${banner(state, emit)}
${header(state, emit)}
-
${page(state, emit)}
${footer(state)}
diff --git a/app/templates/fileIcon/fileIcon.css b/app/templates/fileIcon/fileIcon.css
index ac87674d..08643cd6 100644
--- a/app/templates/fileIcon/fileIcon.css
+++ b/app/templates/fileIcon/fileIcon.css
@@ -4,7 +4,7 @@
pointer-events: none;
margin: 8px;
color: #fff;
- background-image: url('../assets/red_file.svg');
+ background-image: url('../assets/blue_file.svg');
width: 22px;
height: 32px;
overflow: hidden;
diff --git a/app/pages/welcome/welcome.css b/app/templates/fileManager/fileManager.css
similarity index 91%
rename from app/pages/welcome/welcome.css
rename to app/templates/fileManager/fileManager.css
index 15acbf48..b3e85be1 100644
--- a/app/pages/welcome/welcome.css
+++ b/app/templates/fileManager/fileManager.css
@@ -1,15 +1,19 @@
+.fileManager {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+}
+
.uploadArea {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
- border: 2px dashed rgba(12, 12, 13, 0.2);
- margin: 0 0 10px;
- height: 400px;
overflow: scroll;
transition: transform 150ms;
flex: 1;
+ min-height: 90px;
}
.uploadArea__msg {
@@ -70,6 +74,7 @@
top: 0;
left: 0;
flex: none;
+ height: 100%;
width: 100%;
border: none;
z-index: 1;
@@ -79,6 +84,7 @@
text-align: left;
font-size: 13px;
color: var(--lightTextColor);
+ margin: 24px;
}
.uploadOptions--faded {
diff --git a/app/templates/fileManager/index.js b/app/templates/fileManager/index.js
new file mode 100644
index 00000000..30c3ec3c
--- /dev/null
+++ b/app/templates/fileManager/index.js
@@ -0,0 +1,129 @@
+const html = require('choo/html');
+const assets = require('../../../common/assets');
+const setPasswordSection = require('../setPasswordSection');
+const uploadBox = require('../uploadedFileList');
+const expireInfo = require('../expireInfo');
+
+module.exports = function(state, emit) {
+ const hasAnUpload = state.archive && state.archive.numFiles > 0;
+
+ const optionClass = state.uploading ? 'uploadOptions--faded' : '';
+ const btnUploading = state.uploading ? 'btn--stripes' : '';
+ const cancelVisible = state.uploading ? '' : 'noDisplay';
+ const faded = hasAnUpload ? 'noDisplay' : '';
+ const selectFileClass = hasAnUpload > 0 ? 'btn--hidden' : '';
+ const sendFileClass = hasAnUpload > 0 ? 'btn--file' : 'btn--hidden';
+
+ let btnText = '';
+
+ if (state.encrypting) {
+ btnText = state.translate('encryptingFile');
+ } else if (state.uploading) {
+ btnText = `sending... ${Math.floor(state.transfer.progressRatio * 100)}%`;
+ } else {
+ //default pre-upload text
+ btnText = state.translate('uploadSuccessConfirmHeader');
+ }
+
+ return html`
+
+
+
+ ${expireInfo(state, emit)}
+ ${setPasswordSection(state)}
+
+
+
+
+
+
+
+
`;
+
+ function noop() {}
+
+ function dragover(event) {
+ const div = document.querySelector('.uploadArea');
+ div.classList.add('uploadArea--dragging');
+ }
+
+ function dragleave(event) {
+ const div = document.querySelector('.uploadArea');
+ div.classList.remove('uploadArea--dragging');
+ }
+
+ function onfocus(event) {
+ event.target.classList.add('inputFile--focused');
+ }
+
+ function onblur(event) {
+ event.target.classList.remove('inputFile--focused');
+ }
+
+ function cancel(event) {
+ if (state.uploading) {
+ emit('cancel');
+ const cancelBtn = document.querySelector('.uploadCancel');
+ cancelBtn.innerHTML = state.translate('uploadCancelNotification');
+ }
+ }
+
+ function addFiles(event) {
+ event.preventDefault();
+ const newFiles = Array.from(event.target.files);
+
+ emit('addFiles', { files: newFiles });
+ }
+
+ function upload(event) {
+ event.preventDefault();
+ event.target.disabled = true;
+ if (!state.uploading) {
+ emit('upload', {
+ type: 'click',
+ dlimit: state.downloadCount || 1,
+ password: state.password
+ });
+ }
+ }
+};
diff --git a/app/templates/footer/footer.css b/app/templates/footer/footer.css
index 8504d398..06910538 100644
--- a/app/templates/footer/footer.css
+++ b/app/templates/footer/footer.css
@@ -1,14 +1,11 @@
.footer {
- margin: 0 auto;
+ flex: none;
+ margin: 24px;
font-size: 12px;
font-weight: 600;
display: flex;
flex-direction: row;
- box-sizing: border-box;
justify-content: flex-end;
- align-items: center;
- padding-top: var(--grid-basis);
- width: 100%;
}
.legalSection {
@@ -33,19 +30,13 @@
margin: 0 0 -5px calc(var(--grid-basis) * 2);
}
-.dropDownArrow {
- display: none;
-}
-
.dropdown__only {
display: none;
}
-@media (max-device-width: 750px), (max-width: 750px) {
+@media (max-device-width: 720px), (max-width: 720px) {
.footer {
- align-items: flex-end;
- margin: 0;
- min-width: 455px;
+ justify-content: flex-start;
}
.footer_hiddenIcon {
@@ -56,20 +47,9 @@
display: block;
}
- .dropDownArrow {
- display: initial;
- float: right;
- }
-
.legalSection {
- flex: 0;
- background-color: #fff;
- display: block;
- border-radius: 4px;
- border: 1px solid rgba(12, 12, 13, 0.1);
- box-sizing: border-box;
+ flex-direction: column;
text-align: left;
- margin-right: auto;
}
.legalSection__link {
@@ -93,8 +73,4 @@
color: var(--primaryControlFGColor);
background-color: var(--primaryControlBGColor);
}
-
- .footer__noDisplay {
- display: none;
- }
}
diff --git a/app/templates/footer/index.js b/app/templates/footer/index.js
index 4e9fd93e..3c837eab 100644
--- a/app/templates/footer/index.js
+++ b/app/templates/footer/index.js
@@ -3,18 +3,11 @@ const assets = require('../../../common/assets');
module.exports = function(state) {
const footer = html`