Add meta tag for iOS banner

This commit is contained in:
Justin 2022-04-14 14:15:32 -04:00 committed by Alex Gleason
parent 3ecd7c3961
commit 7e42679478
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 7 additions and 0 deletions

View file

@ -86,6 +86,7 @@ const mapStateToProps = (state) => {
locale: validLocale(locale) ? locale : 'en',
themeCss: generateThemeCss(soapboxConfig),
brandColor: soapboxConfig.get('brandColor'),
appleAppId: soapboxConfig.get('appleAppId'),
themeMode: settings.get('themeMode'),
singleUserMode,
};
@ -108,6 +109,7 @@ class SoapboxMount extends React.PureComponent {
themeCss: PropTypes.string,
themeMode: PropTypes.string,
brandColor: PropTypes.string,
appleAppId: PropTypes.string,
dispatch: PropTypes.func,
singleUserMode: PropTypes.bool,
};
@ -171,6 +173,10 @@ class SoapboxMount extends React.PureComponent {
<body className={bodyClass} />
{themeCss && <style id='theme' type='text/css'>{`:root{${themeCss}}`}</style>}
<meta name='theme-color' content={this.props.brandColor} />
{this.props.appleAppId && (
<meta name='apple-itunes-app' content={`app-id=${this.props.appleAppId}`} />
)}
</Helmet>
<ErrorBoundary>

View file

@ -75,6 +75,7 @@ export const CryptoAddressRecord = ImmutableRecord({
});
export const SoapboxConfigRecord = ImmutableRecord({
appleAppId: null,
logo: '',
banner: '',
brandColor: '', // Empty