drop.chapril.org-firefoxsend/app/pages/uploads/index.js
Danny Coates cc85486414
wip
2018-11-01 10:43:14 -07:00

19 lines
573 B
JavaScript

const html = require('choo/html');
const controlArea = require('../../templates/controlArea');
const archiveTile = require('../../templates/archiveTile');
module.exports = function(state, emit) {
const fileArea = state.storage.files.length
? html`<ul class="myUploads">
${state.storage.files.map(f => archiveTile(f, state))}
</ul>`
: html`<div>nothing to see here</div>`;
return html`<main class="main">
${controlArea(state, emit)}
<div class="wide">
<h1>${state.translate('myUploads')}</h1>
${fileArea}
</div>
</main>`;
};