move post context

This commit is contained in:
SrGooglo 2023-03-07 02:09:36 +00:00
parent 03aae43006
commit 4e2a1ccc74

View File

@ -19,6 +19,16 @@ export default {
}) })
} }
items.push({
label: "Paste",
icon: "Clipboard",
action: (clickedItem, ctx) => {
app.message.error("This action is not supported by your browser")
ctx.close()
}
})
items.push({ items.push({
label: "Report a bug", label: "Report a bug",
icon: "AlertTriangle", icon: "AlertTriangle",
@ -104,33 +114,6 @@ export default {
}) })
} }
// check if parent has `self-post` attribute
const isSelf = parent.getAttribute("self-post").toBoolean()
if (isSelf) {
items.push({
type: "separator"
})
items.push({
label: "Delete",
icon: "Trash",
action: () => {
app.eventBus.emit(`post.${parent.id}.delete`)
control.close()
}
})
items.push({
label: "Edit",
icon: "Edit2",
action: () => {
app.eventBus.emit(`post.${parent.id}.edit`)
control.close()
}
})
}
return items return items
} }
} }