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

34 lines
1002 B
JavaScript
Raw Normal View History

const html = require('choo/html');
const file = require('../file');
module.exports = function(state, emit) {
if (state.storage.files.length) {
2018-02-16 21:56:53 +01:00
return html`
<table class="fileList">
<thead>
<tr>
<th class="fileList__header fileList__nameCol">
${state.translate('uploadedFile')}
</th>
<th class="fileList__header fileList__copyCol">
2018-01-24 19:23:13 +01:00
${state.translate('copyFileList')}
</th>
<th class="fileList__header fileList__expireCol" >
2018-01-24 19:23:13 +01:00
${state.translate('timeFileList')}
</th>
<th class="fileList__header fileList__dlCol" >
2018-01-24 19:23:13 +01:00
${state.translate('downloadsFileList')}
</th>
<th class="fileList__header fileList__delCol">
2018-01-24 19:23:13 +01:00
${state.translate('deleteFileList')}
</th>
</tr>
</thead>
<tbody class="fileList__body">
${state.storage.files.map(f => file(f, state, emit))}
</tbody>
</table>
`;
}
};