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.5 KiB

  1. <modal class="modal color-text nolabel" key="modal" enabled=(input.enabled) closable on-close("close") on-open("open") >
  2. <h1>Add Character</h1>
  3. <p class="color-error">${state.error}</p>
  4. <label>Full Name</label>
  5. <input key="name" autofocus placeholder="" class="big" on-change("change", "name") value=state.values.name />
  6. <label>IRC Nick</label>
  7. <input key="nick" placeholder="" on-change("change", "nick") value=state.values.nick />
  8. <label>Short Name</label>
  9. <input key="shortName" placeholder="(Optional)" on-change("change", "shortName") value=state.values.shortName />
  10. <if-permitted user=input.user permission="character.add">
  11. <label>Author</label>
  12. <input key="author" placeholder=(input.user.name) on-change("change", "author") value=state.values.author />
  13. </if-permitted>
  14. <label>Description</label>
  15. <textarea key="description" placeholder="Description" on-change("change", "description") value=state.values.description />
  16. <button disabled=state.loading on-click("save")>Save</button>
  17. <h2>Unknown Nicks</h2>
  18. <p>After you're done adding the one you're here for, why not take a look at the unknown nicks discovered in the last log character updates?</p>
  19. <p>Clicking one will change the nick in the form above, and add a guess for what the full name is.</p>
  20. <if-permitted not user=input.user permission="character.add">
  21. <p class="color-danger">You don't have permission to set a different author on characters, so only add your own.</p>
  22. </if-permitted>
  23. <unknown-nick-list on-select("selectUnknown") />
  24. </modal>