mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 01:41:39 +00:00
[dir view] redesigned 'tip for new file', supported mobile (#4034)
This commit is contained in:
@@ -5,7 +5,7 @@ import Loading from '../loading';
|
||||
import ModalPortal from '../modal-portal';
|
||||
import CreateFile from '../../components/dialog/create-file-dialog';
|
||||
|
||||
import '../../css/tip-for-new-md.css';
|
||||
import '../../css/tip-for-new-file.css';
|
||||
|
||||
const propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
@@ -53,24 +53,19 @@ class DirentNodeView extends React.Component {
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<div className="tip-for-new-file">
|
||||
<p className="text-center">{gettext('This folder has no content at this time.')}</p>
|
||||
<p className="text-center">{gettext('You can create files quickly')}{' +'}</p>
|
||||
<div className="big-new-file-button-group">
|
||||
<div className="d-flex justify-content-center">
|
||||
<div className="tip-for-new-file text-center">
|
||||
<p className="text-secondary">{gettext('This folder has no content at this time.')}</p>
|
||||
<p className="text-secondary">{gettext('You can create files quickly')}{' +'}</p>
|
||||
<button className="big-new-file-button" onClick={this.onCreateNewFile.bind(this, '.md')}>
|
||||
{'+ Markdown'}</button>
|
||||
<button className="big-new-file-button" onClick={this.onCreateNewFile.bind(this, '.pptx')}>
|
||||
{'+ PPT'}</button>
|
||||
</div>
|
||||
<div className="d-flex justify-content-center">
|
||||
<br />
|
||||
<button className="big-new-file-button" onClick={this.onCreateNewFile.bind(this, '.docx')}>
|
||||
{'+ Word'}</button>
|
||||
<button className="big-new-file-button" onClick={this.onCreateNewFile.bind(this, '.xlsx')}>
|
||||
{'+ Excel'}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{this.state.isCreateFileDialogShow && (
|
||||
<ModalPortal>
|
||||
<CreateFile
|
||||
|
@@ -1,23 +1,24 @@
|
||||
.tip-for-new-file {
|
||||
margin: 0 auto;
|
||||
padding: 5em 8em;
|
||||
padding: 2em 1em;
|
||||
align-self: flex-start; /* for repo wiki mode */
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.tip-for-new-file {
|
||||
padding: 5em 8em;
|
||||
}
|
||||
}
|
||||
.big-new-file-button {
|
||||
padding: .9em 2em 1em;
|
||||
border-radius: 8px;
|
||||
margin: 0 1.5em 1.5em 0;
|
||||
margin: 0 0.75em 1.5em;
|
||||
cursor: pointer;
|
||||
width: 160px;
|
||||
background: #fff;
|
||||
border: 1px solid #d1d1d1;
|
||||
}
|
||||
.big-new-file-button:hover,
|
||||
.big-new-file-button:focus {
|
||||
border-color: #eb9205;
|
||||
color: #eb8205;
|
||||
}
|
||||
.tip-for-new-file p {
|
||||
color: #c4c4c4;
|
||||
}
|
||||
.big-new-file-button-group {
|
||||
margin: 0 auto;
|
||||
}
|
Reference in New Issue
Block a user