feat(instance): make the status page URL configurable (#1159)

This commit is contained in:
Tarek authored and GitHub committed 2026-09-16 15:20:37 +02:00
1 parent 7412ec3395
commit f753659899
58 files changed
+1192 -904

No files matched your search

@@ -2,14 +2,15 @@
import {canSwitchAccountFromStalledConnection} from '@app/features/app/ConnectionRecovery';
import {isClientBooting, isClientReconnecting} from '@app/features/app/state/ClientReadiness';
import RuntimeConfig from '@app/features/app/state/RuntimeConfig';
import Nagbar from '@app/features/ui/state/Nagbar';
import StatusPage from '@app/features/user/state/StatusPage';
import {ExternalUrls} from '@fluxer/constants/src/ExternalUrls';
import {msg} from '@lingui/core/macro';
import {useLingui} from '@lingui/react/macro';
import {useEffect, useState} from 'react';
const BOOT_NOTICE_DELAY_MS = 3_000;
const STATUS_PAGE_URL = RuntimeConfig.statusPageUrl;
export const ConnectionNoticeTone = Object.freeze({
NEUTRAL: 'neutral',
@@ -131,7 +132,7 @@ export function useConnectionNotice(): ConnectionNotice | null {
return {
tone: ConnectionNoticeTone.NEUTRAL,
message: i18n._(CONNECTION_ISSUES_DESCRIPTOR),
action: {label: i18n._(VIEW_STATUS_PAGE_DESCRIPTOR), url: ExternalUrls.SERVICE_STATUS},
action: STATUS_PAGE_URL ? {label: i18n._(VIEW_STATUS_PAGE_DESCRIPTOR), url: STATUS_PAGE_URL} : null,
showSwitchAccount,
};
}
@@ -144,6 +144,8 @@ export const DEFAULT_APP_PUBLIC_CONFIG: InstanceAppPublic = {
wordmark_url: null,
favicon_url: null,
theme_color: null,
status_page_url: null,
status_page_incident_history_url: null,
},
setup: {
configured: false,
@@ -480,6 +482,14 @@ class RuntimeConfig {
}
}
get statusPageUrl(): string {
return this.appPublic.branding.status_page_url ?? '';
}
get statusPageIncidentHistoryUrl(): string {
return this.appPublic.branding.status_page_incident_history_url ?? '';
}
isSelfHosted(): boolean {
return DeveloperOptions.selfHostedModeOverride || this.features.self_hosted;
}