From f848c5d992d1ae3a6ef2529b903aebd2de0e96a9 Mon Sep 17 00:00:00 2001 From: petemill Date: Wed, 17 Oct 2018 22:38:32 -0700 Subject: [PATCH] Private New Tab Page now shows only applicable Mac / non-Mac keys to open Tor Also corrects the actual keys in the string Fix https://github.com/brave/brave-browser/issues/1688 --- .../components/privateTab/privateTab.tsx | 9 ++---- .../components/privateTab/qwantTab.tsx | 11 ++----- .../components/privateTab/torContent.tsx | 29 +++++++++++++++++++ .../resources/brave_components_resources.grd | 2 +- 4 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 components/brave_new_tab_ui/components/privateTab/torContent.tsx diff --git a/components/brave_new_tab_ui/components/privateTab/privateTab.tsx b/components/brave_new_tab_ui/components/privateTab/privateTab.tsx index 2af49596a3e2..938f9bf11b7a 100644 --- a/components/brave_new_tab_ui/components/privateTab/privateTab.tsx +++ b/components/brave_new_tab_ui/components/privateTab/privateTab.tsx @@ -17,7 +17,6 @@ import { Text, PrivateImage, DuckDuckGoImage, - TorLockImage, Separator, FakeButton, Link @@ -25,6 +24,7 @@ import { // Components import { Toggle } from 'brave-ui/features/shields' +import TorContent from './torContent' // Helpers import { getLocale } from '../../../common/locale' @@ -74,12 +74,7 @@ export default class PrivateTab extends React.PureComponent { - - - {getLocale('boxTorLabel')} - {getLocale('boxTorTitle')} - {getLocale('boxTorText2')} - + {getLocale('boxTorButton')} diff --git a/components/brave_new_tab_ui/components/privateTab/qwantTab.tsx b/components/brave_new_tab_ui/components/privateTab/qwantTab.tsx index 4ab38d95f7bc..3b571fef9e2b 100644 --- a/components/brave_new_tab_ui/components/privateTab/qwantTab.tsx +++ b/components/brave_new_tab_ui/components/privateTab/qwantTab.tsx @@ -8,17 +8,15 @@ import * as React from 'react' import { Grid2Columns, Box, - Content, HeaderBox, Title, SubTitle, Text, TorImage, - TorLockImage, Separator, FakeButton } from 'brave-ui/features/newTab' - +import TorContent from './torContent' // Helpers import { getLocale } from '../../../common/locale' @@ -40,12 +38,7 @@ export default class QwantTab extends React.PureComponent<{}, {}> { - - - {getLocale('boxTorLabel')} - {getLocale('boxTorTitle')} - {getLocale('boxTorText2')} - + + + {getLocale('boxTorLabel')} + {getLocale('boxTorTitle')} + {getLocale('boxTorText2', { key: torKeyboardShortcutText })} + + ) +} \ No newline at end of file diff --git a/components/resources/brave_components_resources.grd b/components/resources/brave_components_resources.grd index 4647fd525871..bdbdf490186f 100644 --- a/components/resources/brave_components_resources.grd +++ b/components/resources/brave_components_resources.grd @@ -188,7 +188,7 @@ This Private Window is much more private with Tor Tor hides your IP address from the sites you visit, by routing your browsing through several Tor servers before it reaches your destination. These connections are encrypted, so your ISP or employer can’t see which sites you’re visiting either. Tor can slow down browsing and some sites might not work at all. - Using Private Tabs only changes what Brave does on your device — it doesn't change anyone else's behavior. Tor hides your IP address from the sites you visit, and hides the sites you visit from your ISP or your employer. Open a Private Window with Tor from the menu, or with Alt+Shift+N or Option+Shift+N. + Using Private Tabs only changes what Brave does on your device — it doesn't change anyone else's behavior. Tor hides your IP address from the sites you visit, and hides the sites you visit from your ISP or your employer. Open a Private Window with Tor from the menu, or with {{ key }}. Learn more about Tor in Brave