1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 01:41:39 +00:00

merge 7.0

This commit is contained in:
shanshuirenjia
2020-04-01 18:03:46 +08:00
7 changed files with 30 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
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 = {
onCloseAboutDialog: PropTypes.func.isRequired,
@@ -14,10 +14,10 @@ class AboutDialog extends React.Component {
}
renderExternalAboutLinks = () => {
if (extraAboutDialogLinks && (typeof extraAboutDialogLinks) === 'object') {
let keys = Object.keys(extraAboutDialogLinks);
if (additionalAboutDialogLinks && (typeof additionalAboutDialogLinks) === 'object') {
let keys = Object.keys(additionalAboutDialogLinks);
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;

View File

@@ -1,7 +1,7 @@
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { Modal, ModalHeader, ModalBody, TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, canInvitePeople, extraShareDialogNote } from '../../utils/constants';
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, canInvitePeople, additionalShareDialogNote } from '../../utils/constants';
import ShareToUser from './share-to-user';
import ShareToGroup from './share-to-group';
import ShareToInvitePeople from './share-to-invite-people';
@@ -227,11 +227,11 @@ class ShareDialog extends React.Component {
}
renderExternalShareMessage = () => {
if (extraShareDialogNote && (typeof extraShareDialogNote) === 'object') {
if (additionalShareDialogNote && (typeof additionalShareDialogNote) === 'object') {
return (
<div className="external-share-message mt-2">
<h6>{extraShareDialogNote.title}</h6>
<div style={{fontSize: '14px', color: '#666'}}>{extraShareDialogNote.content}</div>
<h6>{additionalShareDialogNote.title}</h6>
<div style={{fontSize: '14px', color: '#666'}}>{additionalShareDialogNote.content}</div>
</div>
);
}

View File

@@ -1,5 +1,5 @@
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 AboutDialog from './dialog/about-dialog';
@@ -17,10 +17,10 @@ class SideNavFooter extends React.Component {
}
renderExternalAppLinks = () => {
if (extraAppBottomLinks && (typeof extraAppBottomLinks) === 'object') {
let keys = Object.keys(extraAppBottomLinks);
if (additionalAppBottomLinks && (typeof additionalAppBottomLinks) === 'object') {
let keys = Object.keys(additionalAppBottomLinks);
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;
@@ -37,7 +37,7 @@ class SideNavFooter extends React.Component {
<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>
{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 className="vam">{gettext('Clients')}</span>
</a>

View File

@@ -68,9 +68,9 @@ export const curNoteID = window.app.pageOptions.curNoteID;
// dtable
export const workspaceID = window.app.pageOptions.workspaceID;
export const showLogoutIcon = window.app.pageOptions.showLogoutIcon;
export const extraShareDialogNote = window.app.pageOptions.extraShareDialogNote;
export const extraAppBottomLinks = window.app.pageOptions.extraAppBottomLinks;
export const extraAboutDialogLinks = window.app.pageOptions.extraAboutDialogLinks;
export const additionalShareDialogNote = window.app.pageOptions.additionalShareDialogNote;
export const additionalAppBottomLinks = window.app.pageOptions.additionalAppBottomLinks;
export const additionalAboutDialogLinks = window.app.pageOptions.additionalAboutDialogLinks;
// wiki
export const slug = window.wiki ? window.wiki.config.slug : '';

View File

@@ -732,26 +732,26 @@ ENABLE_REPO_SNAPSHOT_LABEL = False
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:',
# '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',
# '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',
# 'dtable-web': 'http://dev.seahub.com/dtable-web'
# }
EXTRA_ABOUT_DIALOG_LINKS = None
ADDITIONAL_ABOUT_DIALOG_LINKS = None
############################
# Settings for SeafileDocs #

View File

@@ -108,9 +108,9 @@
curNoteID: '{{ request.cur_note.id }}',
{% endif %}
showLogoutIcon: {% if show_logout_icon %} true {% else %} false {% endif %},
extraShareDialogNote: {% if extra_share_dialog_note %} {{ extra_share_dialog_note|safe }} {% else %} null {% endif %},
extraAppBottomLinks: {% if extra_app_bottom_links %} {{ extra_app_bottom_links|safe }} {% else %} null {% endif %},
extraAboutDialogLinks: {% if extra_about_dialog_links %} {{ extra_about_dialog_links|safe }} {% else %} null {% endif %}
additionalShareDialogNote: {% if additional_share_dialog_note %} {{ additional_share_dialog_note|safe }} {% else %} null {% endif %},
additionalAppBottomLinks: {% if additional_app_bottom_links %} {{ additional_app_bottom_links|safe }} {% else %} null {% endif %},
additionalAboutDialogLinks: {% if additional_about_dialog_links %} {{ additional_about_dialog_links|safe }} {% else %} null {% endif %}
}
};
</script>

View File

@@ -55,7 +55,7 @@ from seahub.settings import AVATAR_FILE_STORAGE, \
UNREAD_NOTIFICATIONS_REQUEST_INTERVAL, SHARE_LINK_EXPIRE_DAYS_MIN, \
SHARE_LINK_EXPIRE_DAYS_MAX, SHARE_LINK_EXPIRE_DAYS_DEFAULT, \
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, \
DTABLE_WEB_SERVER
from seahub.wopi.settings import ENABLE_OFFICE_WEB_APP
@@ -1159,7 +1159,7 @@ def react_fake_view(request, **kwargs):
'folder_perm_enabled': folder_perm_enabled,
'file_audit_enabled' : FILE_AUDIT_ENABLED,
'custom_nav_items' : json.dumps(CUSTOM_NAV_ITEMS),
'extra_share_dialog_note': EXTRA_SHARE_DIALOG_NOTE,
'extra_app_bottom_links': EXTRA_APP_BOTTOM_LINKS,
'extra_about_dialog_links': EXTRA_ABOUT_DIALOG_LINKS
'additional_share_dialog_note': ADDITIONAL_SHARE_DIALOG_NOTE,
'additional_app_bottom_links': ADDITIONAL_APP_BOTTOM_LINKS,
'additional_about_dialog_links': ADDITIONAL_SHARE_DIALOG_NOTE
})