show download Limits on page
This commit is contained in:
parent
9ad74e9cbf
commit
050a1aff83
5 changed files with 37 additions and 22 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue