story-content: Added chapter move option.
the build was successful

This commit is contained in:
2018-10-27 14:57:25 +02:00
parent 1e022d6116
commit adf73a4623
7 changed files with 145 additions and 8 deletions
@@ -10,6 +10,10 @@ module.exports = class {
this.emit("edit", data)
}
moveChapter(data) {
this.emit("move", data)
}
removeChapter() {
this.state.removed = true
this.emit("remove")
@@ -1,5 +1,3 @@
import moment from "moment"
<div class="story-chapter">
<a class="anchor" id=input.chapter.id />
<div class="metadata">
@@ -7,6 +5,9 @@ import moment from "moment"
<if-permitted user=input.user author=input.chapter.author permission="chapter.edit">
<a on-click("open", "edit") >Edit</a>
</if-permitted>
<if-permitted user=input.user author=input.chapter.author permission="chapter.move">
<a on-click("open", "move") >Move</a>
</if-permitted>
<if-permitted user=input.user author=input.chapter.author permission="chapter.remove">
<a on-click("open", "remove") >Remove</a>
</if-permitted>
@@ -19,5 +20,6 @@ import moment from "moment"
<markdown class="chapter-content color-text" source=input.chapter.source />
<edit-chapter-modal enabled=(state.modal === "edit") chapter=input.chapter on-close("close") on-edit("updateChapter") />
<move-chapter-modal enabled=(state.modal === "move") chapter=input.chapter user=input.user on-close("close") on-move("moveChapter") />
<remove-chapter-modal enabled=(state.modal === "remove") chapter=input.chapter on-close("close") on-remove("removeChapter") />
</div>