mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 03:47:09 +00:00
optimize code (#7302)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { siteRoot, username, enableSeadoc, thumbnailDefaultSize, thumbnailSizeForOriginal, gettext, fileServerRoot, enableTldraw } from '../../utils/constants';
|
||||
import { siteRoot, username, enableSeadoc, thumbnailDefaultSize, thumbnailSizeForOriginal, gettext, fileServerRoot, enableWhiteboard } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import URLDecorator from '../../utils/url-decorator';
|
||||
@@ -747,7 +747,7 @@ class DirentGridView extends React.Component {
|
||||
NEW_WORD_FILE
|
||||
);
|
||||
|
||||
if (enableTldraw) {
|
||||
if (enableWhiteboard) {
|
||||
direntsContainerMenuList.push(NEW_TLDRAW_FILE);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
import { siteRoot, gettext, username, enableSeadoc, thumbnailSizeForOriginal, thumbnailDefaultSize, fileServerRoot, enableTldraw } from '../../utils/constants';
|
||||
import { siteRoot, gettext, username, enableSeadoc, thumbnailSizeForOriginal, thumbnailDefaultSize, fileServerRoot, enableWhiteboard } from '../../utils/constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import TextTranslation from '../../utils/text-translation';
|
||||
import URLDecorator from '../../utils/url-decorator';
|
||||
@@ -436,7 +436,7 @@ class DirentListView extends React.Component {
|
||||
NEW_WORD_FILE,
|
||||
);
|
||||
|
||||
if (enableTldraw) {
|
||||
if (enableWhiteboard) {
|
||||
direntsContainerMenuList.push(NEW_TLDRAW_FILE);
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { enableSeadoc, enableTldraw, gettext } from '../../utils/constants';
|
||||
import { enableSeadoc, enableWhiteboard, gettext } from '../../utils/constants';
|
||||
import ModalPortal from '../modal-portal';
|
||||
import CreateFolder from '../../components/dialog/create-folder-dialog';
|
||||
import CreateFile from '../../components/dialog/create-file-dialog';
|
||||
@@ -255,7 +255,7 @@ class DirOperationToolbar extends React.Component {
|
||||
{ 'text': gettext('New PowerPoint File'), 'onClick': this.onCreatePPTToggle },
|
||||
{ 'text': gettext('New Word File'), 'onClick': this.onCreateWordToggle },
|
||||
);
|
||||
if (enableTldraw) {
|
||||
if (enableWhiteboard) {
|
||||
newSubOpList.push({ 'text': gettext('New Whiteboard File'), 'onClick': this.onCreateTldrawToggle });
|
||||
}
|
||||
opList.push({
|
||||
|
@@ -90,7 +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 enableTldraw = window.app.pageOptions.enableTldraw;
|
||||
export const enableWhiteboard = window.app.pageOptions.enableWhiteboard;
|
||||
export const enableMultipleOfficeSuite = window.app.pageOptions.enableMultipleOfficeSuite;
|
||||
|
||||
export const curNoteMsg = window.app.pageOptions.curNoteMsg;
|
||||
|
@@ -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_TLDRAW
|
||||
FILE_SERVER_ROOT, ENABLE_WHITEBOARD
|
||||
|
||||
from seahub.organizations.models import OrgAdminSettings
|
||||
from seahub.organizations.settings import ORG_ENABLE_ADMIN_CUSTOM_LOGO
|
||||
@@ -174,7 +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_tldraw': ENABLE_TLDRAW,
|
||||
'enable_whiteboard': ENABLE_WHITEBOARD,
|
||||
}
|
||||
|
||||
if request.user.is_staff:
|
||||
|
@@ -921,7 +921,7 @@ FILE_CONVERTER_SERVER_URL = 'http://127.0.0.1:8888'
|
||||
# Settings for tldraw #
|
||||
##########################
|
||||
|
||||
ENABLE_TLDRAW = False
|
||||
ENABLE_WHITEBOARD = False
|
||||
|
||||
############################
|
||||
# Settings for Seahub Priv #
|
||||
|
@@ -154,7 +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 %},
|
||||
enableTldraw: {% if enable_tldraw %} 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 %},
|
||||
enableFileTags: {% if enable_file_tags %} true {% else %} false {% endif %},
|
||||
|
Reference in New Issue
Block a user