Show error state when QR code times out loading
This commit is contained in:
parent
48545d6a83
commit
b34ea60d34
7 changed files with 107 additions and 22 deletions
|
@ -9,12 +9,14 @@ import { openLinkInWebBrowser } from '../../util/openLinkInWebBrowser';
|
|||
import { Button, ButtonVariant } from '../Button';
|
||||
import { TitlebarDragArea } from '../TitlebarDragArea';
|
||||
import { InstallScreenSignalLogo } from './InstallScreenSignalLogo';
|
||||
import { LINK_SIGNAL_DESKTOP } from '../../types/support';
|
||||
|
||||
export enum InstallError {
|
||||
TooManyDevices,
|
||||
TooOld,
|
||||
ConnectionFailed,
|
||||
UnknownError,
|
||||
QRCodeFailed,
|
||||
}
|
||||
|
||||
export function InstallScreenErrorStep({
|
||||
|
@ -51,6 +53,14 @@ export function InstallScreenErrorStep({
|
|||
case InstallError.UnknownError:
|
||||
errorMessage = i18n('icu:installUnknownError');
|
||||
break;
|
||||
case InstallError.QRCodeFailed:
|
||||
buttonText = i18n('icu:Install__learn-more');
|
||||
errorMessage = i18n('icu:installUnknownError');
|
||||
onClickButton = () => {
|
||||
openLinkInWebBrowser(LINK_SIGNAL_DESKTOP);
|
||||
};
|
||||
shouldShowQuitButton = true;
|
||||
break;
|
||||
default:
|
||||
throw missingCaseError(error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue