投稿の削除イベントを受け取るように

This commit is contained in:
syuilo
2018-10-07 20:08:42 +09:00
parent 1c65cb3e36
commit b6a330928d
4 changed files with 19 additions and 4 deletions

View File

@ -97,6 +97,17 @@ export default prop => ({
this.$_ns_target.poll.choices.find(c => c.id === choice).votes++;
break;
}
case 'deleted': {
Vue.set(this.$_ns_target, 'deletedAt', body.deletedAt);
this.$_ns_target.text = null;
this.$_ns_target.tags = [];
this.$_ns_target.fileIds = [];
this.$_ns_target.poll = null;
this.$_ns_target.geo = null;
this.$_ns_target.cw = null;
break;
}
}
this.$emit(`update:${prop}`, this.$_ns_note_);

View File

@ -38,7 +38,7 @@
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
</div>
</div>
<footer>
<footer v-if="p.deletedAt == null">
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
<button class="replyButton" @click="reply()" title="%i18n:@reply%">
<template v-if="p.reply">%fa:reply-all%</template>

View File

@ -39,7 +39,7 @@
</div>
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
</div>
<footer>
<footer v-if="p.deletedAt == null">
<mk-reactions-viewer :note="p" ref="reactionsViewer"/>
<button @click="reply">
<template v-if="p.reply">%fa:reply-all%</template>