mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
unfreeze sdoc (#6016)
This commit is contained in:
@@ -154,6 +154,9 @@ class DirentGridView extends React.Component {
|
|||||||
case 'Copy':
|
case 'Copy':
|
||||||
this.onItemCopyToggle();
|
this.onItemCopyToggle();
|
||||||
break;
|
break;
|
||||||
|
case 'Unfreeze Document':
|
||||||
|
this.onUnlockItem(currentObject);
|
||||||
|
break;
|
||||||
case 'Freeze Document':
|
case 'Freeze Document':
|
||||||
this.onFreezeDocument(currentObject);
|
this.onFreezeDocument(currentObject);
|
||||||
break;
|
break;
|
||||||
|
@@ -280,6 +280,9 @@ class DirentListItem extends React.Component {
|
|||||||
case 'Lock':
|
case 'Lock':
|
||||||
this.onLockItem();
|
this.onLockItem();
|
||||||
break;
|
break;
|
||||||
|
case 'Unfreeze Document':
|
||||||
|
this.onUnlockItem();
|
||||||
|
break;
|
||||||
case 'Freeze Document':
|
case 'Freeze Document':
|
||||||
this.onFreezeDocument();
|
this.onFreezeDocument();
|
||||||
break;
|
break;
|
||||||
|
@@ -21,8 +21,9 @@ const TextTranslation = {
|
|||||||
'DETAILS' : {key : 'Details', value : gettext('Details')},
|
'DETAILS' : {key : 'Details', value : gettext('Details')},
|
||||||
'OPEN_VIA_CLIENT' : {key : 'Open via Client', value : gettext('Open via Client')},
|
'OPEN_VIA_CLIENT' : {key : 'Open via Client', value : gettext('Open via Client')},
|
||||||
'LOCK' : {key : 'Lock', value : gettext('Lock')},
|
'LOCK' : {key : 'Lock', value : gettext('Lock')},
|
||||||
'FREEZE_DOCUMENT' : {key : 'Freeze Document', value : gettext('Freeze Document')},
|
|
||||||
'UNLOCK' : {key : 'Unlock', value : gettext('Unlock')},
|
'UNLOCK' : {key : 'Unlock', value : gettext('Unlock')},
|
||||||
|
'FREEZE_DOCUMENT' : {key : 'Freeze Document', value : gettext('Freeze Document')},
|
||||||
|
'UNFREEZE_DOCUMENT' : {key : 'Unfreeze Document', value : gettext('Unfreeze Document')},
|
||||||
'CONVERT_TO_MARKDOWN' : {key : 'Convert to Markdown', value : gettext('Convert to Markdown')},
|
'CONVERT_TO_MARKDOWN' : {key : 'Convert to Markdown', value : gettext('Convert to Markdown')},
|
||||||
'CONVERT_TO_SDOC' : {key : 'Convert to sdoc', value : gettext('Convert to sdoc')},
|
'CONVERT_TO_SDOC' : {key : 'Convert to sdoc', value : gettext('Convert to sdoc')},
|
||||||
'CONVERT_TO_DOCX' : {key : 'Convert to docx', value : gettext('Convert to docx')},
|
'CONVERT_TO_DOCX' : {key : 'Convert to docx', value : gettext('Convert to docx')},
|
||||||
|
@@ -530,7 +530,7 @@ export const Utils = {
|
|||||||
|
|
||||||
getFileOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
getFileOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
||||||
let list = [];
|
let list = [];
|
||||||
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, TAGS, UNLOCK, LOCK, FREEZE_DOCUMENT,
|
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, TAGS, UNLOCK, LOCK, UNFREEZE_DOCUMENT, FREEZE_DOCUMENT,
|
||||||
HISTORY, ACCESS_LOG, PROPERTIES, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT, CONVERT_TO_MARKDOWN, CONVERT_TO_DOCX, EXPORT_DOCX, CONVERT_TO_SDOC } = TextTranslation;
|
HISTORY, ACCESS_LOG, PROPERTIES, OPEN_VIA_CLIENT, ONLYOFFICE_CONVERT, CONVERT_TO_MARKDOWN, CONVERT_TO_DOCX, EXPORT_DOCX, CONVERT_TO_SDOC } = TextTranslation;
|
||||||
const permission = dirent.permission;
|
const permission = dirent.permission;
|
||||||
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
|
const { isCustomPermission, customPermission } = Utils.getUserPermission(permission);
|
||||||
@@ -590,8 +590,10 @@ export const Utils = {
|
|||||||
if (isPro) {
|
if (isPro) {
|
||||||
if (dirent.is_locked) {
|
if (dirent.is_locked) {
|
||||||
if (dirent.locked_by_me || dirent.lock_owner == 'OnlineOffice' || isRepoOwner || currentRepoInfo.is_admin) {
|
if (dirent.locked_by_me || dirent.lock_owner == 'OnlineOffice' || isRepoOwner || currentRepoInfo.is_admin) {
|
||||||
|
if (!dirent.name.endsWith('.sdoc')) {
|
||||||
list.push(UNLOCK);
|
list.push(UNLOCK);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!dirent.name.endsWith('.sdoc')) {
|
if (!dirent.name.endsWith('.sdoc')) {
|
||||||
list.push(LOCK);
|
list.push(LOCK);
|
||||||
@@ -604,6 +606,9 @@ export const Utils = {
|
|||||||
if (isPro && !dirent.is_locked && dirent.name.endsWith('.sdoc')) {
|
if (isPro && !dirent.is_locked && dirent.name.endsWith('.sdoc')) {
|
||||||
list.push(FREEZE_DOCUMENT);
|
list.push(FREEZE_DOCUMENT);
|
||||||
}
|
}
|
||||||
|
if (isPro && dirent.is_locked && dirent.name.endsWith('.sdoc')) {
|
||||||
|
list.push(UNFREEZE_DOCUMENT);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user