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`