mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-03 02:06:45 +00:00
Repair router compatibility (#2562)
This commit is contained in:
parent
8dfaa726e8
commit
f95a093d66
@ -79,6 +79,10 @@ class App extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSearchedClick = () => {
|
||||||
|
//todos
|
||||||
|
}
|
||||||
|
|
||||||
tabItemClick = (param) => {
|
tabItemClick = (param) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
currentTab: param
|
currentTab: param
|
||||||
@ -92,24 +96,31 @@ class App extends Component {
|
|||||||
<div id="main">
|
<div id="main">
|
||||||
<SidePanel isSidePanelClosed={this.state.isSidePanelClosed} onCloseSidePanel={this.onCloseSidePanel} currentTab={currentTab} tabItemClick={this.tabItemClick} draftCounts={this.state.draftCounts} />
|
<SidePanel isSidePanelClosed={this.state.isSidePanelClosed} onCloseSidePanel={this.onCloseSidePanel} currentTab={currentTab} tabItemClick={this.tabItemClick} draftCounts={this.state.draftCounts} />
|
||||||
|
|
||||||
<MainPanel onShowSidePanel={this.onShowSidePanel}>
|
<MainPanel>
|
||||||
<Router>
|
<Router>
|
||||||
<FilesActivities path={siteRoot + 'dashboard'} />
|
<FilesActivities path={siteRoot + 'dashboard'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick}/>
|
||||||
<DraftsView path={siteRoot + 'drafts'} tabItemClick={this.tabItemClick} currentTab={currentTab}>
|
<DraftsView path={siteRoot + 'drafts'}
|
||||||
<DraftContent path='/' getDrafts={this.getDrafts}
|
currentTab={currentTab}
|
||||||
|
tabItemClick={this.tabItemClick}
|
||||||
|
onShowSidePanel={this.onShowSidePanel}
|
||||||
|
onSearchedClick={this.onSearchedClick}
|
||||||
|
>
|
||||||
|
<DraftContent
|
||||||
|
path='/'
|
||||||
|
getDrafts={this.getDrafts}
|
||||||
isLoadingDraft={this.state.isLoadingDraft}
|
isLoadingDraft={this.state.isLoadingDraft}
|
||||||
draftList={this.state.draftList}
|
draftList={this.state.draftList}
|
||||||
updateDraftsList={this.updateDraftsList}
|
updateDraftsList={this.updateDraftsList}
|
||||||
/>
|
/>
|
||||||
<ReviewContent path='reviews' />
|
<ReviewContent path='reviews' />
|
||||||
</DraftsView>
|
</DraftsView>
|
||||||
<Starred path={siteRoot + 'starred'} />
|
<Starred path={siteRoot + 'starred'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
<LinkedDevices path={siteRoot + 'linked-devices'} />
|
<LinkedDevices path={siteRoot + 'linked-devices'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
<ShareAdminLibraries path={siteRoot + 'share-admin-libs'} />
|
<ShareAdminLibraries path={siteRoot + 'share-admin-libs'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
<ShareAdminFolders path={siteRoot + 'share-admin-folders'} />
|
<ShareAdminFolders path={siteRoot + 'share-admin-folders'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
<ShareAdminShareLinks path={siteRoot + 'share-admin-share-links'} />
|
<ShareAdminShareLinks path={siteRoot + 'share-admin-share-links'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
<ShareAdminUploadLinks path={siteRoot + 'share-admin-upload-links'} />
|
<ShareAdminUploadLinks path={siteRoot + 'share-admin-upload-links'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
<SharedLibraries path={siteRoot + 'shared-libs'} />
|
<SharedLibraries path={siteRoot + 'shared-libs'} onShowSidePanel={this.onShowSidePanel} onSearchedClick={this.onSearchedClick} />
|
||||||
</Router>
|
</Router>
|
||||||
</MainPanel>
|
</MainPanel>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,30 +1,16 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import CommonToolbar from './toolbar/common-toolbar';
|
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
children: PropTypes.object.isRequired,
|
children: PropTypes.object.isRequired,
|
||||||
onShowSidePanel: PropTypes.func.isRequired,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MainPanel extends Component {
|
class MainPanel extends Component {
|
||||||
|
|
||||||
onSearchedClick = () => {
|
|
||||||
//todos;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="main-panel o-hidden">
|
<div className="main-panel o-hidden">
|
||||||
<div className="main-panel-north">
|
{this.props.children}
|
||||||
<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.props.onShowSidePanel}></span>
|
|
||||||
</div>
|
|
||||||
<CommonToolbar onSearchedClick={this.onSearchedClick} searchPlaceholder={'Search Files'}/>
|
|
||||||
</div>
|
|
||||||
<div className="main-panel-center">
|
|
||||||
{this.props.children}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
35
frontend/src/components/toolbar/general-toolbar.js
Normal file
35
frontend/src/components/toolbar/general-toolbar.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import React, { Fragment } from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import CommonToolbar from './common-toolbar';
|
||||||
|
|
||||||
|
const propTypes = {
|
||||||
|
onShowSidePanel: PropTypes.func.isRequired,
|
||||||
|
onSearchedClick: PropTypes.func.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
class GeneralToolbar extends React.Component {
|
||||||
|
|
||||||
|
render() {
|
||||||
|
let { onShowSidePanel, onSearchedClick } = this.props;
|
||||||
|
let placeHolder = this.props.searchPlaceholder || 'Search files in this library';
|
||||||
|
return (
|
||||||
|
<Fragment>
|
||||||
|
<div className="cur-view-toolbar">
|
||||||
|
<span
|
||||||
|
className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none"
|
||||||
|
title="Side Nav Menu"
|
||||||
|
onClick={onShowSidePanel}>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<CommonToolbar
|
||||||
|
searchPlaceholder={placeHolder}
|
||||||
|
onSearchedClick={onSearchedClick}
|
||||||
|
/>
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GeneralToolbar.propTypes = propTypes;
|
||||||
|
|
||||||
|
export default GeneralToolbar;
|
@ -120,6 +120,7 @@
|
|||||||
[role=group] {
|
[role=group] {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
@ -199,3 +200,7 @@
|
|||||||
background-color: #f5d2d2;
|
background-color: #f5d2d2;
|
||||||
border-color: #f1c1c0;
|
border-color: #f1c1c0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img[src=""],img:not([src]){ /* for first loading img*/
|
||||||
|
opacity:0;
|
||||||
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { gettext, siteRoot } from '../../utils/constants';
|
import { gettext, siteRoot } from '../../utils/constants';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
const contentPropTypes = {
|
const contentPropTypes = {
|
||||||
data: PropTypes.object.isRequired,
|
data: PropTypes.object.isRequired,
|
||||||
@ -244,14 +245,25 @@ class FilesActivities extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container" id="activities">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<h3 className="sf-heading">{gettext('Activities')}</h3>
|
<GeneralToolbar
|
||||||
|
searchPlaceholder={'Search Files'}
|
||||||
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content" onScroll={this.handleScroll}>
|
<div className="main-panel-center">
|
||||||
<FileActivitiesContent data={this.state} />
|
<div className="cur-view-container" id="activities">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<h3 className="sf-heading">{gettext('Activities')}</h3>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content" onScroll={this.handleScroll}>
|
||||||
|
<FileActivitiesContent data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { siteRoot, gettext } from '../../utils/constants';
|
import { siteRoot, gettext } from '../../utils/constants';
|
||||||
import { Link } from '@reach/router';
|
import { Link } from '@reach/router';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
currentTab: PropTypes.string.isRequired,
|
currentTab: PropTypes.string.isRequired,
|
||||||
@ -20,23 +21,30 @@ class DraftsView extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<ul className="tab-tabs-nav">
|
<GeneralToolbar
|
||||||
<li className={`tab ${this.props.currentTab === 'drafts' ? 'ui-state-active': ''}`} onClick={() => this.tabItemClick('drafts')}>
|
searchPlaceholder={'Search Files'}
|
||||||
<Link className='a' to={siteRoot + 'drafts/'} title={gettext('Drafts')}>
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
{gettext('Drafts')}
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
</Link>
|
/>
|
||||||
</li>
|
|
||||||
<li className={`tab ${this.props.currentTab === 'reviews' ? 'ui-state-active': ''}`} onClick={() => this.tabItemClick('reviews')}>
|
|
||||||
<Link className='a' to={siteRoot + 'drafts/reviews/'} title={gettext('reviews')}>
|
|
||||||
{gettext('Reviews')}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
{this.props.children}
|
<div className="main-panel-center">
|
||||||
</div>
|
<div className="cur-view-container">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<ul className="tab-tabs-nav">
|
||||||
|
<li className={`tab ${this.props.currentTab === 'drafts' ? 'ui-state-active': ''}`} onClick={() => this.tabItemClick('drafts')}>
|
||||||
|
<Link className='a' to={siteRoot + 'drafts/'} title={gettext('Drafts')}>{gettext('Drafts')}</Link>
|
||||||
|
</li>
|
||||||
|
<li className={`tab ${this.props.currentTab === 'reviews' ? 'ui-state-active': ''}`} onClick={() => this.tabItemClick('reviews')}>
|
||||||
|
<Link className='a' to={siteRoot + 'drafts/reviews/'} title={gettext('reviews')}>{gettext('Reviews')}</Link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{this.props.children}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
|
import React, { Component, Fragment } from 'react';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import React, { Component } from 'react';
|
|
||||||
import Toast from '../../components/toast';
|
|
||||||
|
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { gettext, loginUrl } from '../../utils/constants';
|
||||||
import { gettext, siteRoot, loginUrl } from '../../utils/constants';
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
import Toast from '../../components/toast';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
|
|
||||||
@ -196,14 +195,25 @@ class LinkedDevices extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container" id="linked-devices">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<h3 className="sf-heading">{gettext('Linked Devices')}</h3>
|
<GeneralToolbar
|
||||||
|
searchPlaceholder={'Search Files'}
|
||||||
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-center">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container" id="linked-devices">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<h3 className="sf-heading">{gettext('Linked Devices')}</h3>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants';
|
import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
|
|
||||||
@ -281,14 +282,25 @@ class ShareAdminFolders extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container" id="share-admin-libs">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<h3 className="sf-heading">{gettext("Folders")}</h3>
|
<GeneralToolbar
|
||||||
|
searchPlaceholder={'Search Files'}
|
||||||
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-center">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container" id="share-admin-libs">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<h3 className="sf-heading">{gettext("Folders")}</h3>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants';
|
import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
|
|
||||||
@ -288,14 +289,25 @@ class ShareAdminLibraries extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container" id="share-admin-libs">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<h3 className="sf-heading">{gettext("Libraries")}</h3>
|
<GeneralToolbar
|
||||||
|
searchPlaceholder={'Search Files'}
|
||||||
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-center">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container" id="share-admin-libs">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<h3 className="sf-heading">{gettext("Libraries")}</h3>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Link } from '@reach/router';
|
import { Link } from '@reach/router';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext, siteRoot, loginUrl, isPro, canGenerateUploadLink } from '../../utils/constants';
|
import { gettext, siteRoot, loginUrl, isPro, canGenerateUploadLink } from '../../utils/constants';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -237,21 +238,32 @@ class ShareAdminShareLinks extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<ul className="nav">
|
<GeneralToolbar
|
||||||
<li className="nav-item">
|
searchPlaceholder={'Search Files'}
|
||||||
<Link to={`${siteRoot}share-admin-share-links/`} className="nav-link active">{gettext('Share Links')}</Link>
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
</li>
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
{ canGenerateUploadLink ?
|
/>
|
||||||
<li className="nav-item"><Link to={`${siteRoot}share-admin-upload-links/`} className="nav-link">{gettext('Upload Links')}</Link></li>
|
|
||||||
: '' }
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-cneter">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<ul className="nav">
|
||||||
|
<li className="nav-item">
|
||||||
|
<Link to={`${siteRoot}share-admin-share-links/`} className="nav-link active">{gettext('Share Links')}</Link>
|
||||||
|
</li>
|
||||||
|
{ canGenerateUploadLink ?
|
||||||
|
<li className="nav-item"><Link to={`${siteRoot}share-admin-upload-links/`} className="nav-link">{gettext('Upload Links')}</Link></li>
|
||||||
|
: '' }
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { Link } from '@reach/router';
|
import { Link } from '@reach/router';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext, siteRoot, loginUrl, isPro, canGenerateShareLink } from '../../utils/constants';
|
import { gettext, siteRoot, loginUrl, isPro, canGenerateShareLink } from '../../utils/constants';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -226,19 +227,30 @@ class ShareAdminUploadLinks extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<ul className="nav">
|
<GeneralToolbar
|
||||||
{ canGenerateShareLink ?
|
searchPlaceholder={'Search Files'}
|
||||||
<li className="nav-item"><Link to={`${siteRoot}share-admin-share-links/`} className="nav-link">{gettext('Share Links')}</Link></li>
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
: '' }
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
<li className="nav-item"><Link to={`${siteRoot}share-admin-upload-links/`} className="nav-link active">{gettext('Upload Links')}</Link></li>
|
/>
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-center">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<ul className="nav">
|
||||||
|
{ canGenerateShareLink ?
|
||||||
|
<li className="nav-item"><Link to={`${siteRoot}share-admin-share-links/`} className="nav-link">{gettext('Share Links')}</Link></li>
|
||||||
|
: '' }
|
||||||
|
<li className="nav-item"><Link to={`${siteRoot}share-admin-upload-links/`} className="nav-link active">{gettext('Upload Links')}</Link></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants';
|
import { gettext, siteRoot, loginUrl, isPro } from '../../utils/constants';
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
|
|
||||||
@ -251,14 +252,25 @@ class SharedLibraries extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<h3 className="sf-heading">{gettext("Shared with me")}</h3>
|
<GeneralToolbar
|
||||||
|
searchPlaceholder={'Search Files'}
|
||||||
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-center">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<h3 className="sf-heading">{gettext("Shared with me")}</h3>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext, siteRoot, loginUrl } from '../../utils/constants';
|
import { gettext, siteRoot, loginUrl } from '../../utils/constants';
|
||||||
|
import GeneralToolbar from '../../components/toolbar/general-toolbar';
|
||||||
|
|
||||||
class Content extends Component {
|
class Content extends Component {
|
||||||
|
|
||||||
@ -262,14 +263,25 @@ class Starred extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="cur-view-container" id="starred">
|
<Fragment>
|
||||||
<div className="cur-view-path">
|
<div className="main-panel-north">
|
||||||
<h3 className="sf-heading">{gettext('Favorites')}</h3>
|
<GeneralToolbar
|
||||||
|
searchPlaceholder={'Search Files'}
|
||||||
|
onShowSidePanel={this.props.onShowSidePanel}
|
||||||
|
onSearchedClick={this.props.onSearchedClick}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="main-panel-center">
|
||||||
<Content data={this.state} />
|
<div className="cur-view-container" id="starred">
|
||||||
|
<div className="cur-view-path">
|
||||||
|
<h3 className="sf-heading">{gettext('Favorites')}</h3>
|
||||||
|
</div>
|
||||||
|
<div className="cur-view-content">
|
||||||
|
<Content data={this.state} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user