drop.chapril.org-firefoxsend/app/templates/uploadedFileList/index.js
2018-08-03 16:11:13 -07:00

16 lines
347 B
JavaScript

const html = require('choo/html');
const file = require('../uploadedFile');
module.exports = function(archive, state, emit) {
let files = [];
if (archive) {
files = Array.from(archive.manifest.files);
}
return html`
<ul class="uploadedFiles">
${files.map((f, i) => file(f, i, state, emit, archive._hasPassword))}
</ul>
`;
};