Merge remote-tracking branch 'upstream/develop' into feature/frontend_refactor

This commit is contained in:
Alex Gleason
2020-03-10 16:24:43 -05:00
19 changed files with 123 additions and 218 deletions

View File

@@ -5,7 +5,7 @@ import { me } from '../../initial_state';
const links = [
<NavLink key='pr1' className='footer-bar__link' to='/home' data-preview-title-id='column.home'>
<i className='tabs-bar__link__icon home'/>
<i className='tabs-bar__link__icon home' />
<FormattedMessage id='tabs_bar.home' defaultMessage='Home' />
</NavLink>,
<NavLink key='pr2' className='footer-bar__link' to='/notifications' data-preview-title-id='column.notifications'>
@@ -13,14 +13,18 @@ const links = [
<NotificationCounter />
<FormattedMessage id='tabs_bar.notifications' defaultMessage='Notifications' />
</NavLink>,
<NavLink key='pr3' className='footer-bar__link' to='/groups' data-preview-title-id='column.groups'>
<i className='tabs-bar__link__icon groups'/>
<FormattedMessage id='tabs_bar.groups' defaultMessage='Groups' />
</NavLink>,
<a key='pl5' className='footer-bar__link footer-bar__link--chat' href='https://chat.gab.com' data-preview-title-id='tabs_bar.chat'>
<Icon id='comments' className='tabs-bar__link__icon chat' />
<FormattedMessage id='tabs_bar.chat' defaultMessage='Chat' />
</a>,
<a key='pl4' className='footer-bar__link footer-bar__link--trends' href='https://trends.gab.com' data-preview-title-id='tabs_bar.trends'>
<i className='tabs-bar__link__icon trends'/>
<i className='tabs-bar__link__icon trends' />
<FormattedMessage id='tabs_bar.trends' defaultMessage='Trends' />
</a>,
<NavLink key='pr3' className='footer-bar__link' to='/groups' data-preview-title-id='column.groups'>
<i className='tabs-bar__link__icon groups' />
<FormattedMessage id='tabs_bar.groups' defaultMessage='Groups' />
</NavLink>,
]
export default
@@ -32,7 +36,7 @@ class FooterBar extends PureComponent {
intl: PropTypes.object.isRequired,
}
render () {
render() {
const { intl: { formatMessage } } = this.props;
if (!me) return null;
@@ -53,4 +57,4 @@ class FooterBar extends PureComponent {
</div>
);
}
}
}

View File

@@ -82,6 +82,20 @@ class Header extends ImmutablePureComponent {
window.removeEventListener('resize', this.handleResize);
}
onChat = () => {
const { account } = this.props;
axios.post('https://chat.gab.com/private-message', {
username: account.get('username'),
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
handleResize = debounce(() => {
this.setState({ isSmallScreen: (window.innerWidth <= 895) });
}, 5, {
@@ -112,6 +126,8 @@ class Header extends ImmutablePureComponent {
menu.push({ text: intl.formatMessage(messages.blocks), to: '/blocks' });
menu.push({ text: intl.formatMessage(messages.domain_blocks), to: '/domain_blocks' });
} else {
menu.push({ text: intl.formatMessage(messages.mention, { name: account.get('acct') }), action: this.props.onMention });
if (account.getIn(['relationship', 'following'])) {
if (account.getIn(['relationship', 'showing_reblogs'])) {
menu.push({ text: intl.formatMessage(messages.hideReposts, { name: account.get('username') }), action: this.props.onRepostToggle });

View File

@@ -167,4 +167,4 @@ noscript {
100% {
opacity: 1;
}
}
}