mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
move post context
This commit is contained in:
parent
03aae43006
commit
4e2a1ccc74
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user