mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-23 12:27:48 +00:00
[dir view] added 'star/unstar' to the context menu of items in grid mode, and to the dropdown menu in the top toolbar for the single selected item; and other improments (#7776)
This commit is contained in:
@@ -491,7 +491,7 @@ export const Utils = {
|
||||
getFolderOperationList: function (isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
||||
|
||||
let list = [];
|
||||
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, PERMISSION, OPEN_VIA_CLIENT } = TextTranslation;
|
||||
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, PERMISSION, OPEN_VIA_CLIENT, STAR, UNSTAR } = TextTranslation;
|
||||
const permission = dirent.permission;
|
||||
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
|
||||
|
||||
@@ -533,6 +533,12 @@ export const Utils = {
|
||||
list.push(COPY);
|
||||
}
|
||||
|
||||
if (dirent.starred) {
|
||||
list.push(UNSTAR);
|
||||
} else {
|
||||
list.push(STAR);
|
||||
}
|
||||
|
||||
if (permission == 'rw') {
|
||||
if (folderPermEnabled && ((isRepoOwner && currentRepoInfo.has_been_shared_out) || currentRepoInfo.is_admin)) {
|
||||
list.push('Divider', PERMISSION);
|
||||
@@ -557,7 +563,8 @@ export const Utils = {
|
||||
const {
|
||||
SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, UNLOCK, LOCK, UNFREEZE_DOCUMENT, FREEZE_DOCUMENT,
|
||||
HISTORY, ACCESS_LOG, PROPERTIES, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT,
|
||||
CONVERT_AND_EXPORT, CONVERT_TO_MARKDOWN, CONVERT_TO_DOCX, EXPORT_DOCX, CONVERT_TO_SDOC, EXPORT_SDOC
|
||||
CONVERT_AND_EXPORT, CONVERT_TO_MARKDOWN, CONVERT_TO_DOCX, EXPORT_DOCX, CONVERT_TO_SDOC, EXPORT_SDOC,
|
||||
STAR, UNSTAR
|
||||
} = TextTranslation;
|
||||
const permission = dirent.permission;
|
||||
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
|
||||
@@ -612,6 +619,12 @@ export const Utils = {
|
||||
}
|
||||
}
|
||||
|
||||
if (dirent.starred) {
|
||||
list.push(UNSTAR);
|
||||
} else {
|
||||
list.push(STAR);
|
||||
}
|
||||
|
||||
if (permission == 'rw') {
|
||||
if (isPro) {
|
||||
if (dirent.is_locked) {
|
||||
|
Reference in New Issue
Block a user