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.

21 lines
420 B

  1. module.exports = class {
  2. onCreate() {
  3. this.state = {
  4. filters: [],
  5. filtered: false,
  6. }
  7. }
  8. onInput(input) {
  9. if (!input.filter) {
  10. this.state.filters = []
  11. this.state.filtered = false
  12. return
  13. }
  14. this.state.filtered = input.filter.search || input.filter.channels || input.filter.characters || input.filter.events
  15. }
  16. select(value) {
  17. this.emit("select", value)
  18. }
  19. }