mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-11 04:33:00 +00:00
integrate with new ui
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
const html = require('choo/html');
|
||||
const raw = require('choo/html/raw');
|
||||
const selectbox = require('../selectbox');
|
||||
const timeLimitText = require('../timeLimitText');
|
||||
|
||||
module.exports = function(state) {
|
||||
const el = html`<div> ${raw(
|
||||
state.translate('frontPageExpireInfo', {
|
||||
downloadCount: '<select id=dlCount></select>',
|
||||
timespan: state.translate('timespanHours', { num: 24 }) //'<select id=timespan></select>'
|
||||
timespan: '<select id=timespan></select>'
|
||||
})
|
||||
)}
|
||||
</div>`;
|
||||
@@ -24,13 +25,18 @@ module.exports = function(state) {
|
||||
dlCountSelect
|
||||
);
|
||||
|
||||
/*
|
||||
const timeSelect = el.querySelector('#timespan');
|
||||
el.replaceChild(
|
||||
selectbox(1, [1, 2, 3, 4, 5], num => num, () => {}),
|
||||
selectbox(
|
||||
state.timeLimit || 86400,
|
||||
[300, 3600, 86400, 604800, 1209600],
|
||||
num => timeLimitText(state.translate, num),
|
||||
value => {
|
||||
state.timeLimit = value;
|
||||
}
|
||||
),
|
||||
timeSelect
|
||||
);
|
||||
*/
|
||||
|
||||
return el;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user