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.

17 lines
382 B

  1. module.exports = class {
  2. onCreate(input) {
  3. this.state = {
  4. showCharacter: false,
  5. paragraphs: input.comment.source.split('\n').filter(l => l.length > 1),
  6. }
  7. }
  8. onInput(input) {
  9. if (this.state) {
  10. this.state.paragraphs = input.comment.source.split('\n').filter(l => l.length > 1)
  11. }
  12. }
  13. toggle(key) {
  14. this.state[key] = !this.state[key]
  15. }
  16. }