mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 07:41:26 +00:00
Add hu berlin requirement (#4500)
* add new requirement * update demo copyright * update sf-font * optimize code * improve variables naming
This commit is contained in:
@@ -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 } from '../../utils/constants';
|
||||
import { gettext, lang, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle, seafileVersion, extraAboutDialogLinks } from '../../utils/constants';
|
||||
|
||||
const propTypes = {
|
||||
onCloseAboutDialog: PropTypes.func.isRequired,
|
||||
@@ -13,6 +13,16 @@ class AboutDialog extends React.Component {
|
||||
this.props.onCloseAboutDialog();
|
||||
}
|
||||
|
||||
renderExternalAboutLinks = () => {
|
||||
if (extraAboutDialogLinks && (typeof extraAboutDialogLinks) === 'object') {
|
||||
let keys = Object.keys(extraAboutDialogLinks);
|
||||
return keys.map((key, index) => {
|
||||
return <a key={index} className="d-block" href={extraAboutDialogLinks[key]} aria-hidden="true">{key}</a>;
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
render() {
|
||||
let href = lang === lang == 'zh-cn' ? 'http://seafile.com/about/' : 'http://seafile.com/en/about/';
|
||||
|
||||
@@ -23,6 +33,7 @@ class AboutDialog extends React.Component {
|
||||
<div className="about-content">
|
||||
<p><img src={mediaUrl + logoPath} height={logoHeight} width={logoWidth} title={siteTitle} alt="logo" /></p>
|
||||
<p>{gettext('Server Version: ')}{seafileVersion}<br />© 2019 {gettext('Seafile')}</p>
|
||||
<p>{this.renderExternalAboutLinks()}</p>
|
||||
<p><a href={href} target="_blank">{gettext('About Us')}</a></p>
|
||||
</div>
|
||||
</ModalBody>
|
||||
|
@@ -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 } from '../../utils/constants';
|
||||
import { gettext, username, canGenerateShareLink, canGenerateUploadLink, extraShareDialogNote } from '../../utils/constants';
|
||||
import ShareToUser from './share-to-user';
|
||||
import ShareToGroup from './share-to-group';
|
||||
import GenerateShareLink from './generate-share-link';
|
||||
@@ -207,13 +207,28 @@ class ShareDialog extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
renderExternalShareMessage = () => {
|
||||
if (extraShareDialogNote && (typeof extraShareDialogNote) === 'object') {
|
||||
return (
|
||||
<div className="external-share-message mt-2">
|
||||
<h6>{extraShareDialogNote.title}</h6>
|
||||
<div style={{fontSize: '14px', color: '#666'}}>{extraShareDialogNote.content}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
render() {
|
||||
const { itemType, itemName, repoEncrypted } = this.props;
|
||||
const enableShareLink = !repoEncrypted && canGenerateShareLink;
|
||||
return (
|
||||
<div>
|
||||
<Modal isOpen={true} style={{maxWidth: '720px'}} className="share-dialog" toggle={this.props.toggleDialog}>
|
||||
<ModalHeader toggle={this.props.toggleDialog}>{gettext('Share')} <span className="op-target" title={itemName}>{itemName}</span></ModalHeader>
|
||||
<ModalHeader toggle={this.props.toggleDialog}>
|
||||
{gettext('Share')} <span className="op-target" title={itemName}>{itemName}</span>
|
||||
{this.renderExternalShareMessage()}
|
||||
</ModalHeader>
|
||||
<ModalBody className="share-dialog-content">
|
||||
{(itemType === 'library' || itemType === 'dir') && this.renderDirContent()}
|
||||
{(itemType === 'file' && enableShareLink) && this.renderFileContent()}
|
||||
|
Reference in New Issue
Block a user