parameterize download count dropdown on android
This commit is contained in:
parent
8b21a54ab4
commit
6b9a735bec
2 changed files with 8 additions and 9 deletions
|
@ -14,6 +14,8 @@ window.LIMITS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.DEFAULTS = {
|
window.DEFAULTS = {
|
||||||
|
DOWNLOAD_COUNTS: [1, 2, 3, 4, 5, 20, 50, 100, 200],
|
||||||
|
EXPIRE_TIMES_SECONDS: [300, 3600, 86400, 604800],
|
||||||
EXPIRE_SECONDS: 3600
|
EXPIRE_SECONDS: 3600
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* globals DEFAULTS */
|
||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
|
|
||||||
export default function options(state, emit) {
|
export default function options(state, emit) {
|
||||||
|
@ -55,15 +56,11 @@ export default function options(state, emit) {
|
||||||
<div id="expires-after-section">
|
<div id="expires-after-section">
|
||||||
<h5>Expires after</h5>
|
<h5>Expires after</h5>
|
||||||
<select name="numDownloads">
|
<select name="numDownloads">
|
||||||
<option value="1">1 download</option>
|
${DEFAULTS.DOWNLOAD_COUNTS.map(i => {
|
||||||
<option value="2">2 downloads</option>
|
return html`<option value="${i}">${i} download${
|
||||||
<option value="3">3 downloads</option>
|
i > 1 ? 's' : ''
|
||||||
<option value="4">4 downloads</option>
|
}</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>
|
|
||||||
</select>
|
</select>
|
||||||
or
|
or
|
||||||
<select name="maxTime">
|
<select name="maxTime">
|
||||||
|
|
Loading…
Reference in a new issue