1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-11 21:52:39 +01:00
send/app/pages/completed.js

35 lines
859 B
JavaScript
Raw Normal View History

const html = require('choo/html');
2018-01-30 21:15:09 +01:00
const progress = require('../templates/progress');
const { fadeOut } = require('../utils');
module.exports = function(state, emit) {
const div = html`
<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>
</div>
2018-01-24 19:23:13 +01:00
<a class="send-new"
data-state="completed"
href="/"
onclick=${sendNew}>${state.translate('sendYourFilesLink')}</a>
</div>
</div>
`;
async function sendNew(e) {
e.preventDefault();
await fadeOut('download');
emit('pushState', '/');
}
return div;
};