mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
add dtable_web settings (#4131)
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from '@reach/router';
|
import { Link } from '@reach/router';
|
||||||
import { Badge } from 'reactstrap';
|
import { Badge } from 'reactstrap';
|
||||||
import { gettext, siteRoot, enableWiki, canAddRepo, canGenerateShareLink, canGenerateUploadLink, canInvitePeople } from '../utils/constants';
|
import { gettext, siteRoot, enableWiki, canAddRepo, canGenerateShareLink, canGenerateUploadLink, canInvitePeople, dtableWebServer } from '../utils/constants';
|
||||||
import { seafileAPI } from '../utils/seafile-api';
|
import { seafileAPI } from '../utils/seafile-api';
|
||||||
import { Utils } from '../utils/utils';
|
import { Utils } from '../utils/utils';
|
||||||
import toaster from './toast';
|
import toaster from './toast';
|
||||||
@@ -78,7 +78,7 @@ class MainSideNav extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onDTableClick = () => {
|
onDTableClick = () => {
|
||||||
let url = siteRoot + 'dtable/'
|
let url = dtableWebServer;
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ export const faviconPath = window.app.config.faviconPath;
|
|||||||
export const loginBGPath = window.app.config.loginBGPath;
|
export const loginBGPath = window.app.config.loginBGPath;
|
||||||
|
|
||||||
//pageOptions
|
//pageOptions
|
||||||
|
export const dtableWebServer = window.app.pageOptions.dtableWebServer;
|
||||||
export const seafileCollabServer = window.app.pageOptions.seafileCollabServer;
|
export const seafileCollabServer = window.app.pageOptions.seafileCollabServer;
|
||||||
export const name = window.app.pageOptions.name;
|
export const name = window.app.pageOptions.name;
|
||||||
export const contactEmail = window.app.pageOptions.contactEmail;
|
export const contactEmail = window.app.pageOptions.contactEmail;
|
||||||
|
@@ -722,6 +722,12 @@ ENABLE_SUB_LIBRARY = True
|
|||||||
|
|
||||||
SEAFILE_COLLAB_SERVER = ''
|
SEAFILE_COLLAB_SERVER = ''
|
||||||
|
|
||||||
|
##########################
|
||||||
|
# Settings for dtable web #
|
||||||
|
##########################
|
||||||
|
|
||||||
|
DTABLE_WEB_SERVER = ''
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# Settings for dtable #
|
# Settings for dtable #
|
||||||
##########################
|
##########################
|
||||||
|
@@ -49,6 +49,7 @@
|
|||||||
},
|
},
|
||||||
pageOptions: {
|
pageOptions: {
|
||||||
csrfToken: "{{ csrf_token }}",
|
csrfToken: "{{ csrf_token }}",
|
||||||
|
dtableWebServer: "{{dtable_web_server}}",
|
||||||
seafileCollabServer: '{{seafile_collab_server}}',
|
seafileCollabServer: '{{seafile_collab_server}}',
|
||||||
name: "{{request.user.username|email2nickname|escapejs}}",
|
name: "{{request.user.username|email2nickname|escapejs}}",
|
||||||
contactEmail: "{{request.user.username|email2contact_email|escapejs}}",
|
contactEmail: "{{request.user.username|email2contact_email|escapejs}}",
|
||||||
|
@@ -56,7 +56,8 @@ from seahub.settings import AVATAR_FILE_STORAGE, \
|
|||||||
ENABLE_SUB_LIBRARY, ENABLE_FOLDER_PERM, ENABLE_REPO_SNAPSHOT_LABEL, \
|
ENABLE_SUB_LIBRARY, ENABLE_FOLDER_PERM, ENABLE_REPO_SNAPSHOT_LABEL, \
|
||||||
UNREAD_NOTIFICATIONS_REQUEST_INTERVAL, SHARE_LINK_EXPIRE_DAYS_MIN, \
|
UNREAD_NOTIFICATIONS_REQUEST_INTERVAL, SHARE_LINK_EXPIRE_DAYS_MIN, \
|
||||||
SHARE_LINK_EXPIRE_DAYS_MAX, SHARE_LINK_EXPIRE_DAYS_DEFAULT, \
|
SHARE_LINK_EXPIRE_DAYS_MAX, SHARE_LINK_EXPIRE_DAYS_DEFAULT, \
|
||||||
SEAFILE_COLLAB_SERVER, ENABLE_RESET_ENCRYPTED_REPO_PASSWORD
|
SEAFILE_COLLAB_SERVER, ENABLE_RESET_ENCRYPTED_REPO_PASSWORD, \
|
||||||
|
DTABLE_WEB_SERVER
|
||||||
|
|
||||||
from seahub.wopi.settings import ENABLE_OFFICE_WEB_APP
|
from seahub.wopi.settings import ENABLE_OFFICE_WEB_APP
|
||||||
from seahub.onlyoffice.settings import ENABLE_ONLYOFFICE
|
from seahub.onlyoffice.settings import ENABLE_ONLYOFFICE
|
||||||
@@ -1254,6 +1255,7 @@ def react_fake_view(request, **kwargs):
|
|||||||
folder_perm_enabled = True if is_pro_version() and ENABLE_FOLDER_PERM else False
|
folder_perm_enabled = True if is_pro_version() and ENABLE_FOLDER_PERM else False
|
||||||
|
|
||||||
return render(request, "react_app.html", {
|
return render(request, "react_app.html", {
|
||||||
|
'dtable_web_server': DTABLE_WEB_SERVER,
|
||||||
'seafile_collab_server': SEAFILE_COLLAB_SERVER,
|
'seafile_collab_server': SEAFILE_COLLAB_SERVER,
|
||||||
'storages': get_library_storages(request),
|
'storages': get_library_storages(request),
|
||||||
'enable_repo_snapshot_label': settings.ENABLE_REPO_SNAPSHOT_LABEL,
|
'enable_repo_snapshot_label': settings.ENABLE_REPO_SNAPSHOT_LABEL,
|
||||||
|
Reference in New Issue
Block a user