1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 13:24:52 +00:00

repair bug

This commit is contained in:
shanshuirenjia
2019-04-18 18:02:40 +08:00
parent 24b10652ac
commit c30aac483a
2 changed files with 7 additions and 1 deletions

View File

@@ -144,6 +144,12 @@ class TreeView extends React.Component {
return; return;
} }
let currentRepoInfo = this.props.currentRepoInfo;
if (currentRepoInfo.permission === 'cloud-edit' || currentRepoInfo.permission === 'preview') {
return '';
}
let x = event.clientX || (event.touches && event.touches[0].pageX); let x = event.clientX || (event.touches && event.touches[0].pageX);
let y = event.clientY || (event.touches && event.touches[0].pageY); let y = event.clientY || (event.touches && event.touches[0].pageY);

View File

@@ -352,7 +352,7 @@ class LibContentView extends React.Component {
seafileAPI.getFileContent(res.data).then((res) => { seafileAPI.getFileContent(res.data).then((res) => {
this.setState({ this.setState({
content: res.data, content: res.data,
filePermission: permission === 'rw', filePermission: permission === 'rw' || permission === 'cloud-edit',
latestContributor: last_modifier_name, latestContributor: last_modifier_name,
lastModified: moment.unix(mtime).fromNow(), lastModified: moment.unix(mtime).fromNow(),
isFileLoading: false, isFileLoading: false,