1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +00:00

Style bug repair (#2394)

* optimized css code

* repair search module

* repair response bug

* repair notificition bug

* repair file-history bug

* repair search info bug

* optimized code
This commit is contained in:
shanshuirenjia
2018-09-25 09:13:06 +08:00
committed by Daniel Pan
parent 490a15deed
commit 5ce1b15fb2
17 changed files with 85 additions and 153 deletions

View File

@@ -45,7 +45,7 @@ class Notification extends React.Component {
<div id="notice-popover" className={`sf-popover ${this.state.showNotice ? '': 'hide'}`}>
<div className="outer-caret up-outer-caret"><div className="inner-caret"></div></div>
<div className="sf-popover-hd ovhd">
<h3 className="sf-popover-title">{gettext('Notifications')}</h3>
<h3 className="sf-popover-title title">{gettext('Notifications')}</h3>
<a href="#" onClick={this.onClick} title={gettext('Close')} aria-label={gettext('Close')} className="sf-popover-close js-close sf2-icon-x1 op-icon float-right"></a>
</div>
<div className="sf-popover-con">

View File

@@ -2,14 +2,7 @@ import React, { Component } from 'react';
import CommonToolbar from './toolbar/common-toolbar';
class MainPanel extends Component {
constructor(props) {
super(props);
}
onMenuClick = () => {
this.props.isOpen();
}
onSearchedClick = () => {
//todos;
}
@@ -20,9 +13,9 @@ class MainPanel extends Component {
<div className="main-panel o-hidden">
<div className="main-panel-north">
<div className="cur-view-toolbar">
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu" onClick={this.onMenuClick}></span>
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu" onClick={this.props.onShowSidePanel}></span>
</div>
<CommonToolbar onSearchedClick={this.onSearchedClick}/>
<CommonToolbar onSearchedClick={this.onSearchedClick} searchPlaceholder={'Search Files'}/>
</div>
<div className="main-panel-center">
{this.props.children}

View File

@@ -205,7 +205,7 @@ class Search extends Component {
onChange={this.onChangeHandler}
autoComplete="off"
/>
<i className={`search-icon-right input-icon-addon fas fa-times ${this.state.isCloseShow ? "" : "hide"}`} onClick={this.onCloseHandler}></i>
{this.state.isCloseShow && <i className='search-icon-right input-icon-addon fas fa-times' onClick={this.onCloseHandler}></i>}
</div>
<div className="search-result-container">
{this.renderSearchResult()}

View File

@@ -6,15 +6,11 @@ import SideNavFooter from './side-nav-footer';
class SidePanel extends React.Component {
onCloseSidePanel = () => {
//todos;
}
render() {
return (
<div className="side-panel">
<div className={`side-panel ${this.props.isSidePanelClosed ? '' : 'left-zero'}`}>
<div className="side-panel-north">
<Logo onCloseSidePanel={this.onCloseSidePanel}/>
<Logo onCloseSidePanel={this.props.onCloseSidePanel}/>
</div>
<div className="side-panel-center">
<MainSideNav currentTab={this.props.currentTab}/>

View File

@@ -6,14 +6,15 @@ import Notification from '../common/notification';
import Account from '../common/account';
const propTypes = {
onSearchedClick: PropTypes.func.isRequired
onSearchedClick: PropTypes.func.isRequired,
searchPlaceholder: PropTypes.string
};
class CommonToolbar extends React.Component {
render() {
return (
<div className="common-toolbar">
{isPro && <Search onSearchedClick={this.props.onSearchedClick} placeholder={gettext("Search files")}/>}
{isPro && <Search onSearchedClick={this.props.onSearchedClick} placeholder={gettext(this.props.searchPlaceholder)}/>}
<Notification />
<Account />
</div>