diff --git a/components/brave_sync/brave_profile_sync_service_impl.cc b/components/brave_sync/brave_profile_sync_service_impl.cc index 96770c1350e8..76e5891ad845 100644 --- a/components/brave_sync/brave_profile_sync_service_impl.cc +++ b/components/brave_sync/brave_profile_sync_service_impl.cc @@ -332,11 +332,7 @@ void BraveProfileSyncServiceImpl::GetSettingsAndDevices( void BraveProfileSyncServiceImpl::GetSyncWords() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); Uint8Array seed = Uint8ArrayFromString(brave_sync_prefs_->GetSeed()); - if (!seed.empty()) { - NotifyHaveSyncWords(crypto::PassphraseFromBytes32(seed)); - } else { - NotifyHaveSyncWords("TEST DEBUG"); - } + NotifyHaveSyncWords(crypto::PassphraseFromBytes32(seed)); } std::string BraveProfileSyncServiceImpl::GetSeed() { diff --git a/components/brave_sync/ui/containers/commonDialogs/cancelDeviceSyncing.tsx b/components/brave_sync/ui/containers/commonDialogs/cancelDeviceSyncing.tsx deleted file mode 100644 index bc8fd9d13f4b..000000000000 --- a/components/brave_sync/ui/containers/commonDialogs/cancelDeviceSyncing.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import * as React from 'react' - -// Components -import { AlertBox } from 'brave-ui' - -// Feature-specific components -import { Title, Paragraph } from 'brave-ui/features/sync' - -// Utils -import { getLocale } from '../../../../common/locale' - -interface Props { - onClickOk: () => void - onClickCancel: () => void -} - -export default class AreYouSure extends React.PureComponent { - render () { - const { onClickOk, onClickCancel } = this.props - return ( - - {getLocale('areYouSure')} - {getLocale('cancelDeviceSyncing')} - - ) - } -} diff --git a/components/brave_sync/ui/containers/disabledContent.tsx b/components/brave_sync/ui/containers/disabledContent.tsx index 1bd22eb60fb5..718a0a3e61f1 100644 --- a/components/brave_sync/ui/containers/disabledContent.tsx +++ b/components/brave_sync/ui/containers/disabledContent.tsx @@ -6,6 +6,7 @@ import * as React from 'react' // Components import { Button } from 'brave-ui' +import { LoaderIcon } from 'brave-ui/components/icons' // Component-specific components import { @@ -22,7 +23,6 @@ import { import { SyncStartIcon } from 'brave-ui/features/sync/images' // Modals -import DeviceTypeModal from './modals/deviceType' import EnterSyncCodeModal from './modals/enterSyncCode' // Utils @@ -49,6 +49,12 @@ export default class SyncDisabledContent extends React.PureComponent { this.setState({ newToSync: !this.state.newToSync }) + // once the screen is rendered, create a sync chain. + // this allow us to request the qr code and sync words immediately + const { thisDeviceName } = this.props.syncData + if (thisDeviceName === '') { + this.props.actions.onSetupNewToSync('') + } } onClickEnterSyncChainCodeButton = () => { @@ -66,11 +72,6 @@ export default class SyncDisabledContent extends React.PureComponent
- { - newToSync - ? - : null - } { existingSyncCode ? @@ -89,6 +90,12 @@ export default class SyncDisabledContent extends React.PureComponent + : null + }} />