mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-11 04:33:00 +00:00
some wip. still broken
This commit is contained in:
@@ -4,19 +4,11 @@ const bytes = require('../../utils').bytes;
|
||||
const fileIcon = require('../fileIcon');
|
||||
|
||||
module.exports = function(file, index, state, emit, hasPassword) {
|
||||
const transfer = state.transfer;
|
||||
const transferState = transfer ? transfer.state : null;
|
||||
const share = state.route.includes('share/');
|
||||
const complete = share ? 'uploadedFile--completed' : '';
|
||||
|
||||
const cancelVisible =
|
||||
state.route === '/' && !state.uploading
|
||||
? 'uploadedFile__cancel--visible'
|
||||
: '';
|
||||
|
||||
const stampClass =
|
||||
share || transferState === 'complete' ? 'uploadedFile__stamp--visible' : '';
|
||||
|
||||
function cancel(event) {
|
||||
event.preventDefault();
|
||||
if (state.route === '/') {
|
||||
@@ -25,8 +17,7 @@ module.exports = function(file, index, state, emit, hasPassword) {
|
||||
}
|
||||
|
||||
return html`
|
||||
<li class="uploadedFile ${complete}" id="${file.id}"
|
||||
>
|
||||
<li class="uploadedFile" id="${file.id}">
|
||||
|
||||
${fileIcon(file.name, hasPassword)}
|
||||
|
||||
@@ -43,9 +34,6 @@ module.exports = function(file, index, state, emit, hasPassword) {
|
||||
<span>${bytes(file.size)}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<img src="${assets.get('sent-done.svg')}"
|
||||
class="uploadedFile__stamp ${stampClass}"/>
|
||||
</li>
|
||||
`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user