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

button align (#3555)

This commit is contained in:
Michael An
2019-05-28 14:38:29 +08:00
committed by Daniel Pan
parent d03b8e58ab
commit b0ae1d7812
5 changed files with 16 additions and 11 deletions

View File

@@ -2,7 +2,6 @@ import React from 'react';
import PropTypes from 'prop-types';
import { repoID, slug, serviceURL, isPublicWiki } from '../utils/constants';
import { Utils } from '../utils/utils';
import { Value } from 'slate';
import { deserialize } from '@seafile/seafile-editor/dist/utils/slate2markdown';
import'../css/index-viewer.css';
@@ -176,7 +175,7 @@ class IndexContentViewer extends React.Component {
let treeNodes = slateNodes.map((slateNode) => {
// item has children(unordered list)
if (slateNode.nodes.length === 2 && (slateNode.nodes[1].type === 'unordered_list' || slateNode.nodes[1].type === 'ordered_list')) {
// slateNode.nodes[0] is paragraph, create TreeNode, set name and href
// slateNode.nodes[0] is paragraph, create TreeNode, set name and href
const paragraphNode = slateNode.nodes[0];
const treeNode = this.transParagraph(paragraphNode);
// slateNode.nodes[1] is list, set it as TreeNode's children
@@ -231,6 +230,7 @@ IndexContentViewer.propTypes = viewerPropTypes;
const FolderItemPropTypes = {
node: PropTypes.object.isRequired,
bindClickEvent: PropTypes.func.isRequired,
currentPath: PropTypes.string,
};
class FolderItem extends React.Component {
@@ -249,7 +249,7 @@ class FolderItem extends React.Component {
}
renderLink = (node) => {
const className = node.path === this.props.currentPath ? 'wiki-nav-content wiki-nav-content-highlight' : 'wiki-nav-content'
const className = node.path === this.props.currentPath ? 'wiki-nav-content wiki-nav-content-highlight' : 'wiki-nav-content';
if (node.href && node.name) {
return <div className={className}><a href={node.href} data-path={node.path}>{node.name}</a></div>;
} else if (node.name) {