mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 07:55:36 +00:00
[12.0] fix wiki edit page style (#6078)
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { seafileAPI } from '../../../utils/seafile-api';
|
import { seafileAPI } from '../../../utils/seafile-api';
|
||||||
import MainPanelTopbar from '../main-panel-topbar';
|
import MainPanelTopbar from '../main-panel-topbar';
|
||||||
|
@@ -581,12 +581,10 @@ class Wiki extends Component {
|
|||||||
permission={this.state.permission}
|
permission={this.state.permission}
|
||||||
lastModified={this.state.lastModified}
|
lastModified={this.state.lastModified}
|
||||||
latestContributor={this.state.latestContributor}
|
latestContributor={this.state.latestContributor}
|
||||||
direntList={this.state.direntList}
|
|
||||||
onLinkClick={this.onLinkClick}
|
onLinkClick={this.onLinkClick}
|
||||||
onMenuClick={this.onMenuClick}
|
onMenuClick={this.onMenuClick}
|
||||||
onSearchedClick={this.onSearchedClick}
|
onSearchedClick={this.onSearchedClick}
|
||||||
onMainNavBarClick={this.onMainNavBarClick}
|
onMainNavBarClick={this.onMainNavBarClick}
|
||||||
onDirentClick={this.onDirentClick}
|
|
||||||
/>
|
/>
|
||||||
<MediaQuery query="(max-width: 767.8px)">
|
<MediaQuery query="(max-width: 767.8px)">
|
||||||
<Modal isOpen={!this.state.closeSideBar} toggle={this.onCloseSide} contentClassName="d-none"></Modal>
|
<Modal isOpen={!this.state.closeSideBar} toggle={this.onCloseSide} contentClassName="d-none"></Modal>
|
||||||
|
@@ -1,11 +1,10 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component, Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext, repoID, siteRoot, username, isPro, isEditWiki } from '../../utils/constants';
|
import { gettext, repoID, siteRoot, username, isEditWiki } from '../../utils/constants';
|
||||||
import SeafileMarkdownViewer from '../../components/seafile-markdown-viewer';
|
import SeafileMarkdownViewer from '../../components/seafile-markdown-viewer';
|
||||||
import WikiDirListView from '../../components/wiki-dir-list-view/wiki-dir-list-view';
|
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import Search from '../../components/search/search';
|
// import Search from '../../components/search/search';
|
||||||
import Notification from '../../components/common/notification';
|
import Notification from '../../components/common/notification';
|
||||||
import Account from '../../components/common/account';
|
import Account from '../../components/common/account';
|
||||||
import SdocWikiPageViewer from '../../components/sdoc-wiki-page-viewer';
|
import SdocWikiPageViewer from '../../components/sdoc-wiki-page-viewer';
|
||||||
@@ -19,11 +18,9 @@ const propTypes = {
|
|||||||
permission: PropTypes.string,
|
permission: PropTypes.string,
|
||||||
lastModified: PropTypes.string,
|
lastModified: PropTypes.string,
|
||||||
latestContributor: PropTypes.string,
|
latestContributor: PropTypes.string,
|
||||||
direntList: PropTypes.array.isRequired,
|
|
||||||
onMenuClick: PropTypes.func.isRequired,
|
onMenuClick: PropTypes.func.isRequired,
|
||||||
onSearchedClick: PropTypes.func.isRequired,
|
onSearchedClick: PropTypes.func.isRequired,
|
||||||
onMainNavBarClick: PropTypes.func.isRequired,
|
onMainNavBarClick: PropTypes.func.isRequired,
|
||||||
onDirentClick: PropTypes.func.isRequired,
|
|
||||||
onLinkClick: PropTypes.func.isRequired,
|
onLinkClick: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,7 +75,7 @@ class MainPanel extends Component {
|
|||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { onSearchedClick } = this.props;
|
// let { onSearchedClick } = this.props;
|
||||||
const errMessage = (<div className="message err-tip">{gettext('Folder does not exist.')}</div>);
|
const errMessage = (<div className="message err-tip">{gettext('Folder does not exist.')}</div>);
|
||||||
const isViewingFile = this.props.pathExist && !this.props.isDataLoading && this.props.isViewFile;
|
const isViewingFile = this.props.pathExist && !this.props.isDataLoading && this.props.isViewFile;
|
||||||
return (
|
return (
|
||||||
@@ -91,9 +88,9 @@ class MainPanel extends Component {
|
|||||||
<span className="sf2-icon-menu hidden-md-up d-md-none side-nav-toggle" title="Side Nav Menu" onClick={this.onMenuClick}></span>
|
<span className="sf2-icon-menu hidden-md-up d-md-none side-nav-toggle" title="Side Nav Menu" onClick={this.onMenuClick}></span>
|
||||||
</div>
|
</div>
|
||||||
<div className="common-toolbar">
|
<div className="common-toolbar">
|
||||||
{isPro && (
|
{/* {isPro && (
|
||||||
<Search isPublic={true} repoID={repoID} onSearchedClick={onSearchedClick} placeholder={gettext('Search files')}/>
|
<Search isPublic={true} repoID={repoID} onSearchedClick={onSearchedClick} placeholder={gettext('Search files')}/>
|
||||||
)}
|
)} */}
|
||||||
</div>
|
</div>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
}
|
}
|
||||||
@@ -108,9 +105,9 @@ class MainPanel extends Component {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="common-toolbar">
|
<div className="common-toolbar">
|
||||||
{isPro && (
|
{/* {isPro && (
|
||||||
<Search isPublic={true} repoID={repoID} onSearchedClick={onSearchedClick} placeholder={gettext('Search files')}/>
|
<Search isPublic={true} repoID={repoID} onSearchedClick={onSearchedClick} placeholder={gettext('Search files')}/>
|
||||||
)}
|
)} */}
|
||||||
<Notification />
|
<Notification />
|
||||||
<Account />
|
<Account />
|
||||||
</div>
|
</div>
|
||||||
@@ -145,13 +142,6 @@ class MainPanel extends Component {
|
|||||||
onLinkClick={this.props.onLinkClick}
|
onLinkClick={this.props.onLinkClick}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{(!this.props.isDataLoading && !this.props.isViewFile) && (
|
|
||||||
<WikiDirListView
|
|
||||||
path={this.props.path}
|
|
||||||
direntList={this.props.direntList}
|
|
||||||
onDirentClick={this.props.onDirentClick}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import deepCopy from 'deep-copy';
|
import deepCopy from 'deep-copy';
|
||||||
import { gettext, siteRoot, repoID, username, permission, isEditWiki } from '../../utils/constants';
|
import { gettext, repoID, isEditWiki } from '../../utils/constants';
|
||||||
import toaster from '../../components/toast';
|
import toaster from '../../components/toast';
|
||||||
import Loading from '../../components/loading';
|
import Loading from '../../components/loading';
|
||||||
// import TreeView from '../../components/tree-view/tree-view';
|
// import TreeView from '../../components/tree-view/tree-view';
|
||||||
@@ -100,7 +100,7 @@ class SidePanel extends Component {
|
|||||||
const { pages, navigation } = config;
|
const { pages, navigation } = config;
|
||||||
const index = PageUtils.getPageIndexById(pageId, pages);
|
const index = PageUtils.getPageIndexById(pageId, pages);
|
||||||
const pageIndex = pages.findIndex(item => item.id === pageId);
|
const pageIndex = pages.findIndex(item => item.id === pageId);
|
||||||
let path = pages[pageIndex].path
|
let path = pages[pageIndex].path;
|
||||||
|
|
||||||
config.pages.splice(index, 1);
|
config.pages.splice(index, 1);
|
||||||
PageUtils.deletePage(navigation, pageId);
|
PageUtils.deletePage(navigation, pageId);
|
||||||
@@ -395,17 +395,10 @@ class SidePanel extends Component {
|
|||||||
<div className={`side-panel wiki-side-panel ${this.props.closeSideBar ? '': 'left-zero'}`}>
|
<div className={`side-panel wiki-side-panel ${this.props.closeSideBar ? '': 'left-zero'}`}>
|
||||||
<div className="side-panel-top panel-top">
|
<div className="side-panel-top panel-top">
|
||||||
{src && <img src={src} width="32" height="32" alt='' className='mr-2' />}
|
{src && <img src={src} width="32" height="32" alt='' className='mr-2' />}
|
||||||
<h4 className="ml-0 mb-0">{wiki_name}</h4>
|
<h4 className="ml-0 mb-0 text-truncate" title={wiki_name}>{wiki_name}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div id="side-nav" className="wiki-side-nav" role="navigation">
|
<div id="side-nav" className="wiki-side-nav" role="navigation">
|
||||||
{this.renderContent() }
|
{this.renderContent() }
|
||||||
{(username && permission) && (
|
|
||||||
<div className="text-left p-2">
|
|
||||||
<a href={siteRoot + 'library/' + repoID + '/'} className="text-dark text-decoration-underline">
|
|
||||||
{gettext('Go to Library')}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extra_style %}
|
{% block extra_style %}
|
||||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seafile-editor-font/seafile-editor-font.css" />
|
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seafile-editor-font/seafile-editor-font.css" />
|
||||||
{% render_bundle 'wiki' 'css' %}
|
{% render_bundle 'wiki2' 'css' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block wiki_title %} {{h1_head_content}} - {{repo_name}}{% endblock %}
|
{% block wiki_title %} {{h1_head_content}} - {{repo_name}}{% endblock %}
|
||||||
|
Reference in New Issue
Block a user