mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 14:49:09 +00:00
add ENABLE_OCR, false by default
This commit is contained in:
@@ -17,7 +17,7 @@ import { useMetadataStatus } from '../../hooks';
|
||||
|
||||
import '../../css/lib-settings.css';
|
||||
|
||||
const { enableSeafileAI } = window.app.config;
|
||||
const { enableSeafileAI, enableOCR: enableSeafileOCR } = window.app.config;
|
||||
|
||||
const propTypes = {
|
||||
toggleDialog: PropTypes.func.isRequired,
|
||||
@@ -134,7 +134,7 @@ const LibSettingsDialog = ({ repoID, currentRepoInfo, toggleDialog, tab, showMig
|
||||
{gettext('Tags')}
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
{enableSeafileAI &&
|
||||
{enableSeafileAI && enableSeafileOCR &&
|
||||
<NavItem
|
||||
role="tab"
|
||||
aria-selected={activeTab === TAB.OCR_SETTING}
|
||||
|
@@ -26,7 +26,7 @@ from seahub.settings import SEAFILE_VERSION, SITE_DESCRIPTION, \
|
||||
CUSTOM_LOGIN_BG_PATH, ENABLE_SHARE_LINK_REPORT_ABUSE, \
|
||||
PRIVACY_POLICY_LINK, TERMS_OF_SERVICE_LINK, ENABLE_SEADOC, THUMBNAIL_SIZE_FOR_GRID, \
|
||||
FILE_SERVER_ROOT, ENABLE_WHITEBOARD, ENABLE_SEAFILE_AI, ENABLE_EXCALIDRAW, \
|
||||
NOTIFICATION_SERVER_URL
|
||||
NOTIFICATION_SERVER_URL, ENABLE_OCR
|
||||
|
||||
from seahub.organizations.models import OrgAdminSettings
|
||||
from seahub.organizations.settings import ORG_ENABLE_ADMIN_CUSTOM_LOGO
|
||||
@@ -184,6 +184,7 @@ def base(request):
|
||||
'enable_whiteboard': ENABLE_WHITEBOARD,
|
||||
'enable_excalidraw': ENABLE_EXCALIDRAW,
|
||||
'notification_server_url': NOTIFICATION_SERVER_URL,
|
||||
'enable_ocr': ENABLE_OCR,
|
||||
}
|
||||
|
||||
if request.user.is_staff:
|
||||
|
@@ -1070,6 +1070,7 @@ SEAFILE_AI_SERVER_URL = ''
|
||||
SEAFILE_AI_SECRET_KEY = ''
|
||||
|
||||
ENABLE_SEAFILE_AI = False
|
||||
ENABLE_OCR = False
|
||||
|
||||
d = os.path.dirname
|
||||
EVENTS_CONFIG_FILE = os.environ.get(
|
||||
|
@@ -58,6 +58,7 @@
|
||||
cloudMode: {% if cloud_mode %} true {% else %} false {% endif %},
|
||||
isOrgContext: {% if org is not None %} true {% else %} false {% endif %},
|
||||
enableSeafileAI: {% if enable_seafile_ai %} true {% else %} false {% endif %},
|
||||
enableOCR: {% if enable_ocr %} true {% else %} false {% endif %},
|
||||
notificationServerUrl: '{{ notification_server_url }}'
|
||||
},
|
||||
pageOptions: {
|
||||
|
Reference in New Issue
Block a user