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.

33 lines
522 B

6 years ago
6 years ago
  1. module.exports = class {
  2. onCreate(input) {
  3. this.state = {
  4. modal: null,
  5. removed: false,
  6. commentLabels: {
  7. Article: "Comment",
  8. Message: "Message",
  9. Chat: "Chat Message",
  10. },
  11. }
  12. }
  13. updateChapter(data) {
  14. this.emit("edit", data)
  15. }
  16. moveChapter(data) {
  17. this.emit("move", data)
  18. }
  19. removeChapter() {
  20. this.state.removed = true
  21. this.emit("remove")
  22. }
  23. open(modal) {
  24. this.state.modal = modal
  25. }
  26. close() {
  27. this.state.modal = null
  28. }
  29. }