2017-08-24 23:54:02 +02:00
|
|
|
const html = require('choo/html');
|
2018-01-30 21:15:09 +01:00
|
|
|
const progress = require('../templates/progress');
|
2017-08-24 23:54:02 +02:00
|
|
|
const { fadeOut } = require('../utils');
|
|
|
|
|
|
|
|
module.exports = function(state, emit) {
|
|
|
|
const div = html`
|
2017-11-08 00:54:42 +01:00
|
|
|
<div id="page-one">
|
2018-01-24 19:23:13 +01:00
|
|
|
<div id="download" class="fadeIn">
|
|
|
|
<div id="download-progress">
|
|
|
|
<div id="dl-title" class="title">
|
|
|
|
${state.translate('downloadFinish')}
|
|
|
|
</div>
|
|
|
|
<div class="description"></div>
|
|
|
|
${progress(1)}
|
|
|
|
<div class="upload">
|
|
|
|
<div class="progress-text"></div>
|
|
|
|
</div>
|
2017-08-24 23:54:02 +02:00
|
|
|
</div>
|
2018-01-24 19:23:13 +01:00
|
|
|
<a class="send-new"
|
|
|
|
data-state="completed"
|
|
|
|
href="/"
|
|
|
|
onclick=${sendNew}>${state.translate('sendYourFilesLink')}</a>
|
2017-08-24 23:54:02 +02:00
|
|
|
</div>
|
2017-11-08 00:54:42 +01:00
|
|
|
</div>
|
2017-08-24 23:54:02 +02:00
|
|
|
`;
|
|
|
|
|
|
|
|
async function sendNew(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
await fadeOut('download');
|
|
|
|
emit('pushState', '/');
|
|
|
|
}
|
|
|
|
|
|
|
|
return div;
|
|
|
|
};
|