Skip to content

Commit

Permalink
add privacy features help sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
MattLichtenstein committed Jan 18, 2024
1 parent ad299d3 commit 538bf99
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mozillavpn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,11 @@ void MozillaVPN::registerUrlOpenerLabels() {

uo->registerUrlLabel("sumoDns",
[]() -> QString { return Constants::SUMO_DNS; });

uo->registerUrlLabel("sumoPrivacy", []() -> QString {
return "https://support.mozilla.org/en-US/kb/"
"how-do-i-change-my-privacy-features";
});
}

void MozillaVPN::errorHandled() {
Expand Down
12 changes: 12 additions & 0 deletions src/translations/strings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,18 @@ helpSheets:
dnsBody2:
value: Mozilla VPN allows you to choose a custom DNS server if you prefer. If you use one, you won’t be able to use other privacy features in the VPN like tracker blocking.
comment: Body text for the custom dns help sheet
privacyTitle:
value: Privacy features
comment: Title label for the privacy features help sheet
privacyHeader:
value: What do privacy features do for me?
comment: Header label for the privacy features help sheet
privacyBody1:
value: Privacy features give you greater control over the types of content you see, helping you stay safe online.
comment: Body label for the privacy features help sheet
privacyBody2:
value: If you activate these features, they’ll overwrite any custom DNS you’re using. These protections are not a substitute for taking other security precautions—for example, while blocking malware you should still avoid downloading attachments in strange emails.
comment: Body label for the privacy features help sheet

global:
expand:
Expand Down
40 changes: 40 additions & 0 deletions src/ui/screens/settings/privacy/ViewPrivacy.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ MZViewBase {
id: root
objectName: "privacySettingsView"

property Component rightMenuButton: Component {
Loader {
active: MZFeatureList.get("helpSheets").isSupported
sourceComponent: MZIconButton {
onClicked: helpSheetLoader.active = true

accessibleName: MZI18n.GlobalHelp
Accessible.ignored: !visible

Image {
anchors.centerIn: parent

source: "qrc:/nebula/resources/question.svg"
fillMode: Image.PreserveAspectFit
}
}
}
}

_menuTitle: MZI18n.SettingsPrivacySettings

_viewContentData: ColumnLayout {
Expand Down Expand Up @@ -106,5 +125,26 @@ MZViewBase {

onActiveChanged: if (active) { item.open() }
}

Loader {
id: helpSheetLoader

active: false

onActiveChanged: if (active) item.open()

sourceComponent: MZHelpSheet {
title: MZI18n.HelpSheetsPrivacyTitle

model: [
{type: MZHelpSheet.BlockType.Title, text: MZI18n.HelpSheetsPrivacyHeader},
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsPrivacyBody1, margin: 8},
{type: MZHelpSheet.BlockType.Text, text:MZI18n.HelpSheetsPrivacyBody2, margin: 16},
{type: MZHelpSheet.BlockType.LinkButton, text: MZI18n.GlobalLearnMore, margin: 16, action: () => { MZUrlOpener.openUrlLabel("sumoPrivacy") } },
]

onClosed: helpSheetLoader.active = false
}
}
}

0 comments on commit 538bf99

Please sign in to comment.