提交 1f093bcd 编写于 作者: F Fatih Acet

IssueNotesRefactor: Don’t show report as abuse link for own notes.

上级 7fcc1eef
......@@ -35,6 +35,9 @@ export default {
'disabled-content': this.isDeleting,
};
},
canReportAsAbuse() {
return this.note.report_abuse_path && this.author.id !== window.gon.current_user_id;
},
},
methods: {
editHandler() {
......@@ -116,6 +119,7 @@ export default {
:canAward="note.emoji_awardable"
:canEdit="note.current_user.can_edit"
:canDelete="note.current_user.can_edit"
:canReportAsAbuse="canReportAsAbuse"
:reportAbusePath="note.report_abuse_path"
:editHandler="editHandler"
:deleteHandler="deleteHandler" />
......
......@@ -22,6 +22,10 @@ export default {
type: Boolean,
required: true,
},
canReportAsAbuse: {
type: Boolean,
required: true,
},
editHandler: {
type: Function,
required: true,
......@@ -90,7 +94,7 @@ export default {
</li>
<li class="divider"></li>
</template>
<li v-if="reportAbusePath">
<li v-if="canReportAsAbuse">
<a :href="reportAbusePath">
Report as abuse
</a>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册