The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
347 B

6 years ago
6 years ago
  1. module.exports = class {
  2. onCreate(input) {
  3. this.state = {
  4. modal: null,
  5. removed: false,
  6. }
  7. }
  8. updateChapter(data) {
  9. this.emit("edit", data)
  10. }
  11. removeChapter() {
  12. this.state.removed = true
  13. this.emit("remove")
  14. }
  15. open(modal) {
  16. this.state.modal = modal
  17. }
  18. close() {
  19. this.state.modal = null
  20. }
  21. }