story: Added add story modal, reorganized story page to allow modals and live updates.

This commit is contained in:
2018-09-23 15:57:53 +02:00
parent a2d949edaf
commit ae31accd81
13 changed files with 201 additions and 8 deletions
@@ -3,6 +3,7 @@
<p key="error" class="color-error">${state.error}</p>
<h2>Meta</h2>
<label>Title</label>
<input key="name" placeholder="Name" class="big" on-change("change", "name") value=state.values.name />
@@ -14,7 +15,7 @@
<option for(category in input.categories) value=category.name selected=(state.values.category === category.name)>${category.name}</option>
</select>
<label>Options</label>
<h2>Options</h2>
<toggle value=state.values.listed on="Listed" off="Unlisted"
onDesc="The story will be visible on the front page."
offDesc="A direct link is required to view this story."
@@ -24,5 +25,6 @@
offDesc="Only you can add chapters to this story."
on-change("change", "open") />
<h2></h2>
<button disabled=state.loading on-click("save")>Save</button>
</modal>