1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00
This commit is contained in:
Alexander Skvortsov
2020-09-10 17:55:06 -04:00
committed by Franz Liedke
parent 2673dd2ee3
commit 6e7c86ac50
2 changed files with 18 additions and 18 deletions

View File

@@ -167,7 +167,7 @@ export default class IndexPage extends Page {
onclick: () => { onclick: () => {
// If the user is not logged in, the promise rejects, and a login modal shows up. // If the user is not logged in, the promise rejects, and a login modal shows up.
// Since that's already handled, we dont need to show an error message in the console. // Since that's already handled, we dont need to show an error message in the console.
return this.newDiscussionAction().catch(() => { }); return this.newDiscussionAction().catch(() => {});
}, },
disabled: !canStartDiscussion, disabled: !canStartDiscussion,
}, },

View File

@@ -56,26 +56,26 @@ export default {
'reply', 'reply',
!app.session.user || discussion.canReply() !app.session.user || discussion.canReply()
? Button.component( ? Button.component(
{ {
icon: 'fas fa-reply', icon: 'fas fa-reply',
onclick: () => { onclick: () => {
// If the user is not logged in, the promise rejects, and a login modal shows up. // If the user is not logged in, the promise rejects, and a login modal shows up.
// Since that's already handled, we dont need to show an error message in the console. // Since that's already handled, we dont need to show an error message in the console.
return this.replyAction(discussion, true, false).catch(() => { }); return this.replyAction(discussion, true, false).catch(() => {});
},
}, },
}, app.translator.trans(
app.translator.trans( app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button'
app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button' )
) )
)
: Button.component( : Button.component(
{ {
icon: 'fas fa-reply', icon: 'fas fa-reply',
className: 'disabled', className: 'disabled',
title: app.translator.trans('core.forum.discussion_controls.cannot_reply_text'), title: app.translator.trans('core.forum.discussion_controls.cannot_reply_text'),
}, },
app.translator.trans('core.forum.discussion_controls.cannot_reply_button') app.translator.trans('core.forum.discussion_controls.cannot_reply_button')
) )
); );
} }