Make backup import UI part of install

This commit is contained in:
Fedor Indutny 2024-09-03 19:56:13 -07:00 committed by GitHub
parent 6bd9502f5c
commit ee0090bb84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 829 additions and 596 deletions

View file

@ -8,17 +8,14 @@ import classNames from 'classnames';
import type { ViewStoryActionCreatorType } from '../state/ducks/stories';
import type { VerificationTransport } from '../types/VerificationTransport';
import { ThemeType } from '../types/Util';
import type { LocalizerType } from '../types/Util';
import { missingCaseError } from '../util/missingCaseError';
import { type AppStateType, AppViewType } from '../state/ducks/app';
import { SmartInstallScreen } from '../state/smart/InstallScreen';
import { StandaloneRegistration } from './StandaloneRegistration';
import { BackupImportScreen } from './BackupImportScreen';
import { usePageVisibility } from '../hooks/usePageVisibility';
import { useReducedMotion } from '../hooks/useReducedMotion';
type PropsType = {
i18n: LocalizerType;
state: AppStateType;
openInbox: () => void;
getCaptchaToken: () => Promise<string>;
@ -53,7 +50,6 @@ type PropsType = {
};
export function App({
i18n,
state,
getCaptchaToken,
hasSelectedStoryData,
@ -96,10 +92,8 @@ export function App({
contents = renderInbox();
} else if (state.appView === AppViewType.Blank) {
contents = undefined;
} else if (state.appView === AppViewType.BackupImport) {
contents = <BackupImportScreen i18n={i18n} {...state} />;
} else {
throw missingCaseError(state);
throw missingCaseError(state.appView);
}
// This are here so that themes are properly applied to anything that is