diff --git a/frontend/src/components/dialog/about-dialog.js b/frontend/src/components/dialog/about-dialog.js new file mode 100644 index 0000000000..cb16603ffb --- /dev/null +++ b/frontend/src/components/dialog/about-dialog.js @@ -0,0 +1,36 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { Modal, ModalBody } from 'reactstrap'; +import { gettext, lang, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion } from '../../utils/constants'; + +const propTypes = { + onCloseAboutDialog: PropTypes.func.isRequired, +}; + +class AboutDialog extends React.Component { + + toggle = () => { + this.props.onCloseAboutDialog(); + } + + render() { + let href = lang === lang == 'zh-cn' ? 'http://seafile.com/about/' : 'http://seafile.com/en/about/'; + + return ( + + + +
+

logo

+

{gettext('Server Version: ')}{seafileVersion}
© 2019 {gettext('Seafile')}

+

{gettext('About Us')}

+
+
+
+ ); + } +} + +AboutDialog.propTypes = propTypes; + +export default AboutDialog; diff --git a/frontend/src/components/side-nav-footer.js b/frontend/src/components/side-nav-footer.js index c2d2216971..9eca6cc689 100644 --- a/frontend/src/components/side-nav-footer.js +++ b/frontend/src/components/side-nav-footer.js @@ -1,67 +1,35 @@ import React from 'react'; -import PropTypes from 'prop-types'; -import { Modal, ModalBody } from 'reactstrap'; -import { gettext, lang, siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion } from '../utils/constants'; +import { gettext, siteRoot } from '../utils/constants'; +import ModalPortal from './modal-portal'; +import AboutDialog from './dialog/about-dialog'; -const propTypes = { - className: PropTypes.string, -}; +class SideNavFooter extends React.Component { -class About extends React.Component { constructor(props) { super(props); this.state = { - modal: false + isAboutDialogShow: false, }; } - toggle = () => { - this.setState({ - modal: !this.state.modal - }); + onAboutDialogToggle = () => { + this.setState({isAboutDialogShow: !this.state.isAboutDialogShow}); } - aboutUrl = () => { - let url; - if (lang == 'zh-cn') { - url = 'http://seafile.com/about/'; - return url; - } - url = 'http://seafile.com/en/about/'; - return url; - } - - render() { - return ( -
- {gettext('About')} - - - -
-

logo

-

{gettext('Server Version: ')}{seafileVersion}
© 2019 {gettext('Seafile')}

-

{gettext('About Us')}

-
-
-
-
- ); - } -} - -About.propTypes = propTypes; - -class SideNavFooter extends React.Component { render() { return (
{gettext('Help')} - + {gettext('About')} {' '} {gettext('Clients')} + {this.state.isAboutDialogShow && + + + + }
); } diff --git a/media/css/seahub_react.css b/media/css/seahub_react.css index 895a3af6cf..49c7ed3baa 100644 --- a/media/css/seahub_react.css +++ b/media/css/seahub_react.css @@ -533,9 +533,13 @@ ul,ol,li { } .side-nav-footer .item { - color:#666; + color: #666 !important; font-weight: normal; - margin-right:10px; + margin-right: 10px; +} + +.side-nav-footer .item:hover { + text-decoration: underline !important; } .side-nav-footer .last-item {