sforkowany z mirror/soapbox
Merge branch 'next-cleanup' into 'next'
Next: Cleanup index.ejs snippets, let LinkFooter message be customized See merge request soapbox-pub/soapbox-fe!1131virtualized-window
commit
1a4cc5bdc9
|
@ -9,33 +9,6 @@
|
|||
<link href="/manifest.json" rel="manifest">
|
||||
<!--server-generated-meta-->
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<link href='/icons/icon-57x57.png' rel='apple-touch-icon' sizes='57x57'>
|
||||
<link href='/icons/icon-64x64.png' rel='apple-touch-icon' sizes='64x64'>
|
||||
<link href='/icons/icon-72x72.png' rel='apple-touch-icon' sizes='72x72'>
|
||||
<link href='/icons/icon-114x114.png' rel='apple-touch-icon' sizes='114x114'>
|
||||
<link href='/icons/icon-120x120.png' rel='apple-touch-icon' sizes='120x120'>
|
||||
<link href='/icons/icon-180x180.png' rel='apple-touch-icon' sizes='180x180'>
|
||||
<link href='/icons/icon-192x192.png' rel='apple-touch-icon' sizes='192x192'>
|
||||
<link href='/icons/icon-512x512.png' rel='apple-touch-icon' sizes='512x512'>
|
||||
<script>
|
||||
if(window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.didBeginLoadingSoapbox) {
|
||||
window.webkit.messageHandlers.didBeginLoadingSoapbox.postMessage("started");
|
||||
}
|
||||
</script>
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//trk.bonsa.net/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '23231245']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body class="theme-mode-light no-reduce-motion">
|
||||
<div id="soapbox">
|
||||
|
|
|
@ -6,10 +6,11 @@ import { connect } from 'react-redux';
|
|||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { logOut } from 'soapbox/actions/auth';
|
||||
import { getSoapboxConfig } from 'soapbox/actions/soapbox';
|
||||
import { Text } from 'soapbox/components/ui';
|
||||
import emojify from 'soapbox/features/emoji/emoji';
|
||||
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 { openModal } from '../../../actions/modals';
|
||||
|
@ -19,9 +20,11 @@ const mapStateToProps = state => {
|
|||
const account = state.getIn(['accounts', me]);
|
||||
const instance = state.get('instance');
|
||||
const features = getFeatures(instance);
|
||||
const soapboxConfig = getSoapboxConfig(state);
|
||||
|
||||
return {
|
||||
account,
|
||||
soapboxConfig,
|
||||
profileDirectory: features.profileDirectory,
|
||||
federating: features.federating,
|
||||
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'>
|
||||
<ul className='flex flex-wrap items-center divide-x-dot'>
|
||||
{account && <>
|
||||
|
@ -68,7 +71,13 @@ const LinkFooter = ({ onOpenHotkeys, account, profileDirectory, federating, show
|
|||
</ul>
|
||||
|
||||
<Text theme='muted' size='sm'>
|
||||
{/*<FormattedMessage
|
||||
{soapboxConfig.get('linkFooterMessage') ? (
|
||||
<span
|
||||
className='inline-block align-middle'
|
||||
dangerouslySetInnerHTML={{ __html: emojify(soapboxConfig.get('linkFooterMessage')) }}
|
||||
/>
|
||||
) : (
|
||||
<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}).'
|
||||
values={{
|
||||
|
@ -76,18 +85,15 @@ const LinkFooter = ({ onOpenHotkeys, account, profileDirectory, federating, show
|
|||
code_link: <a href={sourceCode.url} rel='noopener' target='_blank'>{sourceCode.repository}</a>,
|
||||
code_version: sourceCode.version,
|
||||
}}
|
||||
/>*/}
|
||||
<FormattedMessage
|
||||
id='link_footer.made_in_usa'
|
||||
defaultMessage='Proudly made in the United States of America. {emoji}'
|
||||
values={{ emoji: <span className='inline-block align-middle' dangerouslySetInnerHTML={{ __html: emojify('🇺🇸') }} /> }}
|
||||
/>
|
||||
)}
|
||||
</Text>
|
||||
</div>
|
||||
);
|
||||
|
||||
LinkFooter.propTypes = {
|
||||
account: ImmutablePropTypes.map,
|
||||
soapboxConfig: ImmutablePropTypes.map,
|
||||
profileDirectory: PropTypes.bool,
|
||||
federating: PropTypes.bool,
|
||||
showAliases: PropTypes.bool,
|
||||
|
|
Ładowanie…
Reference in New Issue