diff --git a/browser/ui/webui/brave_webui_source.cc b/browser/ui/webui/brave_webui_source.cc
index 4c5442654e09..109745969a7a 100644
--- a/browser/ui/webui/brave_webui_source.cc
+++ b/browser/ui/webui/brave_webui_source.cc
@@ -439,13 +439,17 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource*
}
}, {
std::string("sync"), {
- { "done", IDS_BRAVE_SYNC_SHARED_DONE_BUTTON },
+ // Shared strings
{ "remove", IDS_BRAVE_SYNC_SHARED_REMOVE_PARTIAL },
{ "copied", IDS_BRAVE_SYNC_SHARED_COPIED_TEXT },
{ "wordCount", IDS_BRAVE_SYNC_SHARED_WORD_COUNT_TEXT },
{ "ok", IDS_BRAVE_SYNC_SHARED_OK_BUTTON },
{ "cancel", IDS_BRAVE_SYNC_SHARED_CANCEL_BUTTON },
+ { "cancelDeviceSyncing", IDS_BRAVE_SYNC_SHARED_CANCEL_SYNCING_TITLE },
+ { "cancelDeviceSyncingButton", IDS_BRAVE_SYNC_SHARED_CANCEL_SYNCING_BUTTON },
{ "thisSyncChain", IDS_BRAVE_SYNC_SHARED_FROM_THIS_CHAIN_PARTIAL },
+ { "lookingForDevice", IDS_BRAVE_SYNC_SCAN_CODE_LOOKING_FOR_DEVICE_BUTTON },
+ { "viewSyncCode", IDS_BRAVE_SYNC_ENABLED_VIEW_CODE_BUTTON },
// Enabled Content
{ "braveSync", IDS_BRAVE_SYNC_ENABLED_BRAVE_TITLE },
{ "syncChainDevices", IDS_BRAVE_SYNC_ENABLED_DEVICES_CHAIN_TITLE },
@@ -453,8 +457,9 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource*
{ "thisDevice", IDS_BRAVE_SYNC_ENABLED_TABLE_THIS_DEVICE_TEXT },
{ "addedOn", IDS_BRAVE_SYNC_ENABLED_TABLE_ADDED_ON_TITLE },
{ "addDevice", IDS_BRAVE_SYNC_ENABLED_ADD_DEVICE_BUTTON },
- { "viewSyncCode", IDS_BRAVE_SYNC_ENABLED_VIEW_CODE_BUTTON },
- { "dataToSync", IDS_BRAVE_SYNC_ENABLED_DATA_TITLE },
+ { "settingsTitle", IDS_BRAVE_SYNC_ENABLED_SETTINGS_TITLE },
+ { "settingsDescription", IDS_BRAVE_SYNC_ENABLED_SETTINGS_DESCRIPTION },
+ { "settings", IDS_BRAVE_SYNC_ENABLED_TABLE_SETTINGS },
{ "bookmarks", IDS_BRAVE_SYNC_ENABLED_BOOKMARKS_LABEL },
{ "savedSiteSettings", IDS_BRAVE_SYNC_ENABLED_SITE_SETTINGS_LABEL },
{ "browsingHistory", IDS_BRAVE_SYNC_ENABLED_HISTORY_LABEL },
@@ -464,7 +469,6 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource*
{ "syncDescription", IDS_BRAVE_SYNC_DISABLED_NEW_CHAIN_DESCRIPTION },
{ "startSyncChain", IDS_BRAVE_SYNC_DISABLED_START_NEW_CHAIN_BUTTON },
{ "enterSyncChainCode", IDS_BRAVE_SYNC_DISABLED_ENTER_CODE_BUTTON },
- { "confirmSyncCode", IDS_BRAVE_SYNC_DISABLED_CONFIRM_CODE_BUTTON },
// [modal] Enter Sync Code
{ "enterSyncCode", IDS_BRAVE_SYNC_ENTER_CODE_TITLE },
{ "enterSyncCodeDescription", IDS_BRAVE_SYNC_ENTER_CODE_DESCRIPTION },
@@ -481,27 +485,23 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource*
{ "deleteSyncDescription", IDS_BRAVE_SYNC_RESET_REMOVAL_INSTRUCTIONS },
{ "startSyncChainHowTo", IDS_BRAVE_SYNC_RESET_START_NEW_INSTRUCTIONS },
{ "areYouSure", IDS_BRAVE_SYNC_RESET_ARE_YOU_SURE_TITLE },
- // [modal] Add New Chain
- { "scanThisCode", IDS_BRAVE_SYNC_NEW_CHAIN_MAIN_DESCRIPTION },
- { "scanThisCodeHowTo", IDS_BRAVE_SYNC_NEW_CHAIN_MAIN_INSTRUCTIONS },
- { "enterCodeWordsInstead", IDS_BRAVE_SYNC_NEW_CHAIN_MAIN_CODE_WORDS_BUTTON },
- { "previous", IDS_BRAVE_SYNC_NEW_CHAIN_MAIN_PREVIOUS_BUTTON },
- { "lookingForDevice", IDS_BRAVE_SYNC_NEW_CHAIN_MAIN_LOOKING_FOR_DEVICE_BUTTON },
- // [modal] Add New Chain (Camera Option)
- // [modal] Add New Chain (no Camera)
- { "enterThisCode", IDS_BRAVE_SYNC_NEW_CHAIN_DESKTOP_TITLE },
- { "mobileEnterThisCode", IDS_BRAVE_SYNC_NEW_CHAIN_MOBILE_TITLE },
- { "syncChainCodeHowTo", IDS_BRAVE_SYNC_NEW_CHAIN_DESCRIPTION },
- { "useCameraInstead", IDS_BRAVE_SYNC_NEW_CHAIN_USE_CAMERA_BUTTON },
+ // [modal] Scan Code
+ { "scanThisCode", IDS_BRAVE_SYNC_SCAN_CODE_TITLE },
+ { "scanThisCodeHowToPartial1", IDS_BRAVE_SYNC_SCAN_CODE_DESCRIPTION_PARTIAL_1 },
+ { "scanThisCodeHowToPartial2", IDS_BRAVE_SYNC_SCAN_CODE_DESCRIPTION_PARTIAL_2 },
+ { "scanThisCodeHowToPartial3", IDS_BRAVE_SYNC_SCAN_CODE_DESCRIPTION_PARTIAL_3 },
+ // [modal] View Code
+ { "chainCode", IDS_BRAVE_SYNC_VIEW_CODE_TITLE },
+ { "chainCodeDescriptionPartial1", IDS_BRAVE_SYNC_VIEW_CODE_DESCRIPTION_PARTIAL_1 },
+ { "chainCodeDescriptionPartial2", IDS_BRAVE_SYNC_VIEW_CODE_DESCRIPTION_PARTIAL_2 },
+ { "chainCodeDescriptionPartial3", IDS_BRAVE_SYNC_VIEW_CODE_DESCRIPTION_PARTIAL_3 },
+ { "useCameraInstead", IDS_BRAVE_SYNC_VIEW_CODE_USE_CAMERA_BUTTON },
+ { "qrCode", IDS_BRAVE_SYNC_VIEW_CODE_QR_CODE },
// [modal] Choose Device Type
- { "letsSync", IDS_BRAVE_SYNC_CHOOSE_DEVICE_NEW_DEVICE_TITLE },
- { "chooseDeviceType", IDS_BRAVE_SYNC_CHOOSE_DEVICE_CHOOSE_DEVICE_TITLE },
+ { "letsSync", IDS_BRAVE_SYNC_CHOOSE_DEVICE_TITLE },
+ { "chooseDeviceType", IDS_BRAVE_SYNC_CHOOSE_DEVICE_DESCRIPTION },
{ "phoneTablet", IDS_BRAVE_SYNC_CHOOSE_DEVICE_MOBILE_TITLE },
{ "computer", IDS_BRAVE_SYNC_CHOOSE_DEVICE_COMPUTER_TITLE },
- // [modal] View Sync Code
- { "qrCode", IDS_BRAVE_SYNC_VIEW_CODE_QR_CODE_TITLE },
- { "wordCode", IDS_BRAVE_SYNC_VIEW_CODE_WORD_CODE_TITLE },
- { "privateKey", IDS_BRAVE_SYNC_VIEW_CODE_PRIVATE_KEY_PHRASE },
// errors
{ "errorWrongCodeTitle", IDS_BRAVE_SYNC_ERROR_WRONG_CODE_TITLE },
{ "errorWrongCodeDescription", IDS_BRAVE_SYNC_ERROR_WRONG_CODE_DESCRIPTION },
diff --git a/components/brave_sync/ui/BUILD.gn b/components/brave_sync/ui/BUILD.gn
index c1f015272312..96df9f047c63 100644
--- a/components/brave_sync/ui/BUILD.gn
+++ b/components/brave_sync/ui/BUILD.gn
@@ -3,8 +3,8 @@ import("//brave/components/common/typescript.gni")
transpile_web_ui("ui") {
inputs = [
"actions/sync_actions.ts",
- "components/modals/addNewChainCameraOption.tsx",
- "components/modals/addNewChainNoCamera.tsx",
+ "components/commonDialogs/areYouSure.tsx",
+ "components/commonDialogs/cancelDeviceSyncing.tsx",
"components/modals/deviceType.tsx",
"components/modals/enterSyncCode.tsx",
"components/modals/removeDevice.tsx",
diff --git a/components/brave_sync/ui/actions/sync_actions.ts b/components/brave_sync/ui/actions/sync_actions.ts
index d74a81a12bef..7ba6f6fa3153 100644
--- a/components/brave_sync/ui/actions/sync_actions.ts
+++ b/components/brave_sync/ui/actions/sync_actions.ts
@@ -115,8 +115,8 @@ export const onSyncSetupError = (error: Sync.SetupErrorType) => {
/**
* Reset the Sync Error
*/
-export const resetSyncSetupError = () => {
- return action(types.SYNC_RESET_SETUP_ERROR)
+export const clearSyncSetupError = () => {
+ return action(types.SYNC_CLEAR_SETUP_ERROR)
}
/**
diff --git a/components/brave_sync/ui/brave_sync.html b/components/brave_sync/ui/brave_sync.html
index b6bfa5a8d8c1..586f9b1955c1 100644
--- a/components/brave_sync/ui/brave_sync.html
+++ b/components/brave_sync/ui/brave_sync.html
@@ -22,7 +22,8 @@
diff --git a/components/brave_sync/ui/components/commonDialogs/areYouSure.tsx b/components/brave_sync/ui/components/commonDialogs/areYouSure.tsx
new file mode 100644
index 000000000000..80472e443a4d
--- /dev/null
+++ b/components/brave_sync/ui/components/commonDialogs/areYouSure.tsx
@@ -0,0 +1,35 @@
+/* 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 } 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')}
+
+ )
+ }
+}
diff --git a/components/brave_sync/ui/components/commonDialogs/cancelDeviceSyncing.tsx b/components/brave_sync/ui/components/commonDialogs/cancelDeviceSyncing.tsx
new file mode 100644
index 000000000000..bc8fd9d13f4b
--- /dev/null
+++ b/components/brave_sync/ui/components/commonDialogs/cancelDeviceSyncing.tsx
@@ -0,0 +1,36 @@
+/* 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/components/disabledContent.tsx b/components/brave_sync/ui/components/disabledContent.tsx
index ac3f9a8048ea..3faed65cde79 100644
--- a/components/brave_sync/ui/components/disabledContent.tsx
+++ b/components/brave_sync/ui/components/disabledContent.tsx
@@ -11,10 +11,11 @@ import { Button } from 'brave-ui'
import {
Main,
Title,
- SectionBlock,
DisabledContentButtonGrid,
TableGrid,
- Paragraph
+ Paragraph,
+ SyncCard,
+ DisabledContent
} from 'brave-ui/features/sync'
import { SyncStartIcon } from 'brave-ui/features/sync/images'
@@ -62,45 +63,43 @@ export default class SyncDisabledContent extends React.PureComponent
- {
- newToSync
- ?
- : null
- }
- {
- existingSyncCode
- ?
- : null
- }
-
-
-
-
{getLocale('syncTitle')}
-
{getLocale('syncDescription')}
-
-
-
+
+
+ {
+ newToSync
+ ?
+ : null
+ }
+ {
+ existingSyncCode
+ ?
+ : null
+ }
+
+
+
+
+
{getLocale('syncTitle')}
+
{getLocale('syncDescription')}
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
)
}
}
diff --git a/components/brave_sync/ui/components/enabledContent.tsx b/components/brave_sync/ui/components/enabledContent.tsx
index 18ff3f871ce0..117bc43a5c39 100644
--- a/components/brave_sync/ui/components/enabledContent.tsx
+++ b/components/brave_sync/ui/components/enabledContent.tsx
@@ -6,6 +6,7 @@ import * as React from 'react'
// Components
import { Button, AlertBox } from 'brave-ui'
+import { CloseCircleIcon } from 'brave-ui/components/icons'
import Table, { Cell, Row } from 'brave-ui/components/dataTables/table'
import { Toggle } from 'brave-ui/features/shields'
@@ -13,20 +14,23 @@ import { Toggle } from 'brave-ui/features/shields'
import {
Main,
Title,
- SettingsToggleGrid,
- SwitchLabel,
+ Paragraph,
SectionBlock,
SubTitle,
TableRowDevice,
TableRowRemove,
TableRowRemoveButton,
+ TableRowToggleButton,
TableGrid,
- TableButtonGrid
+ TableButtonGrid,
+ EnabledContent,
+ SyncCard
} from 'brave-ui/features/sync'
// Modals
import RemoveDeviceModal from './modals/removeDevice'
import ViewSyncCodeModal from './modals/viewSyncCode'
+import ScanCodeModal from './modals/scanCode'
import DeviceTypeModal from './modals/deviceType'
import ResetSyncModal from './modals/resetSync'
@@ -41,6 +45,7 @@ interface Props {
interface State {
removeDevice: boolean
viewSyncCode: boolean
+ scanCode: boolean
addDevice: boolean
resetSync: boolean
deviceToRemoveName: string | undefined
@@ -53,6 +58,7 @@ export default class SyncEnabledContent extends React.PureComponent {
+ getDevicesRows = (devices?: any): Row[] | undefined => {
if (!devices) {
return
}
@@ -81,7 +87,7 @@ export default class SyncEnabledContent extends React.PureComponent
- ×
+
)
}
@@ -91,7 +97,7 @@ export default class SyncEnabledContent extends React.PureComponent{getLocale('deviceName')} },
{ content: getLocale('addedOn') },
@@ -99,6 +105,33 @@ export default class SyncEnabledContent extends React.PureComponent{getLocale('settings')} },
+ { content: '' }
+ ]
+ }
+
+ get settingsRows (): Row[] {
+ return [
+ {
+ content: [
+ { content: getLocale('bookmarks') },
+ { content: (
+
+
+
+ ) }
+ ]
+ }
+ ]
+ }
+
onClickRemoveDeviceButton = (event: React.MouseEvent) => {
if (!event || !event.currentTarget || !event.currentTarget.dataset) {
return
@@ -107,16 +140,28 @@ export default class SyncEnabledContent extends React.PureComponent {
+ this.setState({ removeDevice: !this.state.removeDevice })
+ }
+
onUserNoticedError = () => {
- this.props.actions.resetSyncSetupError()
+ this.props.actions.clearSyncSetupError()
+ }
+
+ onClickCancelChildModals = () => {
+ this.setState({ scanCode: false, viewSyncCode: false })
}
onClickViewSyncCodeButton = () => {
- this.setState({ viewSyncCode: !this.state.viewSyncCode })
+ this.setState({ scanCode: false, viewSyncCode: true })
+ }
+
+ onClickScanCodeButton = () => {
+ this.setState({ scanCode: true, viewSyncCode: false })
}
onClickAddDeviceButton = () => {
@@ -136,6 +181,7 @@ export default class SyncEnabledContent extends React.PureComponent
- {
- syncData.error === 'ERR_SYNC_NO_INTERNET'
- ?
- {getLocale('errorNoInternetTitle')}
- {getLocale('errorNoInternetDescription')}
-
- : null
- }
- {
- syncData.error === 'ERR_SYNC_INIT_FAILED'
- ?
- {getLocale('errorSyncInitFailedTitle')}
- {getLocale('errorSyncInitFailedDescription')}
-
- : null
- }
- {
- removeDevice
- ? (
-
- )
- : null
- }
- {
- viewSyncCode
- ?
- : null
- }
- {
- addDevice
- ?
+
+
+ {
+ syncData.error === 'ERR_SYNC_NO_INTERNET'
+ ?
+ {getLocale('errorNoInternetTitle')}
+ {getLocale('errorNoInternetDescription')}
+
: null
- }
- {
- resetSync
- ?
+ }
+ {
+ syncData.error === 'ERR_SYNC_INIT_FAILED'
+ ?
+ {getLocale('errorSyncInitFailedTitle')}
+ {getLocale('errorSyncInitFailedDescription')}
+
: null
- }
- {getLocale('braveSync')}
-
- {getLocale('syncChainDevices')}
-
-
-
-
+ }
+ {
+ removeDevice
+ ? (
+
+ )
+ : null
+ }
+ {
+ viewSyncCode
+ ? (
+
+ ) : null
+ }
+ {
+ scanCode
+ ? (
+
+ ) : null
+ }
+ {
+ addDevice
+ ?
+ : null
+ }
+ {
+ resetSync
+ ?
+ : null
+ }
+
+ {getLocale('braveSync')}
+ {getLocale('syncChainDevices')}
+
+
+
+
+
+
+
+
+
+
+ {getLocale('settingsTitle')}
+ {getLocale('settingsDescription')}
+
+
+
+
-
-
-
-
- {getLocale('dataToSync')} {syncData.thisDeviceName}
-
-
-
- {getLocale('bookmarks')}
-
-
-
-
-
-
-
+
+
+
+
)
}
}
diff --git a/components/brave_sync/ui/components/modals/addNewChainCameraOption.tsx b/components/brave_sync/ui/components/modals/addNewChainCameraOption.tsx
deleted file mode 100644
index d05c283d4f9d..000000000000
--- a/components/brave_sync/ui/components/modals/addNewChainCameraOption.tsx
+++ /dev/null
@@ -1,122 +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 { Button, Modal, TextAreaClipboard } from 'brave-ui'
-
-// Feature-specific components
-import {
- ModalHeader,
- ModalTitle,
- ModalSubTitle,
- ModalContent,
- ThreeColumnButtonGrid,
- ThreeColumnButtonGridCol2,
- ThreeColumnButtonGridCol1
-} from 'brave-ui/features/sync'
-
-// Modals
-import ScanCodeModal from './scanCode'
-
-// Utils
-import { getLocale } from '../../../../common/locale'
-
-interface Props {
- fromMobileScreen?: boolean
- syncData: Sync.State
- actions: any
- onClose: () => void
-}
-
-interface State {
- useCameraInstead: boolean
-}
-
-export default class AddNewChainCameraOptionModal extends React.PureComponent {
- constructor (props: Props) {
- super(props)
- this.state = {
- useCameraInstead: false
- }
- }
-
- onClickUseCameraInsteadButton = () => {
- this.setState({ useCameraInstead: !this.state.useCameraInstead })
- }
-
- render () {
- const { fromMobileScreen, onClose, syncData, actions } = this.props
- const { useCameraInstead } = this.state
-
- return (
-
- {
- useCameraInstead
- ?
- : null
- }
-
-
-
- {
- fromMobileScreen
- ? getLocale('mobileEnterThisCode')
- : getLocale('enterThisCode')
- }
-
- {getLocale('syncChainCodeHowTo')}
-
-
-
- {
- syncData.syncWords
- ? (
-
- )
- : null
- }
-
-
-
-
-
-
-
-
-
-
-
- )
- }
-}
diff --git a/components/brave_sync/ui/components/modals/addNewChainNoCamera.tsx b/components/brave_sync/ui/components/modals/addNewChainNoCamera.tsx
deleted file mode 100644
index 6d537d635a5c..000000000000
--- a/components/brave_sync/ui/components/modals/addNewChainNoCamera.tsx
+++ /dev/null
@@ -1,81 +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 { Button, Modal, TextAreaClipboard } from 'brave-ui'
-
-// Feature-specific components
-import {
- ModalHeader,
- ModalTitle,
- ModalSubTitle,
- ModalContent,
- TwoColumnButtonGrid,
- OneColumnButtonGrid
-} from 'brave-ui/features/sync'
-
-// Utils
-import { getLocale } from '../../../../common/locale'
-
-interface Props {
- syncData: Sync.State
- actions: any
- onClose: () => void
-}
-
-export default class AddNewChainNoCameraModal extends React.PureComponent {
- render () {
- const { onClose, syncData } = this.props
-
- return (
-
-
-
- {getLocale('enterThisCode')}
- {getLocale('syncChainCodeHowTo')}
-
-
-
- {
- syncData.syncWords
- ? (
-
- )
- : null
- }
-
-
-
-
-
-
-
-
- )
- }
-}
diff --git a/components/brave_sync/ui/components/modals/deviceType.tsx b/components/brave_sync/ui/components/modals/deviceType.tsx
index f5aec3c09bc5..3f77cbb6d090 100644
--- a/components/brave_sync/ui/components/modals/deviceType.tsx
+++ b/components/brave_sync/ui/components/modals/deviceType.tsx
@@ -5,7 +5,7 @@
import * as React from 'react'
// Components
-import { Button, Modal, AlertBox } from 'brave-ui'
+import { Modal, AlertBox } from 'brave-ui'
// Feature-specific components
import {
@@ -19,8 +19,8 @@ import {
} from 'brave-ui/features/sync'
// Modals
-import AddNewChainNoCameraModal from './addNewChainNoCamera'
-import ScanCodeModal from './scanCode'
+import ViewSyncCode from './viewSyncCode'
+import ScanCode from './scanCode'
// Utils
import { getLocale } from '../../../../common/locale'
@@ -35,7 +35,7 @@ interface Props {
}
interface State {
- addNewChainNoCamera: boolean
+ viewSyncCode: boolean
scanCode: boolean
}
@@ -43,12 +43,12 @@ export default class DeviceTypeModal extends React.PureComponent {
constructor (props: Props) {
super(props)
this.state = {
- addNewChainNoCamera: false,
+ viewSyncCode: false,
scanCode: false
}
}
- componentWillMount () {
+ componentDidMount () {
// 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
@@ -58,36 +58,28 @@ export default class DeviceTypeModal extends React.PureComponent {
}
onUserNoticedError = () => {
- this.props.actions.resetSyncSetupError()
+ this.props.actions.clearSyncSetupError()
this.props.onClose()
}
- onClickClose = () => {
- const { devices, isSyncConfigured } = this.props.syncData
- // sync is enabled when at least 2 devices are in the chain.
- // this modal works both with sync enabled and disabled states.
- // in case user opens it in the enabled content screen,
- // check there are 2 devices in chain before reset
- if (isSyncConfigured && devices.length < 2) {
- this.props.actions.onSyncReset()
- }
- this.props.onClose()
+ onClickCancelChildModals = () => {
+ this.setState({ scanCode: false, viewSyncCode: false })
}
onClickPhoneTabletButton = () => {
- this.setState({ scanCode: !this.state.scanCode })
+ this.setState({ scanCode: true, viewSyncCode: false })
}
onClickComputerButton = () => {
- this.setState({ addNewChainNoCamera: !this.state.addNewChainNoCamera })
+ this.setState({ scanCode: false, viewSyncCode: true })
}
render () {
- const { actions, syncData } = this.props
- const { addNewChainNoCamera, scanCode } = this.state
+ const { onClose, actions, syncData } = this.props
+ const { viewSyncCode, scanCode } = this.state
return (
-
+
{
syncData.error === 'ERR_SYNC_NO_INTERNET'
?
@@ -106,40 +98,42 @@ export default class DeviceTypeModal extends React.PureComponent {
}
{
scanCode
- ?
- : null
+ ? (
+
+ ) : null
}
{
- addNewChainNoCamera
- ?
- : null
+ viewSyncCode
+ ? (
+
+ ) : null
}
- {getLocale('letsSync')} “{syncData.thisDeviceName}”.
+ {getLocale('letsSync')}
{getLocale('chooseDeviceType')}
-
+
-
+ {getLocale('phoneTablet')}
-
+
-
+ {getLocale('computer')}
diff --git a/components/brave_sync/ui/components/modals/enterSyncCode.tsx b/components/brave_sync/ui/components/modals/enterSyncCode.tsx
index 4e7e9f734e49..9dab52363d90 100644
--- a/components/brave_sync/ui/components/modals/enterSyncCode.tsx
+++ b/components/brave_sync/ui/components/modals/enterSyncCode.tsx
@@ -19,6 +19,9 @@ import {
SubTitle
} from 'brave-ui/features/sync'
+// Icons
+import { LoaderIcon } from 'brave-ui/components/icons'
+
// Utils
import { getLocale } from '../../../../common/locale'
@@ -29,37 +32,77 @@ interface Props {
}
interface State {
passphrase: string
+ willCreateNewSyncChainFromCode: boolean
}
export default class EnterSyncCodeModal extends React.PureComponent {
constructor (props: Props) {
super(props)
this.state = {
- passphrase: ''
+ passphrase: '',
+ willCreateNewSyncChainFromCode: false
+ }
+ }
+
+ componentDidUpdate (prevProps: Props) {
+ // when component updates with a different config, disable the
+ // loading state and unfreeze the modal. at this point the component
+ // auto refresh and lead the user to the enabledContent view
+ if (
+ this.props.syncData.error !== undefined ||
+ (
+ this.state.willCreateNewSyncChainFromCode &&
+ prevProps.syncData.isSyncConfigured !==
+ this.props.syncData.isSyncConfigured &&
+ this.props.syncData.devices.length > 1
+ )
+ ) {
+ this.setState({ willCreateNewSyncChainFromCode: false })
+ this.props.onClose()
+ return
+ }
+
+ // eventually re-enable this dialog if it takes too long to process.
+ // this is useful when the back-end isn't responsive and avoids letting
+ // the user stuck in a blocked interface. this does not enable sync via code words
+ if (
+ this.state.willCreateNewSyncChainFromCode &&
+ this.props.syncData.isSyncConfigured === false
+ ) {
+ window.setTimeout(() =>
+ this.setState({ willCreateNewSyncChainFromCode: false }
+ ), 30000)
}
}
onUserNoticedError = () => {
- this.props.actions.resetSyncSetupError()
+ this.props.actions.clearSyncSetupError()
}
onEnterPassphrase = (event: React.ChangeEvent) => {
this.setState({ passphrase: event.target.value })
}
+ onDismissModal = () => {
+ this.props.onClose()
+ }
+
onClickConfirmSyncCode = () => {
const { error, thisDeviceName } = this.props.syncData
if (thisDeviceName !== '' || error) {
return
}
const { passphrase } = this.state
+ this.setState({ willCreateNewSyncChainFromCode: true })
this.props.actions.onSetupSyncHaveCode(passphrase, '')
}
render () {
- const { onClose, syncData } = this.props
+ const { syncData } = this.props
+ const { willCreateNewSyncChainFromCode } = this.state
+
return (
-
+
{
syncData.error === 'ERR_SYNC_WRONG_WORDS'
?
@@ -110,7 +153,8 @@ export default class EnterSyncCodeModal extends React.PureComponent
@@ -120,6 +164,11 @@ export default class EnterSyncCodeModal extends React.PureComponent
+ }}
/>
diff --git a/components/brave_sync/ui/components/modals/removeDevice.tsx b/components/brave_sync/ui/components/modals/removeDevice.tsx
index 2a445893a9da..f9312f522c64 100644
--- a/components/brave_sync/ui/components/modals/removeDevice.tsx
+++ b/components/brave_sync/ui/components/modals/removeDevice.tsx
@@ -17,35 +17,70 @@ import {
OneColumnButtonGrid
} from 'brave-ui/features/sync'
+// Icons
+import { LoaderIcon } from 'brave-ui/components/icons'
+
// Utils
import { getLocale } from '../../../../common/locale'
interface Props {
+ syncData: Sync.State
onClose: (event?: React.MouseEvent) => void
actions: any
deviceName: string | undefined
- deviceId: number | undefined
+ deviceId: string | undefined
+}
+
+interface State {
+ willRemoveDevice: boolean
}
-export default class RemoveMainDeviceModal extends React.PureComponent {
+export default class RemoveMainDeviceModal extends React.PureComponent {
+ constructor (props: Props) {
+ super(props)
+ this.state = { willRemoveDevice: false }
+ }
+
+ componentDidUpdate (prevProps: Props) {
+ // if devices lengh is different it means that sync
+ // computed the device removal. in this case, cancel
+ // the loading state and close the modal
+ if (
+ prevProps.syncData.devices.length !==
+ this.props.syncData.devices.length
+ ) {
+ this.setState({ willRemoveDevice: false })
+ this.props.onClose()
+ }
+ }
+
+ onDismissModal = () => {
+ this.props.onClose()
+ }
+
onClickConfirmRemoveDeviceButton = () => {
- const { deviceName, deviceId } = this.props
+ const { syncData, deviceName, deviceId } = this.props
+ // if there aren't enough devices, reset sync
+ if (syncData.devices.length < 2) {
+ this.props.actions.onSyncReset()
+ return
+ }
this.props.actions.onRemoveDevice(Number(deviceId), deviceName)
- this.props.onClose()
+ this.setState({ willRemoveDevice: true })
}
render () {
- const { onClose, deviceName, deviceId } = this.props
+ const { syncData, deviceName, deviceId } = this.props
+ const { willRemoveDevice } = this.state
return (
-
+
{getLocale('remove')} “{deviceName}” {getLocale('thisSyncChain')}?
{
- // zero is always the this device
- deviceId === 0
+ deviceId === syncData.thisDeviceId
?
{getLocale('thisDeviceRemovalDescription')}
{getLocale('joinSyncChain')}
@@ -57,18 +92,24 @@ export default class RemoveMainDeviceModal extends React.PureComponent
+ }}
/>
diff --git a/components/brave_sync/ui/components/modals/resetSync.tsx b/components/brave_sync/ui/components/modals/resetSync.tsx
index 56b32eb4691a..100177848d99 100644
--- a/components/brave_sync/ui/components/modals/resetSync.tsx
+++ b/components/brave_sync/ui/components/modals/resetSync.tsx
@@ -5,7 +5,7 @@
import * as React from 'react'
// Components
-import { AlertBox, Button, Modal } from 'brave-ui'
+import { Button, Modal } from 'brave-ui'
// Feature-specific components
import {
@@ -15,10 +15,15 @@ import {
ModalContent,
TwoColumnButtonGrid,
OneColumnButtonGrid,
- Title,
Paragraph
} from 'brave-ui/features/sync'
+// Icons
+import { LoaderIcon } from 'brave-ui/components/icons'
+
+// Dialogs
+import AreYouSure from '../commonDialogs/areYouSure'
+
// Utils
import { getLocale } from '../../../../common/locale'
@@ -30,45 +35,58 @@ interface Props {
interface State {
showAlert: boolean
+ willResetSync: boolean
}
export default class ResetSyncModal extends React.PureComponent {
constructor (props: Props) {
super(props)
- this.state = { showAlert: false }
+ this.state = {
+ showAlert: false,
+ willResetSync: false
+ }
+ }
+
+ componentDidUpdate (prevProps: Props) {
+ // wait until sync is not configured to proceed
+ if (
+ prevProps.syncData.isSyncConfigured !==
+ this.props.syncData.isSyncConfigured
+ ) {
+ this.setState({ willResetSync: false })
+ this.props.onClose()
+ }
+ }
+
+ onDismissModal = () => {
+ this.props.onClose()
}
- onResetSync = () => {
+ onClickResetSync = () => {
this.setState({ showAlert: !this.state.showAlert })
}
onConfirmResetSync = () => {
+ this.setState({
+ showAlert: false,
+ willResetSync: true
+ })
this.props.actions.onSyncReset()
}
render () {
- const { onClose, syncData } = this.props
- const { showAlert } = this.state
+ const { syncData } = this.props
+ const { showAlert, willResetSync } = this.state
if (!syncData) {
return null
}
return (
-
+
{
- showAlert
- ? (
-
- {getLocale('areYouSure')}
-
- )
- : null
+ showAlert &&
+
}
@@ -84,18 +102,24 @@ export default class ResetSyncModal extends React.PureComponent
{
+ }}
/>
diff --git a/components/brave_sync/ui/components/modals/scanCode.tsx b/components/brave_sync/ui/components/modals/scanCode.tsx
index ef2fd401febd..dd2928e16ee2 100644
--- a/components/brave_sync/ui/components/modals/scanCode.tsx
+++ b/components/brave_sync/ui/components/modals/scanCode.tsx
@@ -6,20 +6,21 @@ import * as React from 'react'
// Components
import { Button, Modal } from 'brave-ui'
+import { LoaderIcon } from 'brave-ui/components/icons'
// Feature-specific components
import {
ModalHeader,
- ModalTitle,
- ModalSubTitle,
+ Title,
+ Bold,
+ Paragraph,
ScanGrid,
ThreeColumnButtonGrid,
- ThreeColumnButtonGridCol1,
- ThreeColumnButtonGridCol2
+ Link
} from 'brave-ui/features/sync'
-// Modals
-import AddNewChainCameraOptionModal from './addNewChainCameraOption'
+// Dialogs
+import CancelDeviceSyncingDialog from '../commonDialogs/cancelDeviceSyncing'
// Utils
import { getLocale } from '../../../../common/locale'
@@ -31,38 +32,95 @@ interface Props {
syncData: Sync.State
actions: any
onClose: () => void
+ onClickViewSyncCodeInstead: () => void
+ onCloseDeviceTypeModal?: () => void
}
+
interface State {
- enterCodeWordsInstead: boolean
+ willCancelScanCode: boolean
+ newDeviceFound: boolean
}
export default class ScanCodeModal extends React.PureComponent {
constructor (props: Props) {
super(props)
this.state = {
- enterCodeWordsInstead: false
+ willCancelScanCode: false,
+ newDeviceFound: false
+ }
+ }
+
+ componentDidUpdate (prevProps: Readonly) {
+ if (
+ this.props.syncData.devices.length > 1 &&
+ prevProps.syncData.devices.length !==
+ this.props.syncData.devices.length
+ ) {
+ this.setState({ newDeviceFound: true })
+ }
+
+ const { newDeviceFound } = this.state
+ // when a device is found, self-close all modals
+ if (newDeviceFound) {
+ this.dismissAllModals()
+ }
+ }
+
+ dismissAllModals = () => {
+ this.props.onClose()
+ if (this.props.onCloseDeviceTypeModal) {
+ this.props.onCloseDeviceTypeModal()
}
}
- onClickEnterCodeWordsInstead = () => {
- this.setState({ enterCodeWordsInstead: !this.state.enterCodeWordsInstead })
+ onClickViewCodeWordsInstead = () => {
+ this.props.onClickViewSyncCodeInstead()
+ }
+
+ onDismissModal = () => {
+ const { devices, isSyncConfigured } = this.props.syncData
+ // if user is still trying to build a sync chain,
+ // open the confirmation modal. otherwise close it
+ isSyncConfigured && devices.length < 2
+ ? this.setState({ willCancelScanCode: true })
+ : this.dismissAllModals()
+ }
+
+ onDismissDialog = () => {
+ this.setState({ willCancelScanCode: false })
+ }
+
+ onConfirmDismissModal = () => {
+ const { devices, isSyncConfigured } = this.props.syncData
+ // sync is enabled when at least 2 devices are in the chain.
+ // this modal works both with sync enabled and disabled states.
+ // in case user opens it in the enabled content screen,
+ // check there are 2 devices in chain before reset
+ if (isSyncConfigured && devices.length < 2) {
+ this.props.actions.onSyncReset()
+ this.dismissAllModals()
+ }
+ this.setState({ willCancelScanCode: false })
+ this.props.onClose()
}
render () {
- const { onClose, syncData, actions } = this.props
- const { enterCodeWordsInstead } = this.state
+ const { syncData } = this.props
+ const { willCancelScanCode, newDeviceFound } = this.state
return (
-
+
{
- enterCodeWordsInstead
- ?
- : null
+ willCancelScanCode
+ ?
+ : null
}
-
{getLocale('scanThisCode')}
-
{getLocale('scanThisCodeHowTo')}
+
{getLocale('scanThisCode')}
+
+ {getLocale('scanThisCodeHowToPartial1')} {getLocale('scanThisCodeHowToPartial2')} {getLocale('scanThisCodeHowToPartial3')}
+
@@ -74,36 +132,38 @@ export default class ScanCodeModal extends React.PureComponent {
}
-
-
-
-
+
+ {getLocale('cancel')}
+
+
+
+
+ : null
+ }}
/>
-
+
)
diff --git a/components/brave_sync/ui/components/modals/viewSyncCode.tsx b/components/brave_sync/ui/components/modals/viewSyncCode.tsx
index 4a6da3df73ed..ade60cf2f11d 100644
--- a/components/brave_sync/ui/components/modals/viewSyncCode.tsx
+++ b/components/brave_sync/ui/components/modals/viewSyncCode.tsx
@@ -4,37 +4,121 @@
import * as React from 'react'
- // Components
+// Components
import { Button, Modal, TextAreaClipboard } from 'brave-ui'
+import { LoaderIcon } from 'brave-ui/components/icons'
// Feature-specific components
import {
- ViewSyncCodeGrid,
- ModalTitle,
- TwoColumnButtonGrid
+ ModalHeader,
+ Title,
+ Paragraph,
+ ThreeColumnButtonGrid,
+ Bold,
+ Link
} from 'brave-ui/features/sync'
+// Dialogs
+import CancelDeviceSyncingDialog from '../commonDialogs/cancelDeviceSyncing'
+
// Utils
import { getLocale } from '../../../../common/locale'
-// Images
-import { QRCode } from 'brave-ui/features/sync/images'
-
interface Props {
syncData: Sync.State
actions: any
onClose: () => void
+ onClickScanCodeInstead: () => void
+ onCloseDeviceTypeModal?: () => void
+}
+
+interface State {
+ willCancelViewCode: boolean
+ newDeviceFound: boolean
}
-export default class ViewSyncCodeModal extends React.PureComponent {
+export default class ViewSyncCodeModal extends React.PureComponent {
+ constructor (props: Props) {
+ super(props)
+ this.state = {
+ willCancelViewCode: false,
+ newDeviceFound: false
+ }
+ }
+
+ componentDidUpdate (prevProps: Readonly) {
+ if (
+ this.props.syncData.devices.length > 1 &&
+ prevProps.syncData.devices.length !==
+ this.props.syncData.devices.length
+ ) {
+ this.setState({ newDeviceFound: true })
+ }
+
+ const { newDeviceFound } = this.state
+ // when a device is found, self-close this modal
+ if (newDeviceFound) {
+ this.dismissAllModals()
+ }
+ }
+
+ dismissAllModals = () => {
+ this.props.onClose()
+ if (this.props.onCloseDeviceTypeModal) {
+ this.props.onCloseDeviceTypeModal()
+ }
+ }
+
+ onClickUseCameraInsteadButton = () => {
+ this.props.onClickScanCodeInstead()
+ }
+
+ onDismissModal = () => {
+ const { devices, isSyncConfigured } = this.props.syncData
+ // if user is still trying to build a sync chain,
+ // open the confirmation modal. otherwise close it
+ isSyncConfigured && devices.length < 2
+ ? this.setState({ willCancelViewCode: true })
+ : this.dismissAllModals()
+ }
+
+ onDismissDialog = () => {
+ this.setState({ willCancelViewCode: false })
+ }
+
+ onConfirmDismissModal = () => {
+ const { devices, isSyncConfigured } = this.props.syncData
+ // sync is enabled when at least 2 devices are in the chain.
+ // this modal works both with sync enabled and disabled states.
+ // in case user opens it in the enabled content screen,
+ // check there are 2 devices in chain before reset
+ if (isSyncConfigured && devices.length < 2) {
+ this.props.actions.onSyncReset()
+ this.dismissAllModals()
+ }
+ this.setState({ willCancelViewCode: false })
+ this.props.onClose()
+ }
+
render () {
- const { onClose, syncData } = this.props
+ const { syncData } = this.props
+ const { willCancelViewCode, newDeviceFound } = this.state
return (
-
-
+
+ {
+ willCancelViewCode
+ ?
+ : null
+ }
+
-
{getLocale('wordCode')}
+
{getLocale('chainCode')}
+
+ {getLocale('chainCodeDescriptionPartial1')} {getLocale('chainCodeDescriptionPartial2')} {getLocale('chainCodeDescriptionPartial3')}
+
+
+
{
syncData.syncWords
? (
@@ -47,35 +131,38 @@ export default class ViewSyncCodeModal extends React.PureComponent {
)
: null
}
+
+
+ {getLocale('cancel')}
- {getLocale('qrCode')}
- {
- syncData.seedQRImageSource
- ? (
-
- )
- : null
- }
+
-
-
- {getLocale('privateKey')}
+ : null
+ }}
/>
-
+
)
}
diff --git a/components/brave_sync/ui/constants/sync_types.ts b/components/brave_sync/ui/constants/sync_types.ts
index ac14364769ad..b08758d0f6cc 100644
--- a/components/brave_sync/ui/constants/sync_types.ts
+++ b/components/brave_sync/ui/constants/sync_types.ts
@@ -16,6 +16,6 @@ export const enum types {
SYNC_BROWSING_HISTORY = '@@sync/SYNC_BROWSING_HISTORY',
SYNC_SETUP_SYNC_HAVE_CODE = '@@sync/SYNC_SETUP_SYNC_HAVE_CODE',
SYNC_SETUP_ERROR = '@@sync/SYNC_SETUP_ERROR',
- SYNC_RESET_SETUP_ERROR = '@@sync/SYNC_RESET_SETUP_ERROR',
+ SYNC_CLEAR_SETUP_ERROR = '@@sync/SYNC_CLEAR_SETUP_ERROR',
SYNC_ON_LOG_MESSAGE = '@@sync/SYNC_ON_LOG_MESSAGE'
}
diff --git a/components/brave_sync/ui/reducers/sync_reducer.ts b/components/brave_sync/ui/reducers/sync_reducer.ts
index 3c8b9de3e740..c87cec88ffe5 100644
--- a/components/brave_sync/ui/reducers/sync_reducer.ts
+++ b/components/brave_sync/ui/reducers/sync_reducer.ts
@@ -125,7 +125,7 @@ const syncReducer: Reducer = (state: Sync.State | undefi
state = { ...state, error: payload.error }
break
- case types.SYNC_RESET_SETUP_ERROR:
+ case types.SYNC_CLEAR_SETUP_ERROR:
state = { ...state, error: undefined }
break
diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd
index 80b7c2d01aed..5d5f9c50ab9a 100644
--- a/components/resources/brave_components_strings.grd
+++ b/components/resources/brave_components_strings.grd
@@ -454,25 +454,31 @@
Word Count:
Ok
Cancel
+ Exiting this modal early will delete the current chain and the devices looking for this code will not be able to sync. This modal will exit automatically when a successful sync connection is made.
+ Exit Modal
from this sync chain
+ View Code Words
+ Looking for device
Brave Sync
- Devices in your sync chain
+ The device list below includes all devices in your sync chain. Each device can be managed from any other device.
device name
(This Device)
- added on
- add device
- view QR code and code words
- Data to sync from
+ Date Added
+ Add New Device
+ View Sync Code
+ Brave Sync Settings
+ Manage what information you would like to sync between devices. These settings only effect this device.
+ Settings
Bookmarks
Saved Site Settings
Browsing History
Leave Sync Chain
- Brave Sync allows you to sync bookmarks data privately between your Brave Browsers on your various devices.
- When you start a new sync chain, a new sync code is created. You will use this same code across your devices to link them together.
- Start a new sync chain
- Enter a sync chain code
+ Brave Sync Setup
+ To start, you will need Brave installed on all the devices you plan to sync. To chain them together, start a sync chain that you will use to securely link all of your devices together.
+ Start a New Sync Chain
+ I Have a Sync Code
Confirm Sync Code
Enter a sync code
@@ -490,27 +496,23 @@
Your local data on this device will be retained but all data in Brave’s Sync cache will be deleted.
You can start a new sync chain or sync with a new device by entering its sync chain code.
Are you sure?
-
- Now, using Brave on your mobile device, scan this code.
- Go to: Brave Settings > Sync > Scan Sync Code
- Enter code words instead...
- < Previous
- Looking for device
-
-
- Now, using Brave on your computer, enter this code:
- Now, using Brave on your mobile device, enter this code:
- Go to: Brave Settings > Sync > Enter a Sync Chain Code
- Use my camera instead...
+
+ Sync Chain QR Code
+ On your mobile device, navigate to Brave Sync in the Settings panel and click the button
+ “Scan Sync Code”
+ Use your camera to scan the QR Code below.
+
+ Sync Chain Code
+ On your target computer, navigate to Brave Sync in settings and click the button
+ “I Have a Sync Code”.
+ Type in the below sync chains code words.
+ Use my camera instead
+ View QR Code
- Let’s sync a new device with
- Choose a device type:
+ Choose Device Type
+ Choose the type of device you would like to sync to.
Phone/Tablet
Computer
-
- QR Code
- Word Code
- This is a private key. If you share it, your private data may be compromised.
Invalid sync code.
Please try again.
diff --git a/package-lock.json b/package-lock.json
index 9a4454da05c4..c88b1377cc5d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -463,7 +463,7 @@
},
"ansi-escapes": {
"version": "3.1.0",
- "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
"integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==",
"dev": true
},
@@ -542,7 +542,7 @@
},
"array-equal": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
"dev": true
},
@@ -1237,8 +1237,8 @@
}
},
"brave-ui": {
- "version": "github:brave/brave-ui#0ef71e2127af947ff7f2e6e830cc61dfac360123",
- "from": "github:brave/brave-ui#0ef71e2127af947ff7f2e6e830cc61dfac360123",
+ "version": "github:brave/brave-ui#2e89af51c9e142a9af4b8952f06a6168411ca12a",
+ "from": "github:brave/brave-ui#2e89af51c9e142a9af4b8952f06a6168411ca12a",
"dev": true,
"requires": {
"emptykit.css": "^1.0.1",
@@ -1484,7 +1484,7 @@
},
"callsites": {
"version": "2.0.0",
- "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
"dev": true
},
@@ -1857,7 +1857,7 @@
},
"color-string": {
"version": "0.3.0",
- "resolved": "http://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz",
"integrity": "sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=",
"dev": true,
"requires": {
@@ -1877,7 +1877,7 @@
},
"colors": {
"version": "1.1.2",
- "resolved": "http://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
"dev": true
},
@@ -2256,7 +2256,7 @@
},
"d": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/d/-/d-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"dev": true,
"requires": {
@@ -2468,7 +2468,7 @@
},
"doctrine": {
"version": "0.7.2",
- "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz",
"integrity": "sha1-fLhgNZujvpDgQLJrcpzkv6ZUxSM=",
"dev": true,
"requires": {
@@ -2921,7 +2921,7 @@
},
"expand-range": {
"version": "1.8.2",
- "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"dev": true,
"requires": {
@@ -4430,7 +4430,7 @@
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": "http://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"dev": true,
"requires": {
@@ -4506,7 +4506,7 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": "http://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"dev": true,
"requires": {
@@ -6324,7 +6324,7 @@
},
"mp4-stream": {
"version": "2.0.3",
- "resolved": "http://registry.npmjs.org/mp4-stream/-/mp4-stream-2.0.3.tgz",
+ "resolved": "https://registry.npmjs.org/mp4-stream/-/mp4-stream-2.0.3.tgz",
"integrity": "sha512-5NzgI0+bGakoZEwnIYINXqB3mnewkt3Y7jcvkXsTubnCNUSdM8cpP0Vemxf6FLg0qUN8fydTgNMVAc3QU8B92g==",
"requires": {
"buffer-alloc": "^1.1.0",
@@ -6428,7 +6428,7 @@
},
"next-tick": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
"dev": true
},
@@ -6522,7 +6522,7 @@
"dependencies": {
"colors": {
"version": "0.5.1",
- "resolved": "http://registry.npmjs.org/colors/-/colors-0.5.1.tgz",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz",
"integrity": "sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=",
"dev": true
}
@@ -6820,7 +6820,7 @@
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
@@ -6949,7 +6949,7 @@
},
"path-browserify": {
"version": "0.0.0",
- "resolved": "http://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
"dev": true
},
@@ -6967,7 +6967,7 @@
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-key": {
@@ -8098,13 +8098,13 @@
},
"regjsgen": {
"version": "0.2.0",
- "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
"dev": true
},
"regjsparser": {
"version": "0.1.5",
- "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"dev": true,
"requires": {
@@ -8220,7 +8220,7 @@
},
"resolve": {
"version": "1.1.7",
- "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
"dev": true
},
@@ -8349,7 +8349,7 @@
},
"safe-regex": {
"version": "1.1.0",
- "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"dev": true,
"requires": {
@@ -8780,7 +8780,7 @@
},
"sprintf-js": {
"version": "1.0.3",
- "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
@@ -8950,7 +8950,7 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
@@ -8958,7 +8958,7 @@
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
@@ -8976,7 +8976,7 @@
},
"strip-eof": {
"version": "1.0.0",
- "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
"dev": true
},
@@ -9572,7 +9572,7 @@
},
"tty-browserify": {
"version": "0.0.0",
- "resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true
},
@@ -9703,7 +9703,7 @@
},
"underscore": {
"version": "1.4.4",
- "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz",
"integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=",
"dev": true
},
@@ -10024,7 +10024,7 @@
},
"vm-browserify": {
"version": "0.0.4",
- "resolved": "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
"dev": true,
"requires": {
@@ -10509,7 +10509,7 @@
},
"string-width": {
"version": "1.0.2",
- "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
diff --git a/package.json b/package.json
index 042c106ee4c2..72c9e8d4eda9 100644
--- a/package.json
+++ b/package.json
@@ -272,7 +272,7 @@
"@types/react-dom": "^16.0.7",
"@types/react-redux": "6.0.4",
"awesome-typescript-loader": "^5.2.0",
- "brave-ui": "github:brave/brave-ui#0ef71e2127af947ff7f2e6e830cc61dfac360123",
+ "brave-ui": "github:brave/brave-ui#2e89af51c9e142a9af4b8952f06a6168411ca12a",
"css-loader": "^0.28.9",
"csstype": "^2.5.5",
"emptykit.css": "^1.0.1",