mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-13 22:01:06 +00:00
Improve hu requirement (#4502)
* optimize code * optimize code * optimize code
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
import React from 'react';
|
||||
import { siteRoot, gettext } from '../../utils/constants'
|
||||
import { siteRoot, gettext } from '../../utils/constants';
|
||||
|
||||
export default function Logout() {
|
||||
const style = {
|
||||
width: '32px',
|
||||
height: '32px',
|
||||
marginLeft: '8px',
|
||||
color: '#bbb',
|
||||
textDecoration: 'none'
|
||||
};
|
||||
const classname = "d-flex align-items-center justify-content-center"
|
||||
return (
|
||||
<a className={classname} style={style} href={`${siteRoot}accounts/logout/`} title={gettext('Logout')}>
|
||||
<a className="logout-icon" href={`${siteRoot}accounts/logout/`} title={gettext('Log out')}>
|
||||
<i className="sf3-font sf3-font-logout" style={{fontSize: '24px'}}></i>
|
||||
</a>
|
||||
)
|
||||
);
|
||||
}
|
@@ -17,7 +17,7 @@ class AboutDialog extends React.Component {
|
||||
if (extraAboutDialogLinks && (typeof extraAboutDialogLinks) === 'object') {
|
||||
let keys = Object.keys(extraAboutDialogLinks);
|
||||
return keys.map((key, index) => {
|
||||
return <a key={index} className="d-block" href={extraAboutDialogLinks[key]} aria-hidden="true">{key}</a>;
|
||||
return <a key={index} className="d-block" href={extraAboutDialogLinks[key]}>{key}</a>;
|
||||
});
|
||||
}
|
||||
return null;
|
||||
|
@@ -20,7 +20,7 @@ class SideNavFooter extends React.Component {
|
||||
if (extraAppBottomLinks && (typeof extraAppBottomLinks) === 'object') {
|
||||
let keys = Object.keys(extraAppBottomLinks);
|
||||
return keys.map((key, index) => {
|
||||
return <a key={index} className="item" href={extraAppBottomLinks[key]} aria-hidden="true">{key}</a>;
|
||||
return <a key={index} className="item" href={extraAppBottomLinks[key]}>{key}</a>;
|
||||
});
|
||||
}
|
||||
return null;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { isPro, gettext, showExtraLogoutIcon } from '../../utils/constants';
|
||||
import { isPro, gettext, showLogoutIcon } from '../../utils/constants';
|
||||
import Search from '../search/search';
|
||||
import Notification from '../common/notification';
|
||||
import Account from '../common/account';
|
||||
@@ -26,7 +26,7 @@ class CommonToolbar extends React.Component {
|
||||
)}
|
||||
<Notification />
|
||||
<Account />
|
||||
{showExtraLogoutIcon && (<Logout />)}
|
||||
{showLogoutIcon && (<Logout />)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user