mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
repair settings naming bug (#4510)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Modal, ModalBody } from 'reactstrap';
|
import { Modal, ModalBody } from 'reactstrap';
|
||||||
import { gettext, lang, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion, extraAboutDialogLinks } from '../../utils/constants';
|
import { gettext, lang, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion, additionalAboutDialogLinks } from '../../utils/constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
onCloseAboutDialog: PropTypes.func.isRequired,
|
onCloseAboutDialog: PropTypes.func.isRequired,
|
||||||
@@ -14,10 +14,10 @@ class AboutDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderExternalAboutLinks = () => {
|
renderExternalAboutLinks = () => {
|
||||||
if (extraAboutDialogLinks && (typeof extraAboutDialogLinks) === 'object') {
|
if (additionalAboutDialogLinks && (typeof additionalAboutDialogLinks) === 'object') {
|
||||||
let keys = Object.keys(extraAboutDialogLinks);
|
let keys = Object.keys(additionalAboutDialogLinks);
|
||||||
return keys.map((key, index) => {
|
return keys.map((key, index) => {
|
||||||
return <a key={index} className="d-block" href={extraAboutDialogLinks[key]}>{key}</a>;
|
return <a key={index} className="d-block" href={additionalAboutDialogLinks[key]}>{key}</a>;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
|
import { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
|
||||||
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, extraShareDialogNote } from '../../utils/constants';
|
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, additionalShareDialogNote } from '../../utils/constants';
|
||||||
import ShareToUser from './share-to-user';
|
import ShareToUser from './share-to-user';
|
||||||
import ShareToGroup from './share-to-group';
|
import ShareToGroup from './share-to-group';
|
||||||
import GenerateShareLink from './generate-share-link';
|
import GenerateShareLink from './generate-share-link';
|
||||||
@@ -208,11 +208,11 @@ class ShareDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderExternalShareMessage = () => {
|
renderExternalShareMessage = () => {
|
||||||
if (extraShareDialogNote && (typeof extraShareDialogNote) === 'object') {
|
if (additionalShareDialogNote && (typeof additionalShareDialogNote) === 'object') {
|
||||||
return (
|
return (
|
||||||
<div className="external-share-message mt-2">
|
<div className="external-share-message mt-2">
|
||||||
<h6>{extraShareDialogNote.title}</h6>
|
<h6>{additionalShareDialogNote.title}</h6>
|
||||||
<div style={{fontSize: '14px', color: '#666'}}>{extraShareDialogNote.content}</div>
|
<div style={{fontSize: '14px', color: '#666'}}>{additionalShareDialogNote.content}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import { gettext, siteRoot, sideNavFooterCustomHtml, extraAppBottomLinks } from '../utils/constants';
|
import { gettext, siteRoot, sideNavFooterCustomHtml, additionalAppBottomLinks } from '../utils/constants';
|
||||||
import ModalPortal from './modal-portal';
|
import ModalPortal from './modal-portal';
|
||||||
import AboutDialog from './dialog/about-dialog';
|
import AboutDialog from './dialog/about-dialog';
|
||||||
|
|
||||||
@@ -17,10 +17,10 @@ class SideNavFooter extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderExternalAppLinks = () => {
|
renderExternalAppLinks = () => {
|
||||||
if (extraAppBottomLinks && (typeof extraAppBottomLinks) === 'object') {
|
if (additionalAppBottomLinks && (typeof additionalAppBottomLinks) === 'object') {
|
||||||
let keys = Object.keys(extraAppBottomLinks);
|
let keys = Object.keys(additionalAppBottomLinks);
|
||||||
return keys.map((key, index) => {
|
return keys.map((key, index) => {
|
||||||
return <a key={index} className="item" href={extraAppBottomLinks[key]}>{key}</a>;
|
return <a key={index} className="item" href={additionalAppBottomLinks[key]}>{key}</a>;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@@ -37,7 +37,7 @@ class SideNavFooter extends React.Component {
|
|||||||
<a href={siteRoot + 'help/'} target="_blank" rel="noopener noreferrer" className="item">{gettext('Help')}</a>
|
<a href={siteRoot + 'help/'} target="_blank" rel="noopener noreferrer" className="item">{gettext('Help')}</a>
|
||||||
<a className="item cursor-pointer" onClick={this.onAboutDialogToggle}>{gettext('About')}</a>
|
<a className="item cursor-pointer" onClick={this.onAboutDialogToggle}>{gettext('About')}</a>
|
||||||
{this.renderExternalAppLinks()}
|
{this.renderExternalAppLinks()}
|
||||||
<a href={siteRoot + 'download_client_program/'} className={`item ${extraAppBottomLinks ? '' : 'last-item'}`}>
|
<a href={siteRoot + 'download_client_program/'} className={`item ${additionalAppBottomLinks ? '' : 'last-item'}`}>
|
||||||
<span aria-hidden="true" className="sf2-icon-monitor vam"></span>{' '}
|
<span aria-hidden="true" className="sf2-icon-monitor vam"></span>{' '}
|
||||||
<span className="vam">{gettext('Clients')}</span>
|
<span className="vam">{gettext('Clients')}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@@ -62,9 +62,9 @@ export const curNoteMsg = window.app.pageOptions.curNoteMsg;
|
|||||||
export const curNoteID = window.app.pageOptions.curNoteID;
|
export const curNoteID = window.app.pageOptions.curNoteID;
|
||||||
|
|
||||||
export const showLogoutIcon = window.app.pageOptions.showLogoutIcon;
|
export const showLogoutIcon = window.app.pageOptions.showLogoutIcon;
|
||||||
export const extraShareDialogNote = window.app.pageOptions.extraShareDialogNote;
|
export const additionalShareDialogNote = window.app.pageOptions.additionalShareDialogNote;
|
||||||
export const extraAppBottomLinks = window.app.pageOptions.extraAppBottomLinks;
|
export const additionalAppBottomLinks = window.app.pageOptions.additionalAppBottomLinks;
|
||||||
export const extraAboutDialogLinks = window.app.pageOptions.extraAboutDialogLinks;
|
export const additionalAboutDialogLinks = window.app.pageOptions.additionalAboutDialogLinks;
|
||||||
|
|
||||||
// wiki
|
// wiki
|
||||||
export const slug = window.wiki ? window.wiki.config.slug : '';
|
export const slug = window.wiki ? window.wiki.config.slug : '';
|
||||||
|
@@ -771,26 +771,26 @@ ENABLE_REPO_SNAPSHOT_LABEL = False
|
|||||||
ENABLE_REPO_WIKI_MODE = True
|
ENABLE_REPO_WIKI_MODE = True
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# HU berlin external#
|
# HU berlin additional #
|
||||||
############################
|
############################
|
||||||
|
|
||||||
# EXTRA_SHARE_DIALOG_NOTE = {
|
# ADDITIONAL_SHARE_DIALOG_NOTE = {
|
||||||
# 'title': 'Attention! Read before shareing files:',
|
# 'title': 'Attention! Read before shareing files:',
|
||||||
# 'content': 'Do not share personal or confidential official data with **.'
|
# 'content': 'Do not share personal or confidential official data with **.'
|
||||||
# }
|
# }
|
||||||
EXTRA_SHARE_DIALOG_NOTE = None
|
ADDITIONAL_SHARE_DIALOG_NOTE = None
|
||||||
|
|
||||||
# EXTRA_APP_BOTTOM_LINKS = {
|
# ADDITIONAL_APP_BOTTOM_LINKS = {
|
||||||
# 'seafile': 'http://dev.seahub.com/seahub',
|
# 'seafile': 'http://dev.seahub.com/seahub',
|
||||||
# 'dtable-web': 'http://dev.seahub.com/dtable-web'
|
# 'dtable-web': 'http://dev.seahub.com/dtable-web'
|
||||||
# }
|
# }
|
||||||
EXTRA_APP_BOTTOM_LINKS = None
|
ADDITIONAL_APP_BOTTOM_LINKS = None
|
||||||
|
|
||||||
# EXTRA_ABOUT_DIALOG_LINKS = {
|
# ADDITIONAL_ABOUT_DIALOG_LINKS = {
|
||||||
# 'seafile': 'http://dev.seahub.com/seahub',
|
# 'seafile': 'http://dev.seahub.com/seahub',
|
||||||
# 'dtable-web': 'http://dev.seahub.com/dtable-web'
|
# 'dtable-web': 'http://dev.seahub.com/dtable-web'
|
||||||
# }
|
# }
|
||||||
EXTRA_ABOUT_DIALOG_LINKS = None
|
ADDITIONAL_ABOUT_DIALOG_LINKS = None
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Settings for SeafileDocs #
|
# Settings for SeafileDocs #
|
||||||
|
@@ -103,9 +103,9 @@
|
|||||||
curNoteID: '{{ request.cur_note.id }}',
|
curNoteID: '{{ request.cur_note.id }}',
|
||||||
{% endif %}
|
{% endif %}
|
||||||
showLogoutIcon: {% if show_logout_icon %} true {% else %} false {% endif %},
|
showLogoutIcon: {% if show_logout_icon %} true {% else %} false {% endif %},
|
||||||
extraShareDialogNote: {% if extra_share_dialog_note %} {{ extra_share_dialog_note|safe }} {% else %} null {% endif %},
|
additionalShareDialogNote: {% if additional_share_dialog_note %} {{ additional_share_dialog_note|safe }} {% else %} null {% endif %},
|
||||||
extraAppBottomLinks: {% if extra_app_bottom_links %} {{ extra_app_bottom_links|safe }} {% else %} null {% endif %},
|
additionalAppBottomLinks: {% if additional_app_bottom_links %} {{ additional_app_bottom_links|safe }} {% else %} null {% endif %},
|
||||||
extraAboutDialogLinks: {% if extra_about_dialog_links %} {{ extra_about_dialog_links|safe }} {% else %} null {% endif %}
|
additionalAboutDialogLinks: {% if additional_about_dialog_links %} {{ additional_about_dialog_links|safe }} {% else %} null {% endif %}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@@ -57,7 +57,7 @@ from seahub.settings import AVATAR_FILE_STORAGE, \
|
|||||||
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, \
|
||||||
EXTRA_SHARE_DIALOG_NOTE, EXTRA_APP_BOTTOM_LINKS, EXTRA_ABOUT_DIALOG_LINKS
|
ADDITIONAL_SHARE_DIALOG_NOTE, ADDITIONAL_APP_BOTTOM_LINKS, ADDITIONAL_ABOUT_DIALOG_LINKS
|
||||||
|
|
||||||
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
|
||||||
@@ -1278,7 +1278,7 @@ def react_fake_view(request, **kwargs):
|
|||||||
'folder_perm_enabled': folder_perm_enabled,
|
'folder_perm_enabled': folder_perm_enabled,
|
||||||
'file_audit_enabled' : FILE_AUDIT_ENABLED,
|
'file_audit_enabled' : FILE_AUDIT_ENABLED,
|
||||||
'custom_nav_items' : json.dumps(CUSTOM_NAV_ITEMS),
|
'custom_nav_items' : json.dumps(CUSTOM_NAV_ITEMS),
|
||||||
'extra_share_dialog_note': EXTRA_SHARE_DIALOG_NOTE,
|
'additional_share_dialog_note': ADDITIONAL_SHARE_DIALOG_NOTE,
|
||||||
'extra_app_bottom_links': EXTRA_APP_BOTTOM_LINKS,
|
'additional_app_bottom_links': ADDITIONAL_APP_BOTTOM_LINKS,
|
||||||
'extra_about_dialog_links': EXTRA_ABOUT_DIALOG_LINKS
|
'additional_about_dialog_links': ADDITIONAL_SHARE_DIALOG_NOTE
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user