1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 23:29:49 +00:00

['settings' page] fixup for the display of the logo (#6323)

This commit is contained in:
llj
2024-07-10 11:24:43 +08:00
committed by GitHub
parent a378b243e6
commit a0ad4ee4e7
2 changed files with 13 additions and 4 deletions

View File

@@ -1,11 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import { siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle } from '../utils/constants';
import { Utils } from '../utils/utils';
const propTypes = {
onCloseSidePanel: PropTypes.func,
showCloseSidePanelIcon: PropTypes.bool,
positioned: PropTypes.bool
positioned: PropTypes.bool,
showLogoOnlyInMobile: PropTypes.bool
};
class Logo extends React.Component {
@@ -15,7 +17,12 @@ class Logo extends React.Component {
};
render() {
const { positioned } = this.props;
const { positioned, showLogoOnlyInMobile } = this.props;
if (showLogoOnlyInMobile && Utils.isDesktop()) {
return null;
}
return (
<div className={`top-logo ${positioned ? 'd-none d-md-block positioned-top-logo' : ''}`}>
<a href={siteRoot} id="logo">