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.

31 lines
560 B

  1. const { changesApi } = require("../../../../../rpdata/api/Change")
  2. module.exports = class {
  3. onCreate(input) {
  4. this.state = {
  5. changes: input.changes,
  6. shownAll: false,
  7. modal: null,
  8. }
  9. }
  10. clearLimit(e) {
  11. // Disable mobile URL fallback.
  12. if (e && e.preventDefault) {
  13. e.preventDefault()
  14. }
  15. changesApi.list({limit: 0}).then(changes => {
  16. this.state.changes = changes
  17. this.state.shownAll = true
  18. })
  19. }
  20. open(modal) {
  21. this.state.modal = modal
  22. }
  23. close() {
  24. this.state.modal = null
  25. }
  26. }