mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
Change share dialog (#4245)
* fix share dialog dropdown memu style * fix some warnings
This commit is contained in:
@@ -78,11 +78,11 @@ class AddAbuseReportDialog extends React.Component {
|
|||||||
</Input>
|
</Input>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label>{gettext("Contact Information")}</Label>
|
<Label>{gettext('Contact Information')}</Label>
|
||||||
<Input type="text" value={this.state.reporter} onChange={(event) => this.setReporter(event)}/>
|
<Input type="text" value={this.state.reporter} onChange={(event) => this.setReporter(event)}/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label>{gettext("Description")}</Label>
|
<Label>{gettext('Description')}</Label>
|
||||||
<Input type="textarea" onChange={(event) => this.setDescription(event)}/>
|
<Input type="textarea" onChange={(event) => this.setDescription(event)}/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Form>
|
</Form>
|
||||||
|
@@ -20,7 +20,7 @@ class UploadListItem extends React.Component {
|
|||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
uploadState: UPLOAD_UPLOADING
|
uploadState: UPLOAD_UPLOADING
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
@@ -49,7 +49,7 @@ class UploadListItem extends React.Component {
|
|||||||
|
|
||||||
onUploadRetry = (e) => {
|
onUploadRetry = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
this.props.onUploadRetry(this.props.resumableFile)
|
this.props.onUploadRetry(this.props.resumableFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
formatFileSize = (size) => {
|
formatFileSize = (size) => {
|
||||||
|
@@ -68,11 +68,11 @@ class MainSideNav extends React.Component {
|
|||||||
if (window.uploader &&
|
if (window.uploader &&
|
||||||
window.uploader.isUploadProgressDialogShow &&
|
window.uploader.isUploadProgressDialogShow &&
|
||||||
window.uploader.totalProgress !== 100) {
|
window.uploader.totalProgress !== 100) {
|
||||||
if (!window.confirm(gettext('A file is being uploaded. Are you sure you want to leave this page?'))) {
|
if (!window.confirm(gettext('A file is being uploaded. Are you sure you want to leave this page?'))) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
window.uploader.isUploadProgressDialogShow = false;
|
window.uploader.isUploadProgressDialogShow = false;
|
||||||
}
|
}
|
||||||
this.props.tabItemClick(param, id);
|
this.props.tabItemClick(param, id);
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
min-height: 27rem;
|
min-height: 27rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-dialog-content .share-dialog-side {
|
.share-dialog-content .share-dialog-side {
|
||||||
@@ -22,16 +21,17 @@
|
|||||||
flex: 0 0 78%;
|
flex: 0 0 78%;
|
||||||
padding: 1rem 1.5rem 2rem;
|
padding: 1rem 1.5rem 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-dialog-content .share-dialog-main .tab-content {
|
.share-dialog-content .share-dialog-main .tab-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-dialog-content .share-dialog-main .tab-pane {
|
.share-dialog-content .share-dialog-main .tab-pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-list-container {
|
.share-list-container {
|
||||||
max-height: 18rem;
|
max-height: 18rem;
|
||||||
overflow: auto;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ import LabelRepoStateDialog from '../../components/dialog/label-repo-state-dialo
|
|||||||
import LibSubFolderPermissionDialog from '../../components/dialog/lib-sub-folder-permission-dialog';
|
import LibSubFolderPermissionDialog from '../../components/dialog/lib-sub-folder-permission-dialog';
|
||||||
import Rename from '../../components/rename';
|
import Rename from '../../components/rename';
|
||||||
import MylibRepoMenu from './mylib-repo-menu';
|
import MylibRepoMenu from './mylib-repo-menu';
|
||||||
import RepoAPITokenDialog from "../../components/dialog/repo-api-token-dialog";
|
import RepoAPITokenDialog from '../../components/dialog/repo-api-token-dialog';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
repo: PropTypes.object.isRequired,
|
repo: PropTypes.object.isRequired,
|
||||||
@@ -119,9 +119,9 @@ class MylibRepoListItem extends React.Component {
|
|||||||
if (this.state.isStarred) {
|
if (this.state.isStarred) {
|
||||||
seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => {
|
seafileAPI.unstarItem(this.props.repo.repo_id, '/').then(() => {
|
||||||
this.setState({isStarred: !this.state.isStarred});
|
this.setState({isStarred: !this.state.isStarred});
|
||||||
const msg = gettext('Successfully unstarred {library_name_placeholder}.')
|
const msg = gettext('Successfully unstarred {library_name_placeholder}.')
|
||||||
.replace('{library_name_placeholder}', repoName);
|
.replace('{library_name_placeholder}', repoName);
|
||||||
toaster.success(msg);
|
toaster.success(msg);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
let errMessage = Utils.getErrorMsg(error);
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
toaster.danger(errMessage);
|
toaster.danger(errMessage);
|
||||||
@@ -129,9 +129,9 @@ class MylibRepoListItem extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
seafileAPI.starItem(this.props.repo.repo_id, '/').then(() => {
|
seafileAPI.starItem(this.props.repo.repo_id, '/').then(() => {
|
||||||
this.setState({isStarred: !this.state.isStarred});
|
this.setState({isStarred: !this.state.isStarred});
|
||||||
const msg = gettext('Successfully starred {library_name_placeholder}.')
|
const msg = gettext('Successfully starred {library_name_placeholder}.')
|
||||||
.replace('{library_name_placeholder}', repoName);
|
.replace('{library_name_placeholder}', repoName);
|
||||||
toaster.success(msg);
|
toaster.success(msg);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
let errMessage = Utils.getErrorMsg(error);
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
toaster.danger(errMessage);
|
toaster.danger(errMessage);
|
||||||
|
@@ -23,7 +23,7 @@ class Nav extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const { currentItem, email, userName } = this.props;
|
const { currentItem, email, userName } = this.props;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="cur-view-path">
|
<div className="cur-view-path">
|
||||||
<h3 className="sf-heading"><Link to={`${siteRoot}sys/users/`}>{gettext('Users')}</Link> / {userName}</h3>
|
<h3 className="sf-heading"><Link to={`${siteRoot}sys/users/`}>{gettext('Users')}</Link> / {userName}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user