once startup has failed, stop animations and strip UI

This commit is contained in:
Jeremy Kauffman 2020-03-02 09:42:43 -05:00 committed by Sean Yesmunt
parent 41c9ba4869
commit 619ab3d1de
3 changed files with 23 additions and 25 deletions

View file

@ -1027,4 +1027,4 @@
"Your video may not be the best format. Use MP4s in H264/AAC format and a friendly bitrate (720p) for more reliable streaming.": "Your video may not be the best format. Use MP4s in H264/AAC format and a friendly bitrate (720p) for more reliable streaming.",
"Your video has a bitrate over 6 mbps. We suggest transcoding to provide viewers the best experience.": "Your video has a bitrate over 6 mbps. We suggest transcoding to provide viewers the best experience.",
"Your video has a bitrate over 5 mbps. We suggest transcoding to provide viewers the best experience.": "Your video has a bitrate over 5 mbps. We suggest transcoding to provide viewers the best experience."
}
}

View file

@ -225,7 +225,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
<h1 className="splash__title">LBRY</h1>
<div className="splash__details">{details}</div>
{!animationHidden && (
{!animationHidden && !error && (
<css-doodle class="doodle">
{`
--color: @p(var(--color-primary), var(--color-secondary), var(--color-focus), var(--color-nothing));
@ -262,30 +262,34 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
`}
</css-doodle>
)}
<Button
className="splash__animation-toggle"
label={!animationHidden ? __('I feel woosy! Stop spinning!') : __('Spin Spin Sugar')}
onClick={() => setClientSetting(SETTINGS.HIDE_SPLASH_ANIMATION, !animationHidden)}
/>
{!error && (
<Button
className="splash__animation-toggle"
label={!animationHidden ? __('I feel woosy! Stop spinning!') : __('Spin Spin Sugar')}
onClick={() => setClientSetting(SETTINGS.HIDE_SPLASH_ANIMATION, !animationHidden)}
/>
)}
{error && (
<Card
className="splash__error"
title={__('Error Starting Up')}
subtitle={
<React.Fragment>
<p>
Try refreshing to fix it. If you still have issues, your anti-virus software or firewall may be
preventing startup.
{__(
'You can try refreshing to fix it. If you still have issues, your anti-virus software or firewall may be preventing startup.'
)}
</p>
<p>
<I18nMessage
tokens={{
help_link: (
<Button button="link" href="https://lbry.com/faq/startup-troubleshooting" label="this link" />
),
}}
>
Reach out to hello@lbry.com for help, or check out %help_link%.
</I18nMessage>
</p>
<I18nMessage
tokens={{
help_link: (
<Button button="link" href="https://lbry.com/faq/startup-troubleshooting" label="this link" />
),
}}
>
Reach out to hello@lbry.com for help, or check out %help_link%.
</I18nMessage>
</React.Fragment>
}
actions={<Button button="primary" label={__('Refresh')} onClick={() => window.location.reload()} />}

View file

@ -46,12 +46,6 @@
}
}
.splash__error {
position: absolute;
margin-top: 20rem;
background-color: #fff;
}
.doodle {
position: fixed;
}