story-content: Fixed update weirdness, moved edit/remove modals up

This commit is contained in:
2018-09-22 11:48:04 +02:00
parent c40ac40ab5
commit a560752eb8
7 changed files with 12 additions and 12 deletions
@@ -16,6 +16,7 @@ module.exports = class {
addChapter(chapter) {
this.state.story.chapters.push(chapter)
this.refreshStory()
}
updateChapter(id, data) {
@@ -31,6 +32,8 @@ module.exports = class {
this.state.story.chapters[index][key] = data[key]
}
this.refreshStory()
}
removeChapter(id) {
@@ -40,6 +43,8 @@ module.exports = class {
}
this.state.story.chapters.splice(index, 1)
this.refreshStory()
}
menuSelect(kind, id) {
@@ -51,4 +56,8 @@ module.exports = class {
break
}
}
refreshStory() {
this.state.story = Object.assign({}, this.state.story)
}
}