diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/ContentWrapper.qml b/internal/frontend/bridge-gui/bridge-gui/qml/ContentWrapper.qml index e37e2596..05336b6e 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/ContentWrapper.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/ContentWrapper.qml @@ -368,7 +368,7 @@ Item { currentIndex: hasAccount() ? 1 : 0 NoAccountView { colorScheme: root.colorScheme - onLinkClicked: function() { + onStartSetup: { root.showLogin("") } } diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/NoAccountView.qml b/internal/frontend/bridge-gui/bridge-gui/qml/NoAccountView.qml index 0dab4de4..53cef32b 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/NoAccountView.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/NoAccountView.qml @@ -23,7 +23,7 @@ Rectangle { color: root.colorScheme.background_norm - signal linkClicked() + signal startSetup() ColumnLayout { anchors.fill: parent @@ -38,8 +38,10 @@ Rectangle { wizard: setupWizard Component.onCompleted: { - showOnboarding(); - link1.setCallback(root.linkClicked, "Start setup", false) + showNoAccount(); + } + onStartSetup: { + root.startSetup(); } } Image { diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/LeftPane.qml b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/LeftPane.qml index e809aa98..c4726a5b 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/LeftPane.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/SetupWizard/LeftPane.qml @@ -18,14 +18,21 @@ import QtQuick.Controls Item { id: root + readonly property string addAccountTitle: qsTr("Add a Proton Mail account") + readonly property string welcomeDescription: qsTr("Bridge is the gateway between your Proton account and your email client. It runs in the background and encrypts and decrypts your messages seamlessly. "); + readonly property string welcomeTitle: qsTr("Welcome to\nProton Mail Bridge") + readonly property string welcomeImage: "/qml/icons/img-welcome.svg" + readonly property int welcomeImageHeight: 148; + readonly property int welcomeImageWidth: 265; + property int iconHeight property string iconSource property int iconWidth property var wizard property ColorScheme colorScheme property var _colorScheme: wizard ? wizard.colorScheme : colorScheme - property var link1: linkLabel1 - property var link2: linkLabel2 + + signal startSetup() function showAppleMailAutoconfigCertificateInstall() { showAppleMailAutoconfigCommon(); @@ -65,14 +72,25 @@ Item { function showLoginMailboxPassword() { showOnboarding(); } + + function showNoAccount() { + titleLabel.text = welcomeTitle; + descriptionLabel.text = welcomeDescription; + linkLabel1.setCallback(startSetup, "Start setup", false); + linkLabel2.clear(); + root.iconSource = welcomeImage; + root.iconHeight = welcomeImageHeight; + root.iconWidth = welcomeImageWidth; + } + function showOnboarding() { - titleLabel.text = (Backend.users.count === 0) ? qsTr("Welcome to\nProton Mail Bridge") : qsTr("Add a Proton Mail account"); - descriptionLabel.text = qsTr("Bridge is the gateway between your Proton account and your email client. It runs in the background and encrypts and decrypts your messages seamlessly. "); + titleLabel.text = (Backend.users.count === 0) ? welcomeTitle : addAccountTitle; + descriptionLabel.text = welcomeDescription linkLabel1.setCallback(function() { Backend.openKBArticle("https://proton.me/support/why-you-need-bridge"); }, qsTr("Why do I need Bridge?"), true); linkLabel2.clear(); - root.iconSource = "/qml/icons/img-welcome.svg"; - root.iconHeight = 148; - root.iconWidth = 265; + root.iconSource = welcomeImage; + root.iconHeight = welcomeImageHeight; + root.iconWidth = welcomeImageWidth; } ColumnLayout {