LinkFooter: restore copyright message, let it be overridden
This commit is contained in:
parent
ac252d5c2f
commit
5ffb9828ba
1 changed files with 22 additions and 16 deletions
|
@ -6,10 +6,11 @@ import { connect } from 'react-redux';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import { logOut } from 'soapbox/actions/auth';
|
import { logOut } from 'soapbox/actions/auth';
|
||||||
|
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
|
||||||
import { Text } from 'soapbox/components/ui';
|
import { Text } from 'soapbox/components/ui';
|
||||||
import emojify from 'soapbox/features/emoji/emoji';
|
import emojify from 'soapbox/features/emoji/emoji';
|
||||||
import { getBaseURL } from 'soapbox/utils/accounts';
|
import { getBaseURL } from 'soapbox/utils/accounts';
|
||||||
// import sourceCode from 'soapbox/utils/code';
|
import sourceCode from 'soapbox/utils/code';
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
import { getFeatures } from 'soapbox/utils/features';
|
||||||
|
|
||||||
import { openModal } from '../../../actions/modals';
|
import { openModal } from '../../../actions/modals';
|
||||||
|
@ -19,9 +20,11 @@ const mapStateToProps = state => {
|
||||||
const account = state.getIn(['accounts', me]);
|
const account = state.getIn(['accounts', me]);
|
||||||
const instance = state.get('instance');
|
const instance = state.get('instance');
|
||||||
const features = getFeatures(instance);
|
const features = getFeatures(instance);
|
||||||
|
const soapboxConfig = getSoapboxConfig(state);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
account,
|
account,
|
||||||
|
soapboxConfig,
|
||||||
profileDirectory: features.profileDirectory,
|
profileDirectory: features.profileDirectory,
|
||||||
federating: features.federating,
|
federating: features.federating,
|
||||||
showAliases: features.accountAliasesAPI,
|
showAliases: features.accountAliasesAPI,
|
||||||
|
@ -41,7 +44,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const LinkFooter = ({ onOpenHotkeys, account, profileDirectory, federating, showAliases, importAPI, onClickLogOut, baseURL }) => (
|
const LinkFooter = ({ onOpenHotkeys, account, profileDirectory, federating, showAliases, importAPI, onClickLogOut, baseURL, soapboxConfig }) => (
|
||||||
<div className='space-y-2'>
|
<div className='space-y-2'>
|
||||||
<ul className='flex flex-wrap items-center divide-x-dot'>
|
<ul className='flex flex-wrap items-center divide-x-dot'>
|
||||||
{account && <>
|
{account && <>
|
||||||
|
@ -68,26 +71,29 @@ const LinkFooter = ({ onOpenHotkeys, account, profileDirectory, federating, show
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<Text theme='muted' size='sm'>
|
<Text theme='muted' size='sm'>
|
||||||
{/*<FormattedMessage
|
{soapboxConfig.get('linkFooterMessage') ? (
|
||||||
id='getting_started.open_source_notice'
|
<span
|
||||||
defaultMessage='{code_name} is open source software. You can contribute or report issues at {code_link} (v{code_version}).'
|
className='inline-block align-middle'
|
||||||
values={{
|
dangerouslySetInnerHTML={{ __html: emojify(soapboxConfig.get('linkFooterMessage')) }}
|
||||||
code_name: sourceCode.displayName,
|
/>
|
||||||
code_link: <a href={sourceCode.url} rel='noopener' target='_blank'>{sourceCode.repository}</a>,
|
) : (
|
||||||
code_version: sourceCode.version,
|
<FormattedMessage
|
||||||
}}
|
id='getting_started.open_source_notice'
|
||||||
/>*/}
|
defaultMessage='{code_name} is open source software. You can contribute or report issues at {code_link} (v{code_version}).'
|
||||||
<FormattedMessage
|
values={{
|
||||||
id='link_footer.made_in_usa'
|
code_name: sourceCode.displayName,
|
||||||
defaultMessage='Proudly made in the United States of America. {emoji}'
|
code_link: <a href={sourceCode.url} rel='noopener' target='_blank'>{sourceCode.repository}</a>,
|
||||||
values={{ emoji: <span className='inline-block align-middle' dangerouslySetInnerHTML={{ __html: emojify('🇺🇸') }} /> }}
|
code_version: sourceCode.version,
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
LinkFooter.propTypes = {
|
LinkFooter.propTypes = {
|
||||||
account: ImmutablePropTypes.map,
|
account: ImmutablePropTypes.map,
|
||||||
|
soapboxConfig: ImmutablePropTypes.map,
|
||||||
profileDirectory: PropTypes.bool,
|
profileDirectory: PropTypes.bool,
|
||||||
federating: PropTypes.bool,
|
federating: PropTypes.bool,
|
||||||
showAliases: PropTypes.bool,
|
showAliases: PropTypes.bool,
|
||||||
|
|
Loading…
Reference in a new issue