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