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
1.4 KiB

  1. import moment from "moment"
  2. <modal class="modal color-text nolabel" key="modal" enabled=(input.enabled) closable on-close("close") on-open("open") >
  3. <h1>Add Log</h1>
  4. <p key="error" class="color-error">${state.error}</p>
  5. <label>Title</label>
  6. <input key="title" autofocus placeholder="(Optional)" class="big" on-change("change", "title") value=state.values.title />
  7. <label>Date</label>
  8. <input key="date" placeholder="(Required)" on-change("change", "date") value=state.values.date />
  9. <label>Channel</label>
  10. <input key="channel" placeholder="(Required)" on-change("change", "channel") value=state.values.channel />
  11. <label>Event Name</label>
  12. <input key="event" placeholder="(Optional)" on-change("change", "event") value=state.values.event />
  13. <label>Description</label>
  14. <textarea key="description" placeholder="(Optional)" on-change("change", "description") value=state.values.description />
  15. <label>Options</label>
  16. <toggle value=state.values.open on="Open" off="Closed"
  17. onDesc=("IRC posts in "+state.values.channel.name+" will end up here.")
  18. offDesc="The logbot will not append to this log."
  19. on-change("change", "open") />
  20. <p if(state.values.open) key="warning" class="color-danger">Opening a log will close all others for the same channels.</p>
  21. <button disabled=state.loading on-click("save")>Save</button>
  22. </modal>