1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-08 20:22:45 +01:00

parameterize download count dropdown on android

This commit is contained in:
Danny Coates 2018-09-25 11:36:23 -07:00
parent 8b21a54ab4
commit 6b9a735bec
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
2 changed files with 8 additions and 9 deletions

View File

@ -14,6 +14,8 @@ window.LIMITS = {
};
window.DEFAULTS = {
DOWNLOAD_COUNTS: [1, 2, 3, 4, 5, 20, 50, 100, 200],
EXPIRE_TIMES_SECONDS: [300, 3600, 86400, 604800],
EXPIRE_SECONDS: 3600
};

View File

@ -1,3 +1,4 @@
/* globals DEFAULTS */
const html = require('choo/html');
export default function options(state, emit) {
@ -55,15 +56,11 @@ export default function options(state, emit) {
<div id="expires-after-section">
<h5>Expires after</h5>
<select name="numDownloads">
<option value="1">1 download</option>
<option value="2">2 downloads</option>
<option value="3">3 downloads</option>
<option value="4">4 downloads</option>
<option value="5">5 downloads</option>
<option value="20">20 downloads</option>
<option value="50">50 downloads</option>
<option value="100">100 downloads</option>
<option value="200">200 downloads</option>
${DEFAULTS.DOWNLOAD_COUNTS.map(i => {
return html`<option value="${i}">${i} download${
i > 1 ? 's' : ''
}</option>`;
})}
</select>
or
<select name="maxTime">