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 = {
|
||||
DOWNLOAD_COUNTS: [1, 2, 3, 4, 5, 20, 50, 100, 200],
|
||||
EXPIRE_TIMES_SECONDS: [300, 3600, 86400, 604800],
|
||||
EXPIRE_SECONDS: 3600
|
||||
};
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue