mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
repair file view bug
This commit is contained in:
@@ -142,7 +142,7 @@ class ShareToGroup extends React.Component {
|
||||
let path = this.props.itemPath;
|
||||
let repoID = this.props.repoID;
|
||||
if (this.props.isGroupOwnedRepo) {
|
||||
seafileAPI.deleteGroupOwnedRepoGroupShared(repoID, groupID).then(() => {
|
||||
seafileAPI.deleteGroupOwnedRepoSharedGroupItem(repoID, groupID).then(() => {
|
||||
this.setState({
|
||||
sharedItems: this.state.sharedItems.filter(item => { return item.group_info.id !== groupID; })
|
||||
});
|
||||
|
@@ -103,7 +103,7 @@ class ShareToUser extends React.Component {
|
||||
this.setState({errorMsg: errorMsg});
|
||||
}
|
||||
// todo modify api
|
||||
|
||||
|
||||
let items = res.data.success.map(item => {
|
||||
let sharedItem = {
|
||||
'user_info': { 'nickname': item.user_name, 'name': item.user_email},
|
||||
@@ -137,7 +137,7 @@ class ShareToUser extends React.Component {
|
||||
let path = this.props.itemPath;
|
||||
let repoID = this.props.repoID;
|
||||
if (this.props.isGroupOwnedRepo) {
|
||||
seafileAPI.deleteGroupOwnedRepoUserShared(repoID, username).then(res => {
|
||||
seafileAPI.deleteGroupOwnedRepoSharedUserItem(repoID, username).then(res => {
|
||||
this.setState({
|
||||
sharedItems: this.state.sharedItems.filter( item => { return item.user_info.name !== username; })
|
||||
});
|
||||
|
@@ -91,7 +91,7 @@ class DirView extends React.Component {
|
||||
window.history.pushState({url: fileUrl, path: direntPath}, direntPath, fileUrl);
|
||||
} else {
|
||||
const w=window.open('about:blank');
|
||||
const url = siteRoot + 'lib/' + this.state.repoID + '/file' + direntPath;
|
||||
const url = siteRoot + 'lib/' + this.state.repoID + '/file' + Utils.encodePath(direntPath);
|
||||
w.location.href = url;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user