const html = require('choo/html'); const progress = require('./progress'); const { bytes } = require('../utils'); module.exports = function(state, emit) { const transfer = state.transfer; const div = html`
${state.translate( 'downloadingPageProgress', { filename: state.fileInfo.name, size: bytes(state.fileInfo.size) } )}
${state.translate( 'downloadingPageMessage' )}
${progress(transfer.progressRatio)}
${state.translate( transfer.msg, transfer.sizes )}
`; function cancel() { const btn = document.getElementById('cancel-upload'); btn.remove(); emit('cancel'); } return div; };