drop.chapril.org-firefoxsend/app/templates/uploadedFileList/index.js

16 lines
347 B
JavaScript
Raw Normal View History

2018-07-31 20:09:18 +02:00
const html = require('choo/html');
const file = require('../uploadedFile');
2018-08-03 21:24:41 +02:00
module.exports = function(archive, state, emit) {
let files = [];
if (archive) {
files = Array.from(archive.manifest.files);
}
2018-07-31 20:09:18 +02:00
return html`
<ul class="uploadedFiles">
2018-08-03 21:24:41 +02:00
${files.map((f, i) => file(f, i, state, emit, archive._hasPassword))}
2018-07-31 20:09:18 +02:00
</ul>
`;
};