mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-17 22:47:59 +00:00
[system admin] mobile: added toggle for the side panel; fixup for 'wechat', 'dingTalk', 'abuse reports' pages (#5362)
This commit is contained in:
parent
ff9a0e92f9
commit
139e8fb334
@ -5,6 +5,7 @@ import { Utils } from '../../utils/utils';
|
|||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import toaster from '../../components/toast';
|
import toaster from '../../components/toast';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import MainPanelTopbar from './main-panel-topbar';
|
||||||
|
|
||||||
class AbuseReports extends Component {
|
class AbuseReports extends Component {
|
||||||
|
|
||||||
@ -76,23 +77,15 @@ class AbuseReports extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<div className="main-panel-north">
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-toolbar">
|
|
||||||
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu"></span>
|
|
||||||
</div>
|
|
||||||
<div className="common-toolbar">
|
|
||||||
<Account isAdminPanel={true}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="main-panel-center">
|
<div className="main-panel-center">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
<h3 className="sf-heading">{gettext('Abuse Reports')}</h3>
|
<h3 className="sf-heading">{gettext('Abuse Reports')}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
<table className={`table-hover${isDesktop ? '' : ' table-thead-hidden'}`}>
|
<table className={`table-hover`}>
|
||||||
<thead>
|
<thead>
|
||||||
{isDesktop ?
|
|
||||||
<tr>
|
<tr>
|
||||||
<th width="20%">{gettext('Library')}</th>
|
<th width="20%">{gettext('Library')}</th>
|
||||||
<th width="20%">{gettext('File')}</th>
|
<th width="20%">{gettext('File')}</th>
|
||||||
@ -102,12 +95,6 @@ class AbuseReports extends Component {
|
|||||||
<th width="10%">{gettext('Time')}</th>
|
<th width="10%">{gettext('Time')}</th>
|
||||||
<th width="5%">{gettext('Handled')}</th>
|
<th width="5%">{gettext('Handled')}</th>
|
||||||
</tr>
|
</tr>
|
||||||
:
|
|
||||||
<tr>
|
|
||||||
<th width="92%"></th>
|
|
||||||
<th width="8%"></th>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{AbuseReportList}
|
{AbuseReportList}
|
||||||
|
@ -146,7 +146,7 @@ class AdminLoginLogs extends Component {
|
|||||||
let { logList, currentPage, perPage, hasNextPage } = this.state;
|
let { logList, currentPage, perPage, hasNextPage } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<LogsNav currentItem="adminLoginLogs" />
|
<LogsNav currentItem="adminLoginLogs" />
|
||||||
|
@ -243,7 +243,7 @@ class AdminOperationLogs extends Component {
|
|||||||
let { logList, currentPage, perPage, hasNextPage } = this.state;
|
let { logList, currentPage, perPage, hasNextPage } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<LogsNav currentItem="adminOperationLogs" />
|
<LogsNav currentItem="adminOperationLogs" />
|
||||||
|
@ -280,7 +280,9 @@ class DepartmentDetail extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar children={topbarChildren} />
|
<MainPanelTopbar {...this.props}>
|
||||||
|
{topbarChildren}
|
||||||
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row h-100">
|
<div className="main-panel-center flex-row h-100">
|
||||||
<div className="cur-view-container o-auto">
|
<div className="cur-view-container o-auto">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -98,7 +98,9 @@ class DepartmentsList extends React.Component {
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar children={topbarChildren}/>
|
<MainPanelTopbar {...this.props}>
|
||||||
|
{topbarChildren}
|
||||||
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row h-100">
|
<div className="main-panel-center flex-row h-100">
|
||||||
<div className="cur-view-container o-auto">
|
<div className="cur-view-container o-auto">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -12,7 +12,7 @@ class DesktopDevices extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<DevicesNav currentItem="desktop" />
|
<DevicesNav currentItem="desktop" />
|
||||||
|
@ -174,11 +174,11 @@ class DeviceErrors extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.state.isCleanBtnShown ? (
|
{this.state.isCleanBtnShown ? (
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="operation-item" onClick={this.clean}>{gettext('Clean')}</Button>
|
<Button className="operation-item" onClick={this.clean}>{gettext('Clean')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
) : (
|
) : (
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
)}
|
)}
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
|
@ -12,7 +12,7 @@ class MobileDevices extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<DevicesNav currentItem="mobile" />
|
<DevicesNav currentItem="mobile" />
|
||||||
|
@ -4,8 +4,8 @@ import deepCopy from 'deep-copy';
|
|||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { gettext, siteRoot, isPro } from '../../utils/constants';
|
import { gettext, siteRoot, isPro } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
|
import MainPanelTopbar from './main-panel-topbar';
|
||||||
import toaster from '../../components/toast';
|
import toaster from '../../components/toast';
|
||||||
import Account from '../../components/common/account';
|
|
||||||
import { DingtalkDepartmentMembersList, DingtalkDepartmentsTreePanel } from './dingtalk';
|
import { DingtalkDepartmentMembersList, DingtalkDepartmentsTreePanel } from './dingtalk';
|
||||||
import ImportDingtalkDepartmentDialog from '../../components/dialog/import-dingtalk-department-dialog';
|
import ImportDingtalkDepartmentDialog from '../../components/dialog/import-dingtalk-department-dialog';
|
||||||
|
|
||||||
@ -289,28 +289,14 @@ class DingtalkDepartments extends Component {
|
|||||||
this.getDingtalkDepartmentsList(null);
|
this.getDingtalkDepartmentsList(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderNav() {
|
|
||||||
const btnClass = 'btn btn-secondary operation-item ';
|
|
||||||
return (
|
|
||||||
<div className="main-panel-north border-left-show">
|
|
||||||
<div className="cur-view-toolbar">
|
|
||||||
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu"></span>
|
|
||||||
<Button className={btnClass + 'my-1 d-md-none'} onClick={this.onSubmit}>{'导入用户'}</Button>
|
|
||||||
<Button className={btnClass + 'hidden-md-up'} onClick={this.onSubmit}>{'导入用户'}</Button>
|
|
||||||
</div>
|
|
||||||
<div className="common-toolbar">
|
|
||||||
<Account isAdminPanel={true}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isImportDepartmentDialogShow, isTreeLoading, importDepartment, importDepartmentChildrenCount, importDepartmentMembersCount } = this.state;
|
const { isImportDepartmentDialogShow, isTreeLoading, importDepartment, importDepartmentChildrenCount, importDepartmentMembersCount } = this.state;
|
||||||
let canImportDepartment = !!(isPro && isImportDepartmentDialogShow && !isTreeLoading && importDepartment);
|
let canImportDepartment = !!(isPro && isImportDepartmentDialogShow && !isTreeLoading && importDepartment);
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.renderNav()}
|
<MainPanelTopbar {...this.props}>
|
||||||
|
<Button className="operation-item" onClick={this.onSubmit}>{'导入用户'}</Button>
|
||||||
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center">
|
<div className="main-panel-center">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import Account from '../../components/common/account';
|
import MainPanelTopbar from './main-panel-topbar';
|
||||||
|
|
||||||
|
|
||||||
const tablePropTypes = {
|
const tablePropTypes = {
|
||||||
@ -104,14 +104,7 @@ class FileScanRecords extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="main-panel-north">
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-toolbar">
|
|
||||||
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu"></span>
|
|
||||||
</div>
|
|
||||||
<div className="common-toolbar">
|
|
||||||
<Account isAdminPanel={true} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className="main-panel-center">
|
<div className="main-panel-center">
|
||||||
<div className="cur-view-container" id="content-scan-records">
|
<div className="cur-view-container" id="content-scan-records">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -277,7 +277,7 @@ class GroupMembers extends Component {
|
|||||||
let { isAddMemberDialogOpen } = this.state;
|
let { isAddMemberDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddMemgerDialog}>{gettext('Add Member')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddMemgerDialog}>{gettext('Add Member')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -189,7 +189,7 @@ class GroupRepos extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<GroupNav
|
<GroupNav
|
||||||
|
@ -125,7 +125,7 @@ class Groups extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar search={this.getSearch()}>
|
<MainPanelTopbar search={this.getSearch()} {...this.props}>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Button className="operation-item" onClick={this.toggleCreateGroupDialog}>{gettext('New Group')}</Button>
|
<Button className="operation-item" onClick={this.toggleCreateGroupDialog}>{gettext('New Group')}</Button>
|
||||||
<a className="btn btn-secondary operation-item" href={`${siteRoot}sys/groupadmin/export-excel/`}>{gettext('Export Excel')}</a>
|
<a className="btn btn-secondary operation-item" href={`${siteRoot}sys/groupadmin/export-excel/`}>{gettext('Export Excel')}</a>
|
||||||
|
@ -94,7 +94,7 @@ class SearchGroups extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDom from 'react-dom';
|
import ReactDom from 'react-dom';
|
||||||
|
import MediaQuery from 'react-responsive';
|
||||||
|
import { Modal } from 'reactstrap';
|
||||||
import { Router } from '@gatsbyjs/reach-router';
|
import { Router } from '@gatsbyjs/reach-router';
|
||||||
import { siteRoot } from '../../utils/constants';
|
import { siteRoot } from '../../utils/constants';
|
||||||
|
import { Utils } from '../../utils/utils';
|
||||||
|
|
||||||
import SidePanel from './side-panel';
|
import SidePanel from './side-panel';
|
||||||
import MainPanel from './main-panel';
|
import MainPanel from './main-panel';
|
||||||
|
|
||||||
@ -16,7 +20,6 @@ import StatisticReport from './statistic/statistic-reports';
|
|||||||
import DesktopDevices from './devices/desktop-devices';
|
import DesktopDevices from './devices/desktop-devices';
|
||||||
import MobileDevices from './devices/mobile-devices';
|
import MobileDevices from './devices/mobile-devices';
|
||||||
import DeviceErrors from './devices/devices-errors';
|
import DeviceErrors from './devices/devices-errors';
|
||||||
import AbuseReports from './abuse-reports';
|
|
||||||
|
|
||||||
import Users from './users/users';
|
import Users from './users/users';
|
||||||
import AdminUsers from './users/admin-users';
|
import AdminUsers from './users/admin-users';
|
||||||
@ -78,6 +81,8 @@ import UnhandledVirusFiles from './virus-scan/unhandled-virus-files';
|
|||||||
import AdminOperationLogs from './admin-logs/operation-logs';
|
import AdminOperationLogs from './admin-logs/operation-logs';
|
||||||
import AdminLoginLogs from './admin-logs/login-logs';
|
import AdminLoginLogs from './admin-logs/login-logs';
|
||||||
|
|
||||||
|
import AbuseReports from './abuse-reports';
|
||||||
|
|
||||||
import '../../css/layout.css';
|
import '../../css/layout.css';
|
||||||
import '../../css/toolbar.css';
|
import '../../css/toolbar.css';
|
||||||
|
|
||||||
@ -154,6 +159,14 @@ class SysAdmin extends React.Component {
|
|||||||
this.setState({currentTab: currentTab});
|
this.setState({currentTab: currentTab});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
if (!Utils.isDesktop()) {
|
||||||
|
this.setState({
|
||||||
|
isSidePanelClosed: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getCurrentTabForPageList = (pageList) => {
|
getCurrentTabForPageList = (pageList) => {
|
||||||
let urlPartList, tab;
|
let urlPartList, tab;
|
||||||
const urlBase = `${siteRoot}sys/`;
|
const urlBase = `${siteRoot}sys/`;
|
||||||
@ -174,10 +187,22 @@ class SysAdmin extends React.Component {
|
|||||||
|
|
||||||
tabItemClick = (param) => {
|
tabItemClick = (param) => {
|
||||||
this.setState({currentTab: param});
|
this.setState({currentTab: param});
|
||||||
|
if (!Utils.isDesktop() && !this.state.isSidePanelClosed) {
|
||||||
|
this.setState({ isSidePanelClosed: true });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleSidePanel = () => {
|
||||||
|
this.setState({
|
||||||
|
isSidePanelClosed: !this.state.isSidePanelClosed
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { currentTab, isSidePanelClosed } = this.state;
|
const { currentTab, isSidePanelClosed } = this.state;
|
||||||
|
const commonProps = {
|
||||||
|
toggleSidePanel: this.toggleSidePanel
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="main">
|
<div id="main">
|
||||||
@ -189,85 +214,75 @@ class SysAdmin extends React.Component {
|
|||||||
/>
|
/>
|
||||||
<MainPanel>
|
<MainPanel>
|
||||||
<Router className="reach-router">
|
<Router className="reach-router">
|
||||||
<Info path={siteRoot + 'sys/info'} />
|
<Info path={siteRoot + 'sys/info'} {...commonProps} />
|
||||||
<StatisticFile path={siteRoot + 'sys/statistics/file'} />
|
<StatisticFile path={siteRoot + 'sys/statistics/file'} {...commonProps} />
|
||||||
<StatisticStorage path={siteRoot + 'sys/statistics/storage'} />
|
<StatisticStorage path={siteRoot + 'sys/statistics/storage'} {...commonProps} />
|
||||||
<StatisticUsers path={siteRoot + 'sys/statistics/user'} />
|
<StatisticUsers path={siteRoot + 'sys/statistics/user'} {...commonProps} />
|
||||||
<StatisticTraffic path={siteRoot + 'sys/statistics/traffic'} />
|
<StatisticTraffic path={siteRoot + 'sys/statistics/traffic'} {...commonProps} />
|
||||||
<StatisticReport path={siteRoot + 'sys/statistics/reports'} />
|
<StatisticReport path={siteRoot + 'sys/statistics/reports'} {...commonProps} />
|
||||||
<DesktopDevices path={siteRoot + 'sys/desktop-devices'} />
|
<DesktopDevices path={siteRoot + 'sys/desktop-devices'} {...commonProps} />
|
||||||
<MobileDevices path={siteRoot + 'sys/mobile-devices'} />
|
<MobileDevices path={siteRoot + 'sys/mobile-devices'} {...commonProps} />
|
||||||
<DeviceErrors path={siteRoot + 'sys/device-errors'} />
|
<DeviceErrors path={siteRoot + 'sys/device-errors'} {...commonProps} />
|
||||||
<AllRepos path={siteRoot + 'sys/all-libraries'} />
|
<AllRepos path={siteRoot + 'sys/all-libraries'} {...commonProps} />
|
||||||
<SystemRepo path={siteRoot + 'sys/system-library'} />
|
<SystemRepo path={siteRoot + 'sys/system-library'} {...commonProps} />
|
||||||
<TrashRepos path={siteRoot + 'sys/trash-libraries'} />
|
<TrashRepos path={siteRoot + 'sys/trash-libraries'} {...commonProps} />
|
||||||
<SearchRepos path={siteRoot + 'sys/search-libraries'} />
|
<SearchRepos path={siteRoot + 'sys/search-libraries'} {...commonProps} />
|
||||||
<DirView path={siteRoot + 'sys/libraries/:repoID/*'} />
|
<DirView path={siteRoot + 'sys/libraries/:repoID/*'} {...commonProps} />
|
||||||
<WebSettings path={siteRoot + 'sys/web-settings'} />
|
<WebSettings path={siteRoot + 'sys/web-settings'} {...commonProps} />
|
||||||
<Notifications path={siteRoot + 'sys/notifications'} />
|
<Notifications path={siteRoot + 'sys/notifications'} {...commonProps} />
|
||||||
<Groups path={siteRoot + 'sys/groups'} />
|
<Groups path={siteRoot + 'sys/groups'} {...commonProps} />
|
||||||
<SearchGroups path={siteRoot + 'sys/search-groups'} />
|
<SearchGroups path={siteRoot + 'sys/search-groups'} {...commonProps} />
|
||||||
<GroupRepos path={siteRoot + 'sys/groups/:groupID/libraries'} />
|
<GroupRepos path={siteRoot + 'sys/groups/:groupID/libraries'} {...commonProps} />
|
||||||
<GroupMembers path={siteRoot + 'sys/groups/:groupID/members'} />
|
<GroupMembers path={siteRoot + 'sys/groups/:groupID/members'} {...commonProps} />
|
||||||
<Departments path={siteRoot + 'sys/departments'}>
|
<Departments path={siteRoot + 'sys/departments'}>
|
||||||
<DepartmentsList path='/'/>
|
<DepartmentsList path='/' {...commonProps} />
|
||||||
<DepartmentDetail path='/:groupID'/>
|
<DepartmentDetail path='/:groupID' {...commonProps} />
|
||||||
</Departments>
|
</Departments>
|
||||||
<ShareLinks path={siteRoot + 'sys/share-links'} />
|
<ShareLinks path={siteRoot + 'sys/share-links'} {...commonProps} />
|
||||||
<UploadLinks path={siteRoot + 'sys/upload-links'} />
|
<UploadLinks path={siteRoot + 'sys/upload-links'} {...commonProps} />
|
||||||
<Orgs path={siteRoot + 'sys/organizations'} />
|
<Orgs path={siteRoot + 'sys/organizations'} {...commonProps} />
|
||||||
<SearchOrgs path={siteRoot + 'sys/search-organizations'} />
|
<SearchOrgs path={siteRoot + 'sys/search-organizations'} {...commonProps} />
|
||||||
<OrgInfo path={siteRoot + 'sys/organizations/:orgID/info'} />
|
<OrgInfo path={siteRoot + 'sys/organizations/:orgID/info'} {...commonProps} />
|
||||||
<OrgUsers path={siteRoot + 'sys/organizations/:orgID/users'} />
|
<OrgUsers path={siteRoot + 'sys/organizations/:orgID/users'} {...commonProps} />
|
||||||
<OrgGroups path={siteRoot + 'sys/organizations/:orgID/groups'} />
|
<OrgGroups path={siteRoot + 'sys/organizations/:orgID/groups'} {...commonProps} />
|
||||||
<OrgRepos path={siteRoot + 'sys/organizations/:orgID/libraries'} />
|
<OrgRepos path={siteRoot + 'sys/organizations/:orgID/libraries'} {...commonProps} />
|
||||||
<Institutions path={siteRoot + 'sys/institutions'} />
|
<Institutions path={siteRoot + 'sys/institutions'} {...commonProps} />
|
||||||
<InstitutionInfo path={siteRoot + 'sys/institutions/:institutionID/info'} />
|
<InstitutionInfo path={siteRoot + 'sys/institutions/:institutionID/info'} {...commonProps} />
|
||||||
<InstitutionUsers path={siteRoot + 'sys/institutions/:institutionID/members'} />
|
<InstitutionUsers path={siteRoot + 'sys/institutions/:institutionID/members'} {...commonProps} />
|
||||||
<InstitutionAdmins path={siteRoot + 'sys/institutions/:institutionID/admins'} />
|
<InstitutionAdmins path={siteRoot + 'sys/institutions/:institutionID/admins'} {...commonProps} />
|
||||||
<LoginLogs path={siteRoot + 'sys/logs/login'} />
|
<LoginLogs path={siteRoot + 'sys/logs/login'} {...commonProps} />
|
||||||
<FileAccessLogs path={siteRoot + 'sys/logs/file-access'} />
|
<FileAccessLogs path={siteRoot + 'sys/logs/file-access'} {...commonProps} />
|
||||||
<FileUpdateLogs path={siteRoot + 'sys/logs/file-update'} />
|
<FileUpdateLogs path={siteRoot + 'sys/logs/file-update'} {...commonProps} />
|
||||||
<SharePermissionLogs path={siteRoot + 'sys/logs/share-permission'} />
|
<SharePermissionLogs path={siteRoot + 'sys/logs/share-permission'} {...commonProps} />
|
||||||
<AdminOperationLogs path={siteRoot + 'sys/admin-logs/operation'} />
|
<AdminOperationLogs path={siteRoot + 'sys/admin-logs/operation'} {...commonProps} />
|
||||||
<AdminLoginLogs path={siteRoot + 'sys/admin-logs/login'} />
|
<AdminLoginLogs path={siteRoot + 'sys/admin-logs/login'} {...commonProps} />
|
||||||
|
|
||||||
<Users path={siteRoot + 'sys/users'} />
|
<Users path={siteRoot + 'sys/users'} {...commonProps} />
|
||||||
<AdminUsers path={siteRoot + 'sys/users/admins'} />
|
<AdminUsers path={siteRoot + 'sys/users/admins'} {...commonProps} />
|
||||||
<LDAPImportedUsers path={siteRoot + 'sys/users/ldap-imported'} />
|
<LDAPImportedUsers path={siteRoot + 'sys/users/ldap-imported'} {...commonProps} />
|
||||||
<LDAPUsers path={siteRoot + 'sys/users/ldap'} />
|
<LDAPUsers path={siteRoot + 'sys/users/ldap'} {...commonProps} />
|
||||||
<SearchUsers path={siteRoot + 'sys/search-users'} />
|
<SearchUsers path={siteRoot + 'sys/search-users'} {...commonProps} />
|
||||||
<User path={siteRoot + 'sys/users/:email'} />
|
<User path={siteRoot + 'sys/users/:email'} {...commonProps} />
|
||||||
<UserOwnedRepos path={siteRoot + 'sys/users/:email/owned-libraries'} />
|
<UserOwnedRepos path={siteRoot + 'sys/users/:email/owned-libraries'} {...commonProps} />
|
||||||
<UserSharedRepos path={siteRoot + 'sys/users/:email/shared-libraries'} />
|
<UserSharedRepos path={siteRoot + 'sys/users/:email/shared-libraries'} {...commonProps} />
|
||||||
<UserLinks path={siteRoot + 'sys/users/:email/shared-links'} />
|
<UserLinks path={siteRoot + 'sys/users/:email/shared-links'} {...commonProps} />
|
||||||
<UserGroups path={siteRoot + 'sys/users/:email/groups'} />
|
<UserGroups path={siteRoot + 'sys/users/:email/groups'} {...commonProps} />
|
||||||
|
|
||||||
<Invitations path={siteRoot + 'sys/invitations'} />
|
<Invitations path={siteRoot + 'sys/invitations'} {...commonProps} />
|
||||||
<TermsAndConditions path={siteRoot + 'sys/terms-and-conditions/'} />
|
<TermsAndConditions path={siteRoot + 'sys/terms-and-conditions/'} {...commonProps} />
|
||||||
|
|
||||||
<AllVirusFiles path={siteRoot + 'sys/virus-files/all'} />
|
<AllVirusFiles path={siteRoot + 'sys/virus-files/all'} {...commonProps} />
|
||||||
<UnhandledVirusFiles path={siteRoot + 'sys/virus-files/unhandled'} />
|
<UnhandledVirusFiles path={siteRoot + 'sys/virus-files/unhandled'} {...commonProps} />
|
||||||
|
|
||||||
<FileScanRecords
|
<FileScanRecords path={siteRoot + 'sys/file-scan-records'} {...commonProps} />
|
||||||
path={siteRoot + 'sys/file-scan-records'}
|
<WorkWeixinDepartments path={siteRoot + 'sys/work-weixin'} {...commonProps} />
|
||||||
currentTab={currentTab}
|
<DingtalkDepartments path={siteRoot + 'sys/dingtalk'} {...commonProps} />
|
||||||
tabItemClick={this.tabItemClick}
|
<AbuseReports path={siteRoot + 'sys/abuse-reports'} {...commonProps} />
|
||||||
/>
|
|
||||||
|
|
||||||
<WorkWeixinDepartments
|
|
||||||
path={siteRoot + 'sys/work-weixin'}
|
|
||||||
currentTab={currentTab}
|
|
||||||
tabItemClick={this.tabItemClick}
|
|
||||||
/>
|
|
||||||
<DingtalkDepartments
|
|
||||||
path={siteRoot + 'sys/dingtalk'}
|
|
||||||
currentTab={currentTab}
|
|
||||||
tabItemClick={this.tabItemClick}
|
|
||||||
/>
|
|
||||||
<AbuseReports path={siteRoot + 'sys/abuse-reports'} />
|
|
||||||
</Router>
|
</Router>
|
||||||
</MainPanel>
|
</MainPanel>
|
||||||
|
<MediaQuery query="(max-width: 767.8px)">
|
||||||
|
<Modal zIndex="1030" isOpen={!isSidePanelClosed} toggle={this.toggleSidePanel} contentClassName="d-none"></Modal>
|
||||||
|
</MediaQuery>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ class Info extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container system-admin-info">
|
<div className="cur-view-container system-admin-info">
|
||||||
<h2 className="heading">{gettext('Info')}</h2>
|
<h2 className="heading">{gettext('Info')}</h2>
|
||||||
|
@ -250,7 +250,7 @@ class InstitutionAdmins extends Component {
|
|||||||
const { institutionName } = this.state;
|
const { institutionName } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<InstitutionNav
|
<InstitutionNav
|
||||||
|
@ -112,7 +112,7 @@ class InstitutionInfo extends Component {
|
|||||||
const { institutionInfo } = this.state;
|
const { institutionInfo } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<InstitutionNav currentItem="info" institutionID={this.props.institutionID} institutionName={institutionInfo.name} />
|
<InstitutionNav currentItem="info" institutionID={this.props.institutionID} institutionName={institutionInfo.name} />
|
||||||
|
@ -333,7 +333,7 @@ class InstitutionUsers extends Component {
|
|||||||
const { isAddUserDialogOpen, institutionName, hasNextPage, currentPage, perPage } = this.state;
|
const { isAddUserDialogOpen, institutionName, hasNextPage, currentPage, perPage } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddUserDialog}>{gettext('Add Member')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddUserDialog}>{gettext('Add Member')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -215,7 +215,7 @@ class Institutions extends Component {
|
|||||||
const { isAddInstitutionDialogOpen, hasNextPage, currentPage, perPage } = this.state;
|
const { isAddInstitutionDialogOpen, hasNextPage, currentPage, perPage } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddInstitutionDialog}>{gettext('Add Institution')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddInstitutionDialog}>{gettext('Add Institution')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -299,7 +299,7 @@ class Invitations extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.deleteItemInBatch}>{gettext('Delete Expired Invitations')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.deleteItemInBatch}>{gettext('Delete Expired Invitations')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -242,7 +242,7 @@ class ShareLinks extends Component {
|
|||||||
let { shareLinkList, currentPage, perPage, hasNextPage } = this.state;
|
let { shareLinkList, currentPage, perPage, hasNextPage } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<LinksNav currentItem="shareLinks" />
|
<LinksNav currentItem="shareLinks" />
|
||||||
|
@ -201,7 +201,7 @@ class UploadLinks extends Component {
|
|||||||
let { uploadLinkList, currentPage, perPage, hasNextPage } = this.state;
|
let { uploadLinkList, currentPage, perPage, hasNextPage } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<LinksNav currentItem="uploadLinks" />
|
<LinksNav currentItem="uploadLinks" />
|
||||||
|
@ -300,7 +300,7 @@ class FileAccessLogs extends Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -201,7 +201,7 @@ class FileUpdateLogs extends Component {
|
|||||||
let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;
|
let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -169,7 +169,7 @@ class LoginLogs extends Component {
|
|||||||
let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;
|
let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -202,7 +202,7 @@ class SharePermissionLogs extends Component {
|
|||||||
let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;
|
let { logList, currentPage, perPage, hasNextPage, isExportExcelDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleExportExcelDialog}>{gettext('Export Excel')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Account from '../../components/common/account';
|
import Account from '../../components/common/account';
|
||||||
|
import { gettext } from '../../utils/constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
children: PropTypes.object
|
children: PropTypes.object,
|
||||||
|
toggleSidePanel: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
class MainPanelTopbar extends Component {
|
class MainPanelTopbar extends Component {
|
||||||
@ -12,7 +14,11 @@ class MainPanelTopbar extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className={`main-panel-north ${this.props.children ? 'border-left-show' : ''}`}>
|
<div className={`main-panel-north ${this.props.children ? 'border-left-show' : ''}`}>
|
||||||
<div className="cur-view-toolbar">
|
<div className="cur-view-toolbar">
|
||||||
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu"></span>
|
<span
|
||||||
|
className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none"
|
||||||
|
title={gettext("Side Nav Menu")}
|
||||||
|
onClick={this.props.toggleSidePanel}
|
||||||
|
></span>
|
||||||
<div className="operation">
|
<div className="operation">
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
|
@ -271,7 +271,7 @@ class Notifications extends Component {
|
|||||||
const { isAddNotificationDialogOpen } = this.state;
|
const { isAddNotificationDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddNotificationDialog}>{gettext('Add new notification')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddNotificationDialog}>{gettext('Add new notification')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -169,7 +169,7 @@ class OrgGroups extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<OrgNav
|
<OrgNav
|
||||||
|
@ -180,7 +180,7 @@ class OrgInfo extends Component {
|
|||||||
const { orgInfo } = this.state;
|
const { orgInfo } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<OrgNav currentItem="info" orgID={this.props.orgID} orgName={orgInfo.org_name} />
|
<OrgNav currentItem="info" orgID={this.props.orgID} orgName={orgInfo.org_name} />
|
||||||
|
@ -175,7 +175,7 @@ class OrgRepos extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<OrgNav
|
<OrgNav
|
||||||
|
@ -347,7 +347,7 @@ class OrgUsers extends Component {
|
|||||||
const { isAddUserDialogOpen, orgName } = this.state;
|
const { isAddUserDialogOpen, orgName } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddUserDialog}>{gettext('Add Member')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddUserDialog}>{gettext('Add Member')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -124,7 +124,7 @@ class Orgs extends Component {
|
|||||||
const { isAddOrgDialogOpen } = this.state;
|
const { isAddOrgDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar search={this.getSearch()}>
|
<MainPanelTopbar search={this.getSearch()} {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddOrgDialog}>{gettext('Add Organization')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddOrgDialog}>{gettext('Add Organization')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -90,7 +90,7 @@ class SearchOrgs extends Component {
|
|||||||
const { query, isSubmitBtnActive } = this.state;
|
const { query, isSubmitBtnActive } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -127,7 +127,7 @@ class AllRepos extends Component {
|
|||||||
let { isCreateRepoDialogOpen } = this.state;
|
let { isCreateRepoDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar search={this.getSearch()}>
|
<MainPanelTopbar search={this.getSearch()} {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleCreateRepoDialog}>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleCreateRepoDialog}>
|
||||||
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('New Library')}
|
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('New Library')}
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -168,13 +168,13 @@ class DirView extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{isSystemRepo ?
|
{isSystemRepo ?
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<input className="d-none" type="file" onChange={this.onFileInputChange} ref={this.fileInput} />
|
<input className="d-none" type="file" onChange={this.onFileInputChange} ref={this.fileInput} />
|
||||||
<Button className="operation-item" onClick={this.openFileInput}>{gettext('Upload')}</Button>
|
<Button className="operation-item" onClick={this.openFileInput}>{gettext('Upload')}</Button>
|
||||||
<Button className="operation-item" onClick={this.toggleNewFolderDialog}>{gettext('New Folder')}</Button>
|
<Button className="operation-item" onClick={this.toggleNewFolderDialog}>{gettext('New Folder')}</Button>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</MainPanelTopbar> : <MainPanelTopbar />
|
</MainPanelTopbar> : <MainPanelTopbar {...this.props} />
|
||||||
}
|
}
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
|
@ -81,7 +81,7 @@ class SearchRepos extends Component {
|
|||||||
const { name, isSubmitBtnActive } = this.state;
|
const { name, isSubmitBtnActive } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -92,7 +92,7 @@ class SystemRepo extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar/>
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<ReposNav currentItem="system" />
|
<ReposNav currentItem="system" />
|
||||||
|
@ -373,10 +373,10 @@ class TrashRepos extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.state.repos.length ? (
|
{this.state.repos.length ? (
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="operation-item" onClick={this.toggleCleanTrashDialog}>{gettext('Clean')}</Button>
|
<Button className="operation-item" onClick={this.toggleCleanTrashDialog}>{gettext('Clean')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
) : <MainPanelTopbar />
|
) : <MainPanelTopbar {...this.props} />
|
||||||
}
|
}
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
|
@ -78,7 +78,7 @@ class StatisticFile extends React.Component {
|
|||||||
|
|
||||||
return(
|
return(
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<StatisticNav currentItem="fileStatistic" />
|
<StatisticNav currentItem="fileStatistic" />
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
|
@ -61,7 +61,7 @@ class StatisticReports extends React.Component {
|
|||||||
let { errorMessage } = this.state;
|
let { errorMessage } = this.state;
|
||||||
return(
|
return(
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<StatisticNav currentItem="reportsStatistic" />
|
<StatisticNav currentItem="reportsStatistic" />
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
|
@ -54,7 +54,7 @@ class StatisticStorage extends React.Component {
|
|||||||
let { labels, filesData, isLoading } = this.state;
|
let { labels, filesData, isLoading } = this.state;
|
||||||
return(
|
return(
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<StatisticNav currentItem="storageStatistic" />
|
<StatisticNav currentItem="storageStatistic" />
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
|
@ -141,7 +141,7 @@ class StatisticTraffic extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<StatisticNav currentItem="trafficStatistic" />
|
<StatisticNav currentItem="trafficStatistic" />
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
|
@ -54,7 +54,7 @@ class StatisticUsers extends React.Component {
|
|||||||
let { labels, filesData, isLoading } = this.state;
|
let { labels, filesData, isLoading } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<StatisticNav currentItem="usersStatistic" />
|
<StatisticNav currentItem="usersStatistic" />
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
|
@ -81,7 +81,7 @@ class TermsAndConditions extends Component {
|
|||||||
let { termList, isAddTermDialogOpen } = this.state;
|
let { termList, isAddTermDialogOpen } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddTermDialog}>{gettext('Add')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleAddTermDialog}>{gettext('Add')}</Button>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
|
@ -4,7 +4,7 @@ import Users from './users';
|
|||||||
class AdminUsers extends Component {
|
class AdminUsers extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <Users isAdmin={true} />;
|
return <Users isAdmin={true} {...this.props} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import Users from './users';
|
|||||||
class LDAPImportedUsers extends Component {
|
class LDAPImportedUsers extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <Users isLDAPImported={true} />;
|
return <Users isLDAPImported={true} {...this.props} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ class Users extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<UsersNav currentItem="ldap" />
|
<UsersNav currentItem="ldap" />
|
||||||
|
@ -280,13 +280,13 @@ class SearchUsers extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{hasUserSelected ?
|
{hasUserSelected ?
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleBatchSetQuotaDialog}>{gettext('Set Quota')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleBatchSetQuotaDialog}>{gettext('Set Quota')}</Button>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleBatchDeleteUserDialog}>{gettext('Delete Users')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleBatchDeleteUserDialog}>{gettext('Delete Users')}</Button>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</MainPanelTopbar> :
|
</MainPanelTopbar> :
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
}
|
}
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
|
@ -177,7 +177,7 @@ class Groups extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<Nav currentItem="groups" email={this.props.email} userName={this.state.userInfo.name} />
|
<Nav currentItem="groups" email={this.props.email} userName={this.state.userInfo.name} />
|
||||||
|
@ -299,7 +299,7 @@ class User extends Component {
|
|||||||
const { userInfo } = this.state;
|
const { userInfo } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<Nav currentItem="info" email={this.props.email} userName={userInfo.name} />
|
<Nav currentItem="info" email={this.props.email} userName={userInfo.name} />
|
||||||
|
@ -303,7 +303,7 @@ class Links extends Component {
|
|||||||
const { shareLinkItems, uploadLinkItems } = this.state;
|
const { shareLinkItems, uploadLinkItems } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<Nav currentItem="links" email={this.props.email} userName={this.state.userInfo.name} />
|
<Nav currentItem="links" email={this.props.email} userName={this.state.userInfo.name} />
|
||||||
|
@ -284,7 +284,7 @@ class Repos extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<Nav currentItem="owned-repos" email={this.props.email} userName={this.state.userInfo.name} />
|
<Nav currentItem="owned-repos" email={this.props.email} userName={this.state.userInfo.name} />
|
||||||
|
@ -144,7 +144,7 @@ class Repos extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<Nav currentItem="shared-repos" email={this.props.email} userName={this.state.userInfo.name} />
|
<Nav currentItem="shared-repos" email={this.props.email} userName={this.state.userInfo.name} />
|
||||||
|
@ -441,7 +441,7 @@ class Users extends Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar search={this.getSearch()}>
|
<MainPanelTopbar search={this.getSearch()} {...this.props}>
|
||||||
{hasUserSelected ?
|
{hasUserSelected ?
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Button className="btn btn-secondary operation-item" onClick={this.toggleBatchSetQuotaDialog}>{gettext('Set Quota')}</Button>
|
<Button className="btn btn-secondary operation-item" onClick={this.toggleBatchSetQuotaDialog}>{gettext('Set Quota')}</Button>
|
||||||
|
@ -286,7 +286,7 @@ class AllVirusFiles extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center">
|
<div className="main-panel-center">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<Nav currentItem="all" />
|
<Nav currentItem="all" />
|
||||||
|
@ -384,13 +384,13 @@ class UnhandledVirusFiles extends Component {
|
|||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.state.virusFiles.some(item => item.isSelected) ? (
|
{this.state.virusFiles.some(item => item.isSelected) ? (
|
||||||
<MainPanelTopbar>
|
<MainPanelTopbar {...this.props}>
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Button onClick={this.deleteSelectedItems} className="operation-item">{gettext('Delete')}</Button>
|
<Button onClick={this.deleteSelectedItems} className="operation-item">{gettext('Delete')}</Button>
|
||||||
<Button onClick={this.ignoreSelectedItems} className="operation-item">{gettext('Ignore')}</Button>
|
<Button onClick={this.ignoreSelectedItems} className="operation-item">{gettext('Ignore')}</Button>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
</MainPanelTopbar>
|
</MainPanelTopbar>
|
||||||
) : <MainPanelTopbar />
|
) : <MainPanelTopbar {...this.props} />
|
||||||
}
|
}
|
||||||
<div className="main-panel-center">
|
<div className="main-panel-center">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
|
@ -86,7 +86,7 @@ class WebSettings extends Component {
|
|||||||
const { loading, errorMsg, config_dict, logoPath, faviconPath, loginBGPath } = this.state;
|
const { loading, errorMsg, config_dict, logoPath, faviconPath, loginBGPath } = this.state;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<MainPanelTopbar />
|
<MainPanelTopbar {...this.props} />
|
||||||
<div className="main-panel-center flex-row">
|
<div className="main-panel-center flex-row">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
@ -5,7 +5,7 @@ import { seafileAPI } from '../../utils/seafile-api';
|
|||||||
import { gettext, siteRoot, isPro } from '../../utils/constants';
|
import { gettext, siteRoot, isPro } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import toaster from '../../components/toast';
|
import toaster from '../../components/toast';
|
||||||
import Account from '../../components/common/account';
|
import MainPanelTopbar from './main-panel-topbar';
|
||||||
import { WorkWeixinDepartmentMembersList, WorkWeixinDepartmentsTreePanel } from './work-weixin';
|
import { WorkWeixinDepartmentMembersList, WorkWeixinDepartmentsTreePanel } from './work-weixin';
|
||||||
import ImportWorkWeixinDepartmentDialog from '../../components/dialog/import-work-weixin-department-dialog';
|
import ImportWorkWeixinDepartmentDialog from '../../components/dialog/import-work-weixin-department-dialog';
|
||||||
|
|
||||||
@ -289,28 +289,14 @@ class WorkWeixinDepartments extends Component {
|
|||||||
this.getWorkWeixinDepartmentsList(null);
|
this.getWorkWeixinDepartmentsList(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderNav() {
|
|
||||||
const btnClass = 'btn btn-secondary operation-item ';
|
|
||||||
return (
|
|
||||||
<div className="main-panel-north border-left-show">
|
|
||||||
<div className="cur-view-toolbar">
|
|
||||||
<span className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none" title="Side Nav Menu"></span>
|
|
||||||
<Button className={btnClass + 'my-1 d-md-none'} onClick={this.onSubmit}>{'导入用户'}</Button>
|
|
||||||
<Button className={btnClass + 'hidden-md-up'} onClick={this.onSubmit}>{'导入用户'}</Button>
|
|
||||||
</div>
|
|
||||||
<div className="common-toolbar">
|
|
||||||
<Account isAdminPanel={true}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { isImportDepartmentDialogShow, isTreeLoading, importDepartment, importDepartmentChildrenCount, importDepartmentMembersCount } = this.state;
|
const { isImportDepartmentDialogShow, isTreeLoading, importDepartment, importDepartmentChildrenCount, importDepartmentMembersCount } = this.state;
|
||||||
let canImportDepartment = !!(isPro && isImportDepartmentDialogShow && !isTreeLoading && importDepartment);
|
let canImportDepartment = !!(isPro && isImportDepartmentDialogShow && !isTreeLoading && importDepartment);
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
{this.renderNav()}
|
<MainPanelTopbar {...this.props}>
|
||||||
|
<Button className="operation-item" onClick={this.onSubmit}>{'导入用户'}</Button>
|
||||||
|
</MainPanelTopbar>
|
||||||
<div className="main-panel-center">
|
<div className="main-panel-center">
|
||||||
<div className="cur-view-container">
|
<div className="cur-view-container">
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
|
Loading…
Reference in New Issue
Block a user