mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 06:11:16 +00:00
modify table css (#2537)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
@@ -45,7 +45,6 @@ class DetailListView extends React.Component {
|
|||||||
let position = this.getDirentPostion();
|
let position = this.getDirentPostion();
|
||||||
if (direntType === 'dir') {
|
if (direntType === 'dir') {
|
||||||
return (
|
return (
|
||||||
<div className="dirent-table-container">
|
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><th width="35%"></th><td width="65%"></td></tr>
|
<tr><th width="35%"></th><td width="65%"></td></tr>
|
||||||
@@ -56,11 +55,10 @@ class DetailListView extends React.Component {
|
|||||||
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.mtime).format('YYYY-MM-DD')}</td></tr>
|
<tr><th>{gettext('Last Update')}</th><td>{moment(direntDetail.mtime).format('YYYY-MM-DD')}</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<div className="dirent-table-container">
|
<Fragment>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><th width="35%"></th><td width="65%"></td></tr>
|
<tr><th width="35%"></th><td width="65%"></td></tr>
|
||||||
@@ -93,7 +91,7 @@ class DetailListView extends React.Component {
|
|||||||
onFileTagChanged={this.props.onFileTagChanged}
|
onFileTagChanged={this.props.onFileTagChanged}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -81,6 +81,7 @@ class DirentDetail extends React.Component {
|
|||||||
<img src={dirent.type === 'dir' ? serviceUrl + '/media/img/folder-192.png' : serviceUrl + '/media/img/file/192/txt.png'} alt="icon"></img>
|
<img src={dirent.type === 'dir' ? serviceUrl + '/media/img/folder-192.png' : serviceUrl + '/media/img/file/192/txt.png'} alt="icon"></img>
|
||||||
</div>
|
</div>
|
||||||
{this.state.direntDetail &&
|
{this.state.direntDetail &&
|
||||||
|
<div className="dirent-table-container">
|
||||||
<DetailListView
|
<DetailListView
|
||||||
repo={this.state.repo}
|
repo={this.state.repo}
|
||||||
direntPath={this.props.direntPath}
|
direntPath={this.props.direntPath}
|
||||||
@@ -89,6 +90,7 @@ class DirentDetail extends React.Component {
|
|||||||
fileTagList={this.state.fileTagList}
|
fileTagList={this.state.fileTagList}
|
||||||
onFileTagChanged={this.props.onFileTagChanged}
|
onFileTagChanged={this.props.onFileTagChanged}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext, repoID } from '../../utils/constants';
|
import { gettext, repoID } from '../../utils/constants';
|
||||||
import URLDecorator from '../../utils/url-decorator';
|
import URLDecorator from '../../utils/url-decorator';
|
||||||
@@ -140,7 +140,7 @@ class DirentListView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="table-container">
|
<Fragment>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -202,7 +202,7 @@ class DirentListView extends React.Component {
|
|||||||
onCancelCopy={this.onCancelCopy}
|
onCancelCopy={this.onCancelCopy}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,7 +14,6 @@ class DraftListView extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
let drafts = this.props.draftList;
|
let drafts = this.props.draftList;
|
||||||
return (
|
return (
|
||||||
<div className="table-container">
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -39,7 +38,6 @@ class DraftListView extends React.Component {
|
|||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Nav, NavItem, NavLink } from 'reactstrap';
|
import { Nav, NavItem, NavLink } from 'reactstrap';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
@@ -26,7 +26,7 @@ class ReviewListView extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
let items = this.props.itemsList;
|
let items = this.props.itemsList;
|
||||||
return (
|
return (
|
||||||
<div className="table-container">
|
<Fragment>
|
||||||
<Nav tabs>
|
<Nav tabs>
|
||||||
<NavItem>
|
<NavItem>
|
||||||
<NavLink
|
<NavLink
|
||||||
@@ -76,7 +76,7 @@ class ReviewListView extends React.Component {
|
|||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,6 @@ class TreeDirView extends React.Component {
|
|||||||
let children = node.hasChildren() ? node.children : null;
|
let children = node.hasChildren() ? node.children : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="table-container">
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -33,7 +32,6 @@ class TreeDirView extends React.Component {
|
|||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -95,7 +95,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cur-view-content {
|
.cur-view-content {
|
||||||
padding: 0;
|
padding: 0.625rem 1rem 1.25rem;
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
.sf-resumable-input-container {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sf-resumable-input-container .resumable-input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sf-resumable-input-container .input-placeholder {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
@@ -58,7 +58,7 @@ img[src=""] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cur-view-content .markdown-container{
|
.cur-view-content .markdown-container{
|
||||||
padding: 10px 40px 20px;
|
padding: 0 1.5rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@@ -71,7 +71,7 @@ img[src=""] {
|
|||||||
|
|
||||||
.cur-view-content .markdown-outline {
|
.cur-view-content .markdown-outline {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
padding-right: 18px;
|
padding-right: 1rem;
|
||||||
top: 97px;
|
top: 97px;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
@@ -84,7 +84,7 @@ img[src=""] {
|
|||||||
|
|
||||||
@media (max-width: 991.98px) {
|
@media (max-width: 991.98px) {
|
||||||
.cur-view-content .markdown-container {
|
.cur-view-content .markdown-container {
|
||||||
padding-right: 40px;
|
padding-right: 1.5rem;
|
||||||
}
|
}
|
||||||
.cur-view-content .markdown-content {
|
.cur-view-content .markdown-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@@ -38,7 +38,7 @@ class Content extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<table className="table table-hover table-vcenter">
|
<table>
|
||||||
{window.innerWidth >= 768 ? desktopThead : mobileThead}
|
{window.innerWidth >= 768 ? desktopThead : mobileThead}
|
||||||
<TableBody items={items} />
|
<TableBody items={items} />
|
||||||
</table>
|
</table>
|
||||||
@@ -201,11 +201,9 @@ class LinkedDevices extends Component {
|
|||||||
<h3 className="sf-heading">{gettext('Linked Devices')}</h3>
|
<h3 className="sf-heading">{gettext('Linked Devices')}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
<div className="table-container">
|
|
||||||
<Content data={this.state} />
|
<Content data={this.state} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ class Content extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<table className="table table-hover table-vcenter">
|
<table>
|
||||||
{window.innerWidth >= 768 ? desktopThead : mobileThead}
|
{window.innerWidth >= 768 ? desktopThead : mobileThead}
|
||||||
<TableBody items={items} />
|
<TableBody items={items} />
|
||||||
</table>
|
</table>
|
||||||
@@ -267,11 +267,9 @@ class Starred extends Component {
|
|||||||
<h3 className="sf-heading">{gettext('Favorites')}</h3>
|
<h3 className="sf-heading">{gettext('Favorites')}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="cur-view-content">
|
<div className="cur-view-content">
|
||||||
<div className="table-container">
|
|
||||||
<Content data={this.state} />
|
<Content data={this.state} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -752,7 +752,7 @@ a.op-icon:focus {
|
|||||||
|
|
||||||
/* begin path navigation */
|
/* begin path navigation */
|
||||||
.path-containter { /* for the real path */
|
.path-containter { /* for the real path */
|
||||||
font-size:16px;
|
font-size: 1rem;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.path-split {
|
.path-split {
|
||||||
@@ -771,46 +771,53 @@ a.op-icon:focus {
|
|||||||
/* end path navigation */
|
/* end path navigation */
|
||||||
|
|
||||||
/* begin main table list style */
|
/* begin main table list style */
|
||||||
.table-container {
|
table {
|
||||||
flex: 1;
|
|
||||||
padding: 10px 16px 20px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.table-container table {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
}
|
}
|
||||||
.table-container table th {
|
table th, table td {
|
||||||
|
padding: 5px 3px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
table th {
|
||||||
|
padding-top: 1rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: #9c9c9c;
|
color: #9c9c9c;
|
||||||
}
|
}
|
||||||
.table-container table td {
|
table td {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.table-container table th, .table-container table td {
|
|
||||||
padding: 5px 3px;
|
table .select,
|
||||||
border-bottom: 1px solid #eee;
|
table .star,
|
||||||
}
|
table .icon {
|
||||||
.table-container table th {
|
|
||||||
padding-top: 1rem;
|
|
||||||
}
|
|
||||||
.table-container table .select,
|
|
||||||
.table-container table .star,
|
|
||||||
.table-container table .icon {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table .star {
|
table .icon img {
|
||||||
|
width: 1.5rem;
|
||||||
|
height: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
table .dir-icon {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
table .star {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table .rename-container input {
|
table .star .empty {
|
||||||
|
color: #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table .rename-container input {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
padding: 2px 3px;
|
padding: 2px 3px;
|
||||||
width: 16.25rem;
|
width: 16.25rem;
|
||||||
@@ -822,14 +829,14 @@ a.op-icon:focus {
|
|||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table .rename-container input:focus {
|
table .rename-container input:focus {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-color: #1991eb;
|
border-color: #1991eb;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
|
box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table .rename-container button {
|
table .rename-container button {
|
||||||
margin-left: 0.25rem;
|
margin-left: 0.25rem;
|
||||||
padding: 5px 6px;
|
padding: 5px 6px;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
@@ -838,25 +845,11 @@ a.op-icon:focus {
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table .rename-container .confirm {
|
table .rename-container .confirm {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table .dir-icon .locked {
|
||||||
.table-container table .star .empty {
|
|
||||||
color: #d0d0d0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container table .icon img {
|
|
||||||
width: 1.5rem;
|
|
||||||
height: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container table .dir-icon {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-container table .dir-icon .locked {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
@@ -864,14 +857,14 @@ a.op-icon:focus {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-container table .menu-toggle {
|
table .menu-toggle {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tr-highlight {
|
.tr-highlight {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end table list style */
|
/* end table list style */
|
||||||
|
|
||||||
/* begin dropdown-menu style */
|
/* begin dropdown-menu style */
|
||||||
|
Reference in New Issue
Block a user