diff --git a/frontend/src/components/dialog/image-dialog/index.js b/frontend/src/components/dialog/image-dialog/index.js
index 710fa44fba..e36e3c674d 100644
--- a/frontend/src/components/dialog/image-dialog/index.js
+++ b/frontend/src/components/dialog/image-dialog/index.js
@@ -5,7 +5,6 @@ import Lightbox from '@seafile/react-image-lightbox';
import { useMetadataAIOperations } from '../../../hooks/metadata-ai-operation';
import EmbeddedFileDetails from '../../dirent-detail/embedded-file-details';
import { SYSTEM_FOLDERS } from '../../../constants';
-import { Utils } from '../../../utils/utils';
import Icon from '../../icon';
import '@seafile/react-image-lightbox/style.css';
diff --git a/frontend/src/components/dialog/lib-settings.js b/frontend/src/components/dialog/lib-settings.js
index bc2b3e53c7..261622ae20 100644
--- a/frontend/src/components/dialog/lib-settings.js
+++ b/frontend/src/components/dialog/lib-settings.js
@@ -51,7 +51,6 @@ const LibSettingsDialog = ({ repoID, currentRepoInfo, toggleDialog, tab }) => {
const enableHistorySetting = is_admin; // repo owner, admin of the department which the repo belongs to, and ...
const enableAutoDelSetting = is_admin && enableRepoAutoDel;
const enableExtendedPropertiesSetting = !encrypted && is_admin && enableMetadataManagement;
- const enableMetadataOtherSettings = enableExtendedPropertiesSetting && enableMetadata;
return (
@@ -63,48 +62,98 @@ const LibSettingsDialog = ({ repoID, currentRepoInfo, toggleDialog, tab }) => {
@@ -134,17 +183,18 @@ const LibSettingsDialog = ({ repoID, currentRepoInfo, toggleDialog, tab }) => {
/>
)}
- {(enableMetadataOtherSettings && activeTab === TAB.FACE_RECOGNITION_SETTING) && (
+ {(enableExtendedPropertiesSetting && activeTab === TAB.FACE_RECOGNITION_SETTING) && (
)}
- {(enableMetadataOtherSettings && activeTab === TAB.TAGS_SETTING) && (
+ {(enableExtendedPropertiesSetting && activeTab === TAB.TAGS_SETTING) && (
{
lang={tagsLang}
submit={updateEnableTags}
toggleDialog={toggleDialog}
+ enableMetadata={enableMetadata}
/>
)}
- {(enableMetadataOtherSettings && activeTab === TAB.OCR_SETTING) && (
+ {(enableExtendedPropertiesSetting && activeTab === TAB.OCR_SETTING) && (
{
lang={tagsLang}
submit={updateEnableOCR}
toggleDialog={toggleDialog}
+ enableMetadata={enableMetadata}
/>
)}
diff --git a/frontend/src/components/switch/index.css b/frontend/src/components/switch/index.css
index 6bf17c2b39..e88d6284e6 100644
--- a/frontend/src/components/switch/index.css
+++ b/frontend/src/components/switch/index.css
@@ -9,10 +9,6 @@
cursor: pointer;
}
-.seahub-switch.small .custom-switch-indicator.disabled {
- cursor: default;
-}
-
.seahub-switch.small .custom-switch-indicator:before {
height: 8px;
width: 8px;
@@ -21,3 +17,8 @@
.seahub-switch.small .custom-switch-input:checked~.custom-switch-indicator:before {
left: 12px;
}
+
+.seahub-switch.disabled .custom-switch,
+.seahub-switch .custom-switch-indicator.disabled {
+ cursor: not-allowed;
+}
diff --git a/frontend/src/components/switch/index.js b/frontend/src/components/switch/index.js
index 499e33b7fb..9d02f65f3a 100644
--- a/frontend/src/components/switch/index.js
+++ b/frontend/src/components/switch/index.js
@@ -6,7 +6,7 @@ import './index.css';
function Switch({ onChange, checked, placeholder, disabled, className, size, textPosition = 'left', setRef }) {
return (
-
+