kiss-spaced-rep refresh flow

This commit is contained in:
2023-04-12 09:54:09 -06:00
parent 7c32b57038
commit 1d140d38ae
4 changed files with 12 additions and 4 deletions

View File

@@ -43,11 +43,15 @@
(method :Void showImage [path]
(+= content "<img src=\"/static/${path}\" /><br />"))
(method :Void delayForUserInput [cc]
(method :Void delayForUserInput [cc &opt :String text]
(set this.cc cc)
(+= content "<br /><a href=\"/continue\">Next</a><br />"))
(unless text
(set text "Next"))
(+= content "<br /><a href=\"/continue\">${text}</a><br />"))
(method :Void getUserInput [resolve]
(set this.resolve resolve)
(+= content "<br /><input type=\"text\" id=\"value\"><br /><button onclick=\"window.open('/submit?value=' + document.getElementById('value').value, '_self');\">Submit</a><br />"))
(method :Void promptForRefresh [refresh]
(delayForUserInput refresh "Refresh"))