mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-13 22:54:15 +01:00
Use EXPIRE_SECONDS to calculate file ttl for static content
This commit is contained in:
parent
1a4cea7b4f
commit
1d26f4b24f
@ -1,3 +1,4 @@
|
|||||||
|
/* global EXPIRE_SECONDS */
|
||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
const assets = require('../../common/assets');
|
const assets = require('../../common/assets');
|
||||||
const notFound = require('./notFound');
|
const notFound = require('./notFound');
|
||||||
@ -16,10 +17,11 @@ function passwordComplete(state, password) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function expireInfo(file, translate, emit) {
|
function expireInfo(file, translate, emit) {
|
||||||
|
const hours = Math.floor(EXPIRE_SECONDS / 60 / 60);
|
||||||
const el = html([
|
const el = html([
|
||||||
`<div>${translate('expireInfo', {
|
`<div>${translate('expireInfo', {
|
||||||
downloadCount: '<select></select>',
|
downloadCount: '<select></select>',
|
||||||
timespan: translate('timespanHours', { num: 24 })
|
timespan: translate('timespanHours', { num: hours })
|
||||||
})}</div>`
|
})}</div>`
|
||||||
]);
|
]);
|
||||||
const select = el.querySelector('select');
|
const select = el.querySelector('select');
|
||||||
|
Loading…
Reference in New Issue
Block a user