From 664847db15aca67ae9fdb19fb5a1cf6635f4c842 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 4 Feb 2023 04:56:06 +0100 Subject: [PATCH] [Glitch] Add setting for status page URL Port 92e5feb621349dc0f7d7bd0e3034cf6711ead8e6 to glitch-soc Signed-off-by: Claire --- .../glitch/features/ui/components/link_footer.js | 16 +++++++++++----- app/javascript/flavours/glitch/initial_state.js | 1 + 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/link_footer.js b/app/javascript/flavours/glitch/features/ui/components/link_footer.js index c4bea9f310..0d1d4040f7 100644 --- a/app/javascript/flavours/glitch/features/ui/components/link_footer.js +++ b/app/javascript/flavours/glitch/features/ui/components/link_footer.js @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; -import { domain, version, source_url, profile_directory as profileDirectory } from 'flavours/glitch/initial_state'; +import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'flavours/glitch/initial_state'; import { logOut } from 'flavours/glitch/utils/log_out'; import { openModal } from 'flavours/glitch/actions/modal'; import { PERMISSION_INVITE_USERS } from 'flavours/glitch/permissions'; @@ -59,21 +59,27 @@ class LinkFooter extends React.PureComponent {

{domain}: {' '} - + + {statusPageUrl && ( + <> + {DividingCircle} + + + )} {canInvite && ( <> {DividingCircle} - + )} {canProfileDirectory && ( <> {DividingCircle} - + )} {DividingCircle} - +

diff --git a/app/javascript/flavours/glitch/initial_state.js b/app/javascript/flavours/glitch/initial_state.js index eefbdca804..c4b249db81 100644 --- a/app/javascript/flavours/glitch/initial_state.js +++ b/app/javascript/flavours/glitch/initial_state.js @@ -142,6 +142,7 @@ export const usePendingItems = getMeta('use_pending_items'); export const version = getMeta('version'); export const translationEnabled = getMeta('translation_enabled'); export const languages = initialState?.languages; +export const statusPageUrl = getMeta('status_page_url'); // Glitch-soc-specific settings export const maxChars = (initialState && initialState.max_toot_chars) || 500;