mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 22:54:11 +00:00
button align (#3555)
This commit is contained in:
@@ -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) {
|
||||
|
@@ -22,14 +22,12 @@ class GroupsToolbar extends React.Component {
|
||||
return (
|
||||
<div className="main-panel-north border-left-show">
|
||||
<div className="cur-view-toolbar">
|
||||
<span title="Side Nav Menu" onClick={onShowSidePanel} className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none"></span>
|
||||
<div className="operation">
|
||||
<Button color="btn btn-secondary operation-item" onClick={this.props.toggleAddGroupModal}>
|
||||
<Button color="btn btn-secondary operation-item my-1" onClick={this.props.toggleAddGroupModal}>
|
||||
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('New Group')}
|
||||
</Button>
|
||||
</div>
|
||||
<span title="Side Nav Menu" onClick={onShowSidePanel}
|
||||
className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none">
|
||||
</span>
|
||||
</div>
|
||||
<CommonToolbar searchPlaceholder={this.props.searchPlaceholder} onSearchedClick={onSearchedClick}/>
|
||||
</div>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MediaQuery from 'react-responsive';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import WikiListItem from './wiki-list-item';
|
||||
|
||||
@@ -38,8 +39,14 @@ class WikiListView extends Component {
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="4%"></th>
|
||||
<th width="36%">{gettext('Name')}</th>
|
||||
<MediaQuery query="(min-width: 768px)">
|
||||
<th width="4%"></th>
|
||||
<th width="36%">{gettext('Name')}</th>
|
||||
</MediaQuery>
|
||||
<MediaQuery query="(max-width: 768px)">
|
||||
<th width="10%"></th>
|
||||
<th width="30%">{gettext('Name')}</th>
|
||||
</MediaQuery>
|
||||
<th width="25%">{gettext('Owner')}</th>
|
||||
<th width="25%">{gettext('Last Update')}</th>
|
||||
<th width="10%">{/* operation */}</th>
|
||||
|
Reference in New Issue
Block a user