fix wrong label on voting buttons

This commit is contained in:
Vyrtsev Mikhail
2019-01-17 04:07:13 +03:00
parent 79a8bfe453
commit e42110a3ba
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -360,6 +360,7 @@ export default class Comment extends Component {
* @return {(string|null)}
*/
getVoteDisabledReason() {
if (this.props.mods && this.props.mods.view === 'user') return 'Voting disabled in last comments';
if (this.isGuest()) return 'Only authorized users are allowed to vote';
const info = store.get('info');
if (info && info.read_only) return "You can't vote on read-only topics";
+2 -1
View File
@@ -49,7 +49,8 @@ function init() {
isDefaultPicture: params.isDefaultPicture != 0,
picture: params.picture,
};
store.set('user', user);
store.set('user', {});
store.set('target-user', user);
const onClose = () => {
if (window.parent) {
window.parent.postMessage(JSON.stringify({ isUserInfoShown: false }), '*');