drop.chapril.org-firefoxsend/app/pages/preview/index.js

26 lines
752 B
JavaScript
Raw Normal View History

const html = require('choo/html');
2018-07-31 20:09:18 +02:00
const titleSection = require('../../templates/title');
const downloadButton = require('../../templates/downloadButton');
const downloadedFiles = require('../../templates/uploadedFileList');
2018-07-31 20:09:18 +02:00
module.exports = function(state, emit) {
const storageFile = state.storage.getFileById(state.params.id);
2018-07-31 20:09:18 +02:00
const multifiles = Array.from(storageFile.manifest.files);
2018-02-16 21:56:53 +01:00
return html`
<div class="page">
2018-07-31 20:09:18 +02:00
${titleSection(state)}
${downloadedFiles(multifiles, state, emit)}
<div class="description">${state.translate('downloadMessage2')}</div>
${downloadButton(state, emit)}
<a class="link link--action" href="/">
${state.translate('sendYourFilesLink')}
</a>
2018-07-31 20:09:18 +02:00
</div>
`;
};