1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

12.0 support drag side nav (#6340)

* 01 optimize resize bar

* 02 app side panel support resize

* 03 side panel is folded do not support resize

* 04 optimise code

* 05 use localStorage
This commit is contained in:
Michael An
2024-07-12 15:52:10 +08:00
committed by GitHub
parent 7818cdb2ab
commit d137f85420
7 changed files with 182 additions and 120 deletions

View File

@@ -12,6 +12,7 @@ const propTypes = {
onCloseSidePanel: PropTypes.func,
tabItemClick: PropTypes.func,
children: PropTypes.object,
style: PropTypes.object,
isSidePanelFolded: PropTypes.bool,
toggleFoldSideNav: PropTypes.func
};
@@ -19,10 +20,12 @@ const propTypes = {
class SidePanel extends React.Component {
render() {
const { children, isSidePanelFolded } = this.props;
const style = isSidePanelFolded ? { flexBasis: SIDE_PANEL_FOLDED_WIDTH } : {};
const { children, isSidePanelFolded, style } = this.props;
return (
<div className={classnames('side-panel', { 'side-panel-folded': isSidePanelFolded, 'left-zero': !this.props.isSidePanelClosed })} style={style}>
<div
className={classnames('side-panel', {'side-panel-folded': isSidePanelFolded, 'left-zero': !this.props.isSidePanelClosed})}
style={isSidePanelFolded ? { flexBasis: SIDE_PANEL_FOLDED_WIDTH } : style}
>
<MediaQuery query="(max-width: 767.8px)">
<div className='side-panel-north'>
<Logo onCloseSidePanel={this.props.onCloseSidePanel} />