mirror of
https://github.com/flarum/core.git
synced 2025-07-24 10:11:43 +02:00
Only show restore button for comment posts
This commit is contained in:
@@ -40,7 +40,7 @@ export default {
|
|||||||
* @return {ItemList}
|
* @return {ItemList}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
userControls() {
|
userControls(post, context) {
|
||||||
return new ItemList();
|
return new ItemList();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ export default {
|
|||||||
* @return {ItemList}
|
* @return {ItemList}
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
moderationControls(post) {
|
moderationControls(post, context) {
|
||||||
const items = new ItemList();
|
const items = new ItemList();
|
||||||
|
|
||||||
if (post.contentType() === 'comment' && post.canEdit()) {
|
if (post.contentType() === 'comment' && post.canEdit()) {
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (post.canEdit()) {
|
if (post.contentType() === 'comment' && post.canEdit()) {
|
||||||
items.add('restore', Button.component({
|
items.add('restore', Button.component({
|
||||||
icon: 'reply',
|
icon: 'reply',
|
||||||
children: app.trans('core.forum.post_controls_restore_button'),
|
children: app.trans('core.forum.post_controls_restore_button'),
|
||||||
|
Reference in New Issue
Block a user