mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 22:33:17 +00:00
@@ -26,16 +26,19 @@ class DirentMenu extends React.Component {
|
|||||||
const length = dirents.length;
|
const length = dirents.length;
|
||||||
let menuList = [];
|
let menuList = [];
|
||||||
if (length === 1) {
|
if (length === 1) {
|
||||||
if (dirents[0].type === 'dir') {
|
const dirent = dirents[0];
|
||||||
|
if (dirent.type === 'dir') {
|
||||||
menuList = ['Share'];
|
menuList = ['Share'];
|
||||||
} else if (dirents[0].type === 'file') {
|
} else if (dirent.type === 'file') {
|
||||||
if (dirents[0].is_locked) {
|
menuList = ['Share', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
|
||||||
menuList = ['Share', 'Unlock', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
|
if (isPro) {
|
||||||
} else {
|
if (dirent.is_locked) {
|
||||||
menuList = ['Share', 'Lock', 'Tags', 'Related Files', 'Divider', 'History', 'Details', 'Divider', 'Open via Client'];
|
if (dirent.locked_by_me || (dirent.lock_owner === 'OnlineOffice' && currentRepoInfo.permission === 'rw')) {
|
||||||
}
|
menuList.splice(1, 0, 'Unlock');
|
||||||
if (!(currentRepoInfo.is_admin && currentRepoInfo.permission === 'rw' || isRepoOwner)) {
|
}
|
||||||
menuList.splice(1, 1);
|
} else {
|
||||||
|
menuList.splice(1, 0, 'Lock');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@@ -41,7 +41,10 @@ class ReviewComments extends React.Component {
|
|||||||
commentsList: commentList
|
commentsList: commentList
|
||||||
});
|
});
|
||||||
if (scroll) {
|
if (scroll) {
|
||||||
this.refs.commentsList.scrollTo(0, 10000);
|
let that = this;
|
||||||
|
setTimeout(() => {
|
||||||
|
that.refs.commentsList.scrollTo(0, 10000);
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user