diff --git a/app/base.css b/app/base.css index 8a41b893..7a1bed43 100644 --- a/app/base.css +++ b/app/base.css @@ -139,6 +139,18 @@ a { } } +.btn--cancel { + font-size: 13px; + font-weight: 700; + background: none; + color: var(--errorColor); + border: none; +} + +.uploadCancel:hover { + text-decoration: underline; +} + .input { border: 1px solid var(--lightBorderColor); font-size: 20px; diff --git a/app/fileManager.js b/app/fileManager.js index d8bfbfdb..e66269c1 100644 --- a/app/fileManager.js +++ b/app/fileManager.js @@ -228,7 +228,6 @@ export default function(state, emitter) { state.storage.totalDownloads += 1; state.transfer.reset(); metrics.completedDownload({ size, time, speed }); - //emitter.emit('pushState', '/completed'); } catch (err) { if (err.message === '0') { // download cancelled diff --git a/app/pages/preview/index.js b/app/pages/preview/index.js index d86fb1b1..15951cf8 100644 --- a/app/pages/preview/index.js +++ b/app/pages/preview/index.js @@ -5,9 +5,23 @@ const downloadedFiles = require('../../templates/uploadedFileList'); module.exports = function(state, emit) { const storageFile = state.storage.getFileById(state.params.id); - const multifiles = Array.from(storageFile.manifest.files); + const trySendLink = html` + + ${state.translate('sendYourFilesLink')} + `; + const cancelButton = html` + + `; + + const bottomLink = + state.transfer.state === 'downloading' ? cancelButton : trySendLink; + return html`