mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 22:54:11 +00:00
fix mobile style (#3567)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import MediaQuery from 'react-responsive';
|
||||
import CommonToolbar from './common-toolbar';
|
||||
import { Button } from 'reactstrap';
|
||||
import { gettext } from '../../utils/constants';
|
||||
@@ -24,9 +25,16 @@ class GroupsToolbar extends React.Component {
|
||||
<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 my-1" onClick={this.props.toggleAddGroupModal}>
|
||||
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('New Group')}
|
||||
</Button>
|
||||
<MediaQuery query="(min-width: 768px)">
|
||||
<Button color="btn btn-secondary operation-item" onClick={this.props.toggleAddGroupModal}>
|
||||
<i className="fas fa-plus-square text-secondary mr-1"></i>{gettext('New Group')}
|
||||
</Button>
|
||||
</MediaQuery>
|
||||
<MediaQuery query="(max-width: 767.8px)">
|
||||
<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>
|
||||
</MediaQuery>
|
||||
</div>
|
||||
</div>
|
||||
<CommonToolbar searchPlaceholder={this.props.searchPlaceholder} onSearchedClick={onSearchedClick}/>
|
||||
|
@@ -234,9 +234,11 @@ class WikiMarkdownViewer extends React.Component {
|
||||
if (this.props.isFileLoading) {
|
||||
return <Loading />;
|
||||
}
|
||||
// In dir-column-file repoID is one of props, width is 100%; In wiki-viewer repoID is not props, width isn't 100%
|
||||
let contentClassName = `${this.props.repoID ? contentClass + ' w-100' : contentClass}`
|
||||
return (
|
||||
<div ref={this.markdownContainer} className="wiki-page-container" onScroll={this.onScrollHandler.bind(this)}>
|
||||
<div className={contentClass}>
|
||||
<div className={contentClassName}>
|
||||
{this.props.children}
|
||||
{this.renderMarkdown()}
|
||||
{this.props.isWiki && this.renderRelatedFiles()}
|
||||
|
Reference in New Issue
Block a user