1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

[wiki side panel] redesigned it (added 'Pages' & 'Other' header bars) (#7134)

This commit is contained in:
llj
2024-12-02 21:47:14 +08:00
committed by GitHub
parent faf213856e
commit 5f34ff95ea
4 changed files with 40 additions and 23 deletions

View File

@@ -2,8 +2,7 @@ import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import deepCopy from 'deep-copy';
import classNames from 'classnames';
import { UncontrolledTooltip } from 'reactstrap';
import { gettext, isWiki2, wikiId, wikiPermission } from '../../utils/constants';
import { isWiki2, wikiId, wikiPermission } from '../../utils/constants';
import toaster from '../../components/toast';
import Loading from '../../components/loading';
import WikiNav from './wiki-nav/index';
@@ -142,6 +141,7 @@ class SidePanel extends PureComponent {
addPageInside={this.addPageInside}
toggleTrashDialog={this.toggleTrashDialog}
addSiblingPage={this.addSiblingPage}
handleAddNewPage={this.handleAddNewPage}
/>
}
</div>
@@ -174,24 +174,10 @@ class SidePanel extends PureComponent {
render() {
const { isLoading, config } = this.props;
const isDesktop = Utils.isDesktop();
return (
<div className={classNames('wiki2-side-panel', { 'left-zero': this.props.isSidePanelOpen })}>
<div className="wiki2-side-panel-top">
<h4 className="text-truncate ml-0 mb-0" title={repoName}>{repoName}</h4>
{isDesktop && wikiPermission !== 'public' &&
<div>
<i
id='wiki-add-new-page'
onClick={this.handleAddNewPage.bind(true)}
className='sf3-font sf3-font-new-page add-new-page p-1'
>
</i>
<UncontrolledTooltip className='wiki-new-page-tooltip' target="wiki-add-new-page">
{gettext('New page')}
</UncontrolledTooltip>
</div>
}
<h1 className="h4 text-truncate ml-0 mb-0" title={repoName}>{repoName}</h1>
</div>
<Wiki2Search
wikiId={wikiId}