mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-10 13:13:00 +01:00
34 lines
1002 B
JavaScript
34 lines
1002 B
JavaScript
const html = require('choo/html');
|
|
const file = require('../file');
|
|
|
|
module.exports = function(state, emit) {
|
|
if (state.storage.files.length) {
|
|
return html`
|
|
<table class="fileList">
|
|
<thead>
|
|
<tr>
|
|
<th class="fileList__header fileList__nameCol">
|
|
${state.translate('uploadedFile')}
|
|
</th>
|
|
<th class="fileList__header fileList__copyCol">
|
|
${state.translate('copyFileList')}
|
|
</th>
|
|
<th class="fileList__header fileList__expireCol" >
|
|
${state.translate('timeFileList')}
|
|
</th>
|
|
<th class="fileList__header fileList__dlCol" >
|
|
${state.translate('downloadsFileList')}
|
|
</th>
|
|
<th class="fileList__header fileList__delCol">
|
|
${state.translate('deleteFileList')}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="fileList__body">
|
|
${state.storage.files.map(f => file(f, state, emit))}
|
|
</tbody>
|
|
</table>
|
|
`;
|
|
}
|
|
};
|