Better downtime / reboot status message

Fixed
This commit is contained in:
Thomas Zarebczan 2021-03-03 12:30:39 -05:00 committed by Sean Yesmunt
parent 92ff0fd336
commit eb0e0cb7cc
2 changed files with 20 additions and 5 deletions

View file

@ -352,7 +352,7 @@ function App(props: Props) {
// @endif // @endif
if (syncFatalError) { if (syncFatalError) {
return <SyncFatalError />; return <SyncFatalError lbryTvApiStatus={lbryTvApiStatus} />;
} }
return ( return (

View file

@ -1,16 +1,31 @@
// @Flow // @flow
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import React from 'react'; import React from 'react';
import Button from 'component/button'; import Button from 'component/button';
import Yrbl from 'component/yrbl'; import Yrbl from 'component/yrbl';
import { STATUS_DEGRADED, STATUS_FAILING, STATUS_DOWN } from 'web/effects/use-degraded-performance';
type Props = {
lbryTvApiStatus: string,
};
export default function SyncFatalError(props: Props) {
const { lbryTvApiStatus } = props;
const downTime =
IS_WEB &&
(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING || lbryTvApiStatus === STATUS_DOWN);
export default function SyncFatalError() {
return ( return (
<div className="main--empty"> <div className="main--empty">
<Yrbl <Yrbl
title={__('There is a bug... somewhere')} title={downTime ? __('Under maintenance...') : __('There is a bug... somewhere')}
subtitle={ subtitle={
<p>{__("Try refreshing to fix the issue. If that doesn't work, email help@lbry.com for support.")}</p> <p>
{downTime
? __("We're currently upgrading or rebooting our services, please try refreshing in a few minutes.")
: __("Try refreshing to fix the issue. If that doesn't work, email help@odysee.com for support.")}
</p>
} }
actions={ actions={
<div className="section__actions"> <div className="section__actions">