Adding show shortcuts button and minor fixes

This commit is contained in:
Dan Zajdband
2016-12-16 12:03:37 -05:00
parent d6936cdf25
commit 8631c3bd9b
6 changed files with 32 additions and 8 deletions
@@ -1,5 +1,6 @@
import React from 'react';
import {connect} from 'react-redux';
import {Icon} from 'react-mdl';
import key from 'keymaster';
import ModerationKeysModal from 'components/ModerationKeysModal';
@@ -70,6 +71,10 @@ class ModerationQueue extends React.Component {
this.props.dispatch(banUser('banned', userId, commentId));
}
showShortcuts () {
this.setState({ modalOpen: true });
}
onTabClick (activeTab) {
this.setState({activeTab});
}
@@ -93,6 +98,11 @@ class ModerationQueue extends React.Component {
className={`mdl-tabs__tab ${styles.tab}`}>{lang.t('modqueue.rejected')}</a>
<a href='#flagged' onClick={() => this.onTabClick('flagged')}
className={`mdl-tabs__tab ${styles.tab}`}>{lang.t('modqueue.flagged')}</a>
<a href='#' onClick={() => this.showShortcuts()}
className={`mdl-tabs__tab ${styles.tab} ${styles.showShortcuts}`}>
<Icon name='keyboard' />
<span>{lang.t('modqueue.showshortcuts')}</span>
</a>
</div>
<div className={`mdl-tabs__panel is-active ${styles.listContainer}`} id='pending'>
<CommentList