Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show warning on Desktop before enter existing sync chain (uplift to 1.31.x) #10914

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/brave_generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,13 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U
<message name="IDS_BRAVE_SYNC_DELETE_DEVICE_CONFIRMATION" desc="Confirmation message prompt to make sure the user is ok to delete other device from the chain">
Are you sure you want to remove the selected device from the sync chain?
</message>
<message name="IDS_BRAVE_SYNC_FINAL_SECURITY_WARNING_TEXT" desc="Confirmation message prompt to make sure the user aware his data will be shared with other devices in chain">
Warning: this will share your Brave data, including potentially your passwords, with the device that generated these code words.

Please double check that these code words were generated by a device that you own.

Are you sure you want to do this?
</message>
<!-- Sync Infobar -->
<message name="IDS_BRAVE_SYNC_V2_MIGRATE_INFOBAR_MESSAGE" desc="Message text shown to users who used a previous version of Brave Sync and need to perform setup again for the new version.">
Brave Sync has been upgraded and requires setup
Expand Down
11 changes: 11 additions & 0 deletions browser/resources/settings/brave_sync_page/brave_sync_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import './brave_sync_code_dialog.js';

import {Polymer, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {I18nBehavior} from 'chrome://resources/js/i18n_behavior.m.js';

import {BraveSyncBrowserProxy} from './brave_sync_browser_proxy.js';

Expand All @@ -19,6 +20,10 @@ Polymer({

_template: html`{__html_template__}`,

behaviors: [
I18nBehavior,
],

properties: {
syncCode: {
type: String,
Expand Down Expand Up @@ -65,6 +70,12 @@ Polymer({
},

handleSyncCodeDialogDone_: function (e) {
const messageText = this.i18n('braveSyncFinalSecurityWarning')
const shouldProceed = confirm(messageText)
if (!shouldProceed) {
return;
}

this.submitSyncCode_()
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source,
{"braveSyncResetConfirmation", IDS_BRAVE_SYNC_RESET_CONFIRMATION},
{"braveSyncDeleteDeviceConfirmation",
IDS_BRAVE_SYNC_DELETE_DEVICE_CONFIRMATION},
{"braveSyncFinalSecurityWarning",
IDS_BRAVE_SYNC_FINAL_SECURITY_WARNING_TEXT},
{"braveIPFS", IDS_BRAVE_IPFS_SETTINGS_SECTION},
{"braveWallet", IDS_BRAVE_WALLET_SETTINGS_SECTION},
{"braveHelpTips", IDS_SETTINGS_HELP_TIPS},
Expand Down