Skip to content

Commit

Permalink
Merge branch 'main' into VPN-4684
Browse files Browse the repository at this point in the history
  • Loading branch information
MattLichtenstein authored Jan 19, 2024
2 parents a7b98bc + 3b02e24 commit 8e51e58
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ constexpr const char* SUMO_DNS =
constexpr const char* SUMO_PRIVACY =
"https://support.mozilla.org/kb/how-do-i-change-my-privacy-features";

constexpr const char* SUMO_EXCLUDED_APPS =
"https://support.mozilla.org/kb/split-tunneling-app-permissions";

constexpr const char* SUMO_DEVICES =
"https://support.mozilla.org/kb/"
"how-add-devices-your-mozilla-vpn-subscription";
Expand Down
4 changes: 4 additions & 0 deletions src/mozillavpn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,10 @@ void MozillaVPN::registerUrlOpenerLabels() {
uo->registerUrlLabel("sumoPrivacy",
[]() -> QString { return Constants::SUMO_PRIVACY; });

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

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

Expand Down
18 changes: 18 additions & 0 deletions src/translations/strings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,24 @@ helpSheets:
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
excludedAppsTitle:
value: Excluded apps
comment: Title label for the excluded apps help sheet
excludedAppsHeader:
value: What are excluded apps?
comment: Header label for the excluded apps help sheet
excludedAppsBody1:
value: Excluded apps let you turn off VPN protection for specific apps, without turning off VPN protection for your entire device.
comment: Body label for the excluded apps help sheet
excludedAppsBody2:
value: When you exclude an app, it will have access to your IP address and approximate location.
comment: Body label for the excluded apps help sheet
excludedAppsBody3:
value: You can use the settings under Settings > Privacy features to block ads, block trackers, and block malware, even on excluded apps.
comment: Body label for the excluded apps help sheet
excludedAppsCTA:
value: Open “Privacy features”
comment: Label for button that opens the "Privacy features" view from the excluded apps help sheet
devicesTitle:
value: Device management
comment: Title label for the devices help sheet
Expand Down
48 changes: 46 additions & 2 deletions src/ui/screens/settings/appPermissions/ViewAppPermissions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import components 0.1
import components.forms 0.1

MZViewBase {
id: vpnFlickable
objectName: "appPermissions"

//% "Search apps"
//: Search bar placeholder text
property string searchApps: qsTrId("vpn.protectSelectedApps.searchApps")
Expand All @@ -20,8 +23,23 @@ MZViewBase {
//: Button label
property string addApplication: qsTrId("vpn.protectSelectedApps.addApplication")

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

accessibleName: MZI18n.GlobalHelp

Image {
anchors.centerIn: parent

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

_menuTitle: MZI18n.SettingsAppExclusionSettings
_viewContentData: ColumnLayout {
Expand Down Expand Up @@ -64,6 +82,32 @@ MZViewBase {
}
}

Loader {
id: helpSheetLoader

active: false

onActiveChanged: if (active) item.open()

sourceComponent: MZHelpSheet {
title: MZI18n.HelpSheetsExcludedAppsTitle

model: [
{type: MZHelpSheet.BlockType.Title, text: MZI18n.HelpSheetsExcludedAppsHeader},
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsExcludedAppsBody1, margin: 8},
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsExcludedAppsBody2, margin: 16},
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsExcludedAppsBody3, margin: 16},
{type: MZHelpSheet.BlockType.PrimaryButton, text: MZI18n.HelpSheetsExcludedAppsCTA, margin: 16, action: () => {
close()
getStack().push("qrc:/ui/screens/settings/privacy/ViewPrivacy.qml")
}},
{type: MZHelpSheet.BlockType.LinkButton, text: MZI18n.GlobalLearnMore, margin: 8, action: () => { MZUrlOpener.openUrlLabel("sumoExcludedApps") } },
]

onClosed: helpSheetLoader.active = false
}
}

Component.onCompleted: {
console.log("Component ready");
VPNAppPermissions.requestApplist();
Expand Down

0 comments on commit 8e51e58

Please sign in to comment.