fix(BRIDGE-90): disable repair button when bridge cannot connect to proton servers; bump GPA

This commit is contained in:
Atanas Janeshliev
2024-06-04 17:05:12 +02:00
parent cffab028b2
commit 63eb67760e
5 changed files with 24 additions and 5 deletions

View File

@ -22,6 +22,7 @@ SettingsView {
property bool _isAdvancedShown: false
property var notifications
property var allUsersLoaded: false
property var hasInternetConnection: true
fillHeight: false
@ -229,13 +230,22 @@ SettingsView {
text: qsTr("Repair Bridge")
type: SettingsItem.Button
visible: root._isAdvancedShown
enabled: root.allUsersLoaded && Backend.users.count
enabled: root.allUsersLoaded && Backend.users.count && root.hasInternetConnection
onClicked: {
root.notifications.askRepairBridge();
}
Connections {
function onInternetOff() {
root.hasInternetConnection = false;
repair.description = qsTr("This feature requires internet access to the Proton servers.")
}
function onInternetOn() {
root.hasInternetConnection = true;
repair.description = qsTr("Reload all accounts, cached data, and download all emails again. Email clients stay connected to Bridge.")
}
function onAllUsersLoaded() {
root.allUsersLoaded = true;
}