1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 19:37:28 +00:00

optimize code (#7306)

This commit is contained in:
杨顺强
2025-01-04 14:45:10 +08:00
committed by GitHub
parent 1a42eafbe6
commit 4088771757
7 changed files with 14 additions and 7 deletions

View File

@@ -16,7 +16,7 @@
"@gatsbyjs/reach-router": "1.3.9",
"@seafile/react-image-lightbox": "3.0.4",
"@seafile/resumablejs": "1.1.16",
"@seafile/sdoc-editor": "1.0.192",
"@seafile/sdoc-editor": "1.0.193",
"@seafile/seafile-calendar": "0.0.28",
"@seafile/seafile-editor": "1.0.133",
"@seafile/sf-metadata-ui-component": "^0.0.62",
@@ -5080,9 +5080,9 @@
"license": "MIT"
},
"node_modules/@seafile/sdoc-editor": {
"version": "1.0.192",
"resolved": "https://registry.npmjs.org/@seafile/sdoc-editor/-/sdoc-editor-1.0.192.tgz",
"integrity": "sha512-jn+LBrjiJhpg0XYwdRiA2a1EIfii/Lk66zIX9IVMS0ssEGlv5/zMvfoemwNP1KRCRx6Ecq3gF+VchWsU+iqVnQ==",
"version": "1.0.193",
"resolved": "https://registry.npmjs.org/@seafile/sdoc-editor/-/sdoc-editor-1.0.193.tgz",
"integrity": "sha512-/zbJLnA5Pd8SRdC/ANw4zGv67J0Yex6cDCj+UtblvXyJ6VA28QbayyH981uB80fBjS4T4+xNwUtYij79JGPN/A==",
"dependencies": {
"@seafile/print-js": "1.6.6",
"@seafile/react-image-lightbox": "2.0.5",

View File

@@ -11,7 +11,7 @@
"@gatsbyjs/reach-router": "1.3.9",
"@seafile/react-image-lightbox": "3.0.4",
"@seafile/resumablejs": "1.1.16",
"@seafile/sdoc-editor": "1.0.192",
"@seafile/sdoc-editor": "1.0.193",
"@seafile/seafile-calendar": "0.0.28",
"@seafile/seafile-editor": "1.0.133",
"@seafile/sf-metadata-ui-component": "^0.0.62",

View File

@@ -90,6 +90,7 @@ export const ocmRemoteServers = window.app.pageOptions.ocmRemoteServers;
export const enableOCMViaWebdav = window.app.pageOptions.enableOCMViaWebdav;
export const enableSSOToThirdpartWebsite = window.app.pageOptions.enableSSOToThirdpartWebsite;
export const enableSeadoc = window.app.pageOptions.enableSeadoc;
export const enableSeafileAI = window.app.pageOptions.enableSeafileAI;
export const enableWhiteboard = window.app.pageOptions.enableWhiteboard;
export const enableMultipleOfficeSuite = window.app.pageOptions.enableMultipleOfficeSuite;

View File

@@ -16,7 +16,8 @@ const {
repoID, repoName, repoEncrypted, parentDir, filePerm,
docPath, docName, docUuid, seadocAccessToken, seadocServerUrl, assetsUrl,
isSdocRevision, isPublished, originFilename, revisionCreatedAt, originFileVersion,
originFilePath, originDocUuid, revisionId, isFreezed, mobileLogin, isRepoAdmin
originFilePath, originDocUuid, revisionId, isFreezed, mobileLogin, isRepoAdmin,
enableSeafileAI
} = window.app.pageOptions;
window.seafile = {
@@ -52,6 +53,7 @@ window.seafile = {
isFreezed,
isPro: isPro === 'True' ? true : false,
mobileLogin,
enableSeafileAI,
};
const repoInfo = { encrypted: repoEncrypted, permission: filePerm, is_admin: isRepoAdmin };

View File

@@ -25,7 +25,7 @@ from seahub.settings import SEAFILE_VERSION, SITE_DESCRIPTION, \
ENABLE_SEAFILE_DOCS, LOGIN_BG_IMAGE_PATH, THUMBNAIL_DEFAULT_SIZE, \
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
FILE_SERVER_ROOT, ENABLE_WHITEBOARD, ENABLE_SEAFILE_AI
from seahub.organizations.models import OrgAdminSettings
from seahub.organizations.settings import ORG_ENABLE_ADMIN_CUSTOM_LOGO
@@ -174,6 +174,7 @@ def base(request):
'about_dialog_custom_html': ABOUT_DIALOG_CUSTOM_HTML,
'enable_repo_auto_del': ENABLE_REPO_AUTO_DEL,
'enable_seadoc': ENABLE_SEADOC,
'enable_seafile_ai': ENABLE_SEAFILE_AI,
'enable_whiteboard': ENABLE_WHITEBOARD,
}

View File

@@ -917,6 +917,8 @@ SEADOC_PRIVATE_KEY = ''
SEADOC_SERVER_URL = 'http://127.0.0.1:7070'
FILE_CONVERTER_SERVER_URL = 'http://127.0.0.1:8888'
ENABLE_SEAFILE_AI = False
##########################
# Settings for tldraw #
##########################

View File

@@ -154,6 +154,7 @@
enableOnlyoffice: {% if enableOnlyoffice %} true {% else %} false {% endif %},
onlyofficeConverterExtensions: {% if onlyofficeConverterExtensions %} {{onlyofficeConverterExtensions|safe}} {% else %} null {% endif %},
enableSeadoc: {% if enable_seadoc %} true {% else %} false {% endif %},
enableSeafileAI: {% if enable_seafile_ai %} true {% else %} false {% endif %},
enableWhiteboard: {% if enable_whiteboard %} true {% else %} false {% endif %},
isOrgContext: {% if org is not None %} true {% else %} false {% endif %},
enableMetadataManagement: {% if enable_metadata_management %} true {% else %} false {% endif %},