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

VPN-5697 - Allow account deletion on Android #8279

Merged
merged 3 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions nebula/ui/components/inAppAuth/MZInAppAuthenticationBase.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import components.forms 0.1
MZFlickable {
property var _menuButtonOnClick
property bool _changeEmailLinkVisible: false
property bool _disclaimersVisible: true
property string _viewObjectName: ""

property alias _menuButtonImageSource: menuButtonImage.source
Expand Down Expand Up @@ -142,6 +143,7 @@ MZFlickable {

MZSubtitle {
id: subtitle
visible: _subtitleText.length > 0
width: undefined
Layout.fillWidth: true
}
Expand All @@ -150,6 +152,7 @@ MZFlickable {

MZBoldLabel {
id: inputLabel
visible: inputLabel.text.length > 0
}

ColumnLayout {
Expand All @@ -160,6 +163,7 @@ MZFlickable {

ColumnLayout {
id: disclaimers
visible: _disclaimersVisible
Layout.maximumWidth: col.width - MZTheme.theme.vSpacing * 2
Layout.leftMargin: MZTheme.theme.vSpacing
Layout.rightMargin: MZTheme.theme.vSpacing
Expand Down
1 change: 1 addition & 0 deletions src/cmake/android.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ set_property(TARGET mozillavpn PROPERTY QT_ANDROID_EXTRA_LIBS
${Qt6_DIR}/../../libQt6Widgets_${ANDROID_ABI}.so
${Qt6_DIR}/../../libQt6Xml_${ANDROID_ABI}.so
${Qt6_DIR}/../../libQt6Test_${ANDROID_ABI}.so
${Qt6_DIR}/../../libQt6Svg_${ANDROID_ABI}.so
## --- END PILE OF SHAME --- ##

${OPENSSL_LIBS_DIR}/libcrypto.so
Expand Down
2 changes: 1 addition & 1 deletion src/featurelist.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FEATURE(accountDeletion, // Feature ID
FeatureCallback_true, // Can be flipped on
FeatureCallback_false, // Can be flipped off
QStringList(), // feature dependencies
FeatureCallback_accountDeletion)
FeatureCallback_iosOrAndroid)

FEATURE(addon, // Feature ID
"Addon support", // Feature name
Expand Down
8 changes: 0 additions & 8 deletions src/featurelistcallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ bool FeatureCallback_sentry() {
#endif
}

bool FeatureCallback_accountDeletion() {
#if defined(MZ_IOS)
return true;
#else
return false;
#endif
}

bool FeatureCallback_captivePortal() {
#if defined(MZ_LINUX) || defined(MZ_MACOS) || defined(MZ_WINDOWS) || \
defined(MZ_DUMMY) || defined(MZ_WASM)
Expand Down
8 changes: 5 additions & 3 deletions src/ui/deleteAccount/ViewDeleteAccountRequest.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ MZInAppAuthenticationBase {
property bool allowAccountDeletion: false

_changeEmailLinkVisible: false
_disclaimersVisible: false
_viewObjectName: "authDeleteAccountRequest"
_menuButtonAccessibleName: MZI18n.GlobalGoBack
_menuButtonImageSource: "qrc:/nebula/resources/back.svg"
Expand All @@ -51,6 +52,7 @@ MZInAppAuthenticationBase {

_inputs: ColumnLayout {
objectName: "accountDeletionLayout"
spacing: MZTheme.theme.vSpacingSmall
MZTextBlock {
objectName: "accountDeletionLabel"
color: MZTheme.theme.fontColor
Expand All @@ -59,9 +61,10 @@ MZInAppAuthenticationBase {
.arg("<b style='color:" + MZTheme.theme.fontColorDark + ";'>"
+ MZAuthInApp.emailAddress + "</b>")
textFormat: Text.RichText
font.pixelSize: MZTheme.theme.fontSize

Layout.fillWidth: true
Layout.bottomMargin: MZTheme.theme.vSpacing
Layout.bottomMargin: MZTheme.theme.vSpacingSmall
MattLichtenstein marked this conversation as resolved.
Show resolved Hide resolved
}

Repeater {
Expand Down Expand Up @@ -100,10 +103,9 @@ MZInAppAuthenticationBase {
MZLinkButton {
Layout.fillWidth: true

fontName: MZTheme.theme.fontBoldFamily
fontName: MZTheme.theme.fontFamily
MattLichtenstein marked this conversation as resolved.
Show resolved Hide resolved
// Cancel
labelText: MZI18n.InAppSupportWorkflowSupportSecondaryActionText
linkColor: MZTheme.theme.redLinkButton
onClicked: {
cancelAuthenticationFlow();
}
Expand Down
Loading