stubbed in modal dialog

This commit is contained in:
Danny Coates 2018-09-07 10:53:40 -07:00
parent 20528eb0d1
commit cdc15596df
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
11 changed files with 100 additions and 24 deletions

View file

@ -2,6 +2,7 @@ const html = require('choo/html');
const raw = require('choo/html/raw');
const selectbox = require('../selectbox');
const timeLimitText = require('../timeLimitText');
const okDialog = require('../okDialog');
module.exports = function(state, emit) {
const el = html`<div> ${raw(
@ -25,7 +26,7 @@ module.exports = function(state, emit) {
value => {
const max = state.user.maxDownloads;
if (value > max) {
alert('todo: this setting requires an account');
state.modal = okDialog('todo: this setting requires an account');
value = max;
}
state.downloadCount = value;
@ -44,7 +45,7 @@ module.exports = function(state, emit) {
value => {
const max = state.user.maxExpireSeconds;
if (value > max) {
alert('todo: this setting requires an account');
state.modal = okDialog('todo: this setting requires an account');
value = max;
}
state.timeLimit = value;