mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-10 04:05:34 +00:00
show download Limits on page
This commit is contained in:
@@ -15,7 +15,9 @@ function timeLeft(milliseconds) {
|
||||
|
||||
module.exports = function(file, state, emit) {
|
||||
const ttl = file.expiresAt - Date.now();
|
||||
const remaining = timeLeft(ttl) || state.translate('linkExpiredAlt');
|
||||
const remainingTime = timeLeft(ttl) || state.translate('linkExpiredAlt');
|
||||
const downloadLimit = file.dlimit || 1;
|
||||
const totalDownloads = file.dtotal || 0;
|
||||
const row = html`
|
||||
<tr id="${file.id}">
|
||||
<td class="overflow-col" title="${
|
||||
@@ -29,7 +31,8 @@ module.exports = function(file, state, emit) {
|
||||
'copiedUrl'
|
||||
)}</span>
|
||||
</td>
|
||||
<td>${remaining}</td>
|
||||
<td>${remainingTime}</td>
|
||||
<td class="center-col">${totalDownloads}/${downloadLimit}</td>
|
||||
<td class="center-col">
|
||||
<img onclick=${showPopup} src="${assets.get(
|
||||
'close-16.svg'
|
||||
|
||||
@@ -12,7 +12,12 @@ module.exports = function(state, emit) {
|
||||
<th id="copy-file-list" class="center-col">${state.translate(
|
||||
'copyFileList'
|
||||
)}</th>
|
||||
<th id="expiry-file-list">${state.translate('expiryFileList')}</th>
|
||||
<th id="expiry-time-file-list" >${state.translate(
|
||||
'timeFileList'
|
||||
)}</th>
|
||||
<th id="expiry-downloads-file-list" >${state.translate(
|
||||
'downloadsFileList'
|
||||
)}</th>
|
||||
<th id="delete-file-list" class="center-col">${state.translate(
|
||||
'deleteFileList'
|
||||
)}</th>
|
||||
|
||||
Reference in New Issue
Block a user