2018-09-30 04:19:30 +00:00
|
|
|
import React from 'react';
|
2019-02-11 08:18:35 +00:00
|
|
|
import { gettext, siteRoot } from '../utils/constants';
|
|
|
|
import ModalPortal from './modal-portal';
|
|
|
|
import AboutDialog from './dialog/about-dialog';
|
2018-09-30 04:19:30 +00:00
|
|
|
|
2019-02-11 08:18:35 +00:00
|
|
|
class SideNavFooter extends React.Component {
|
2018-10-16 10:19:51 +00:00
|
|
|
|
2018-09-30 04:19:30 +00:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
2019-02-11 08:18:35 +00:00
|
|
|
isAboutDialogShow: false,
|
2018-09-30 04:19:30 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-02-11 08:18:35 +00:00
|
|
|
onAboutDialogToggle = () => {
|
|
|
|
this.setState({isAboutDialogShow: !this.state.isAboutDialogShow});
|
2018-09-30 04:19:30 +00:00
|
|
|
}
|
2018-10-16 10:19:51 +00:00
|
|
|
|
2018-09-30 04:19:30 +00:00
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div className="side-nav-footer">
|
2018-10-16 10:19:51 +00:00
|
|
|
<a href={siteRoot + 'help/'} target="_blank" rel="noopener noreferrer" className="item">{gettext('Help')}</a>
|
2019-04-22 03:11:08 +00:00
|
|
|
<a className="item cursor-pointer" onClick={this.onAboutDialogToggle}>{gettext('About')}</a>
|
2018-09-30 04:19:30 +00:00
|
|
|
<a href={siteRoot + 'download_client_program/'} className="item last-item">
|
|
|
|
<span aria-hidden="true" className="sf2-icon-monitor vam"></span>{' '}
|
|
|
|
<span className="vam">{gettext('Clients')}</span>
|
|
|
|
</a>
|
2019-02-11 08:18:35 +00:00
|
|
|
{this.state.isAboutDialogShow &&
|
|
|
|
<ModalPortal>
|
|
|
|
<AboutDialog onCloseAboutDialog={this.onAboutDialogToggle} />
|
|
|
|
</ModalPortal>
|
|
|
|
}
|
2018-09-30 04:19:30 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SideNavFooter;
|