forked from Silverfish/proton-bridge
feat(GODT-2767): Outlook version selector and warning screen.
This commit is contained in:
@ -109,7 +109,9 @@
|
|||||||
<file>qml/SetupGuide.qml</file>
|
<file>qml/SetupGuide.qml</file>
|
||||||
<file>qml/SetupWizard/ClientListItem.qml</file>
|
<file>qml/SetupWizard/ClientListItem.qml</file>
|
||||||
<file>qml/SetupWizard/LeftPane.qml</file>
|
<file>qml/SetupWizard/LeftPane.qml</file>
|
||||||
|
<file>qml/SetupWizard/ClientConfigOutlookSelector.qml</file>
|
||||||
<file>qml/SetupWizard/ClientConfigSelector.qml</file>
|
<file>qml/SetupWizard/ClientConfigSelector.qml</file>
|
||||||
|
<file>qml/SetupWizard/ClientConfigWarning.qml</file>
|
||||||
<file>qml/SetupWizard/SetupWizard.qml</file>
|
<file>qml/SetupWizard/SetupWizard.qml</file>
|
||||||
<file>qml/SetupWizard/LoginRightPane.qml</file>
|
<file>qml/SetupWizard/LoginRightPane.qml</file>
|
||||||
<file>qml/SetupWizard/OnboardingRightPane.qml</file>
|
<file>qml/SetupWizard/OnboardingRightPane.qml</file>
|
||||||
|
|||||||
@ -0,0 +1,92 @@
|
|||||||
|
// Copyright (c) 2023 Proton AG
|
||||||
|
// This file is part of Proton Mail Bridge.
|
||||||
|
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
import QtQml
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Controls.impl
|
||||||
|
import Proton
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property ColorScheme colorScheme: wizard.colorScheme
|
||||||
|
readonly property bool onMacOS: (Backend.goos === "darwin")
|
||||||
|
readonly property bool onWindows: (Backend.goos === "windows")
|
||||||
|
property var wizard
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
text: qsTr("Pick your version of Outlook")
|
||||||
|
type: Label.LabelType.Heading
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 72
|
||||||
|
}
|
||||||
|
ClientListItem {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
iconSource: "/qml/icons/ic-microsoft-outlook.svg"
|
||||||
|
text: "Outlook from Microsoft 365"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
wizard.clientVersion = "365";
|
||||||
|
wizard.showClientWarning();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ClientListItem {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
iconSource: "/qml/icons/ic-microsoft-outlook.svg"
|
||||||
|
text: "Outlook 2019"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
wizard.clientVersion = "2019";
|
||||||
|
wizard.showClientWarning();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ClientListItem {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
iconSource: "/qml/icons/ic-microsoft-outlook.svg"
|
||||||
|
text: "Outlook 2016"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
wizard.clientVersion = "2016";
|
||||||
|
wizard.showClientWarning();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 72
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
secondary: true
|
||||||
|
text: qsTr("Cancel")
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
root.wizard.closeWizard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -33,6 +33,7 @@ Item {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
text: qsTr("Select your email application")
|
text: qsTr("Select your email application")
|
||||||
type: Label.LabelType.Heading
|
type: Label.LabelType.Heading
|
||||||
@ -60,6 +61,7 @@ Item {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
wizard.client = SetupWizard.Client.MicrosoftOutlook;
|
wizard.client = SetupWizard.Client.MicrosoftOutlook;
|
||||||
|
wizard.showOutlookSelector();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientListItem {
|
ClientListItem {
|
||||||
|
|||||||
@ -0,0 +1,110 @@
|
|||||||
|
// Copyright (c) 2023 Proton AG
|
||||||
|
// This file is part of Proton Mail Bridge.
|
||||||
|
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
import QtQml
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Controls.impl
|
||||||
|
import Proton
|
||||||
|
|
||||||
|
// Copyright (c) 2023 Proton AG
|
||||||
|
// This file is part of Proton Mail Bridge.
|
||||||
|
// Proton Mail Bridge is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
// Proton Mail Bridge is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Proton Mail Bridge. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
import QtQml
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Controls.impl
|
||||||
|
import Proton
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property ColorScheme colorScheme: wizard.colorScheme
|
||||||
|
property var wizard
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: qsTr("A word of warning")
|
||||||
|
type: Label.LabelType.Heading
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 96
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
text: qsTr("Do not enter your Proton account password in you email application.")
|
||||||
|
type: Label.LabelType.Body_bold
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 96
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: qsTr("We have generated a new password for you. It will work only on this computer, and can safely be entered in your email client.")
|
||||||
|
type: Label.LabelType.Body
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 96
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
text: qsTr("I understand")
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
root.wizard.closeWizard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
secondary: true
|
||||||
|
text: qsTr("Cancel")
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
root.wizard.closeWizard();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -23,12 +23,6 @@ Item {
|
|||||||
|
|
||||||
property ColorScheme colorScheme
|
property ColorScheme colorScheme
|
||||||
|
|
||||||
function showLogin2FA() {
|
|
||||||
descriptionLabel.text = qsTr("You have enabled two-factor authentication. Please enter the 6-digit code provided by your authenticator application.");
|
|
||||||
linkLabel1.clear();
|
|
||||||
linkLabel2.clear();
|
|
||||||
showLoginCommon();
|
|
||||||
}
|
|
||||||
function showClientSelector() {
|
function showClientSelector() {
|
||||||
titleLabel.text = qsTr("Configure your email client");
|
titleLabel.text = qsTr("Configure your email client");
|
||||||
descriptionLabel.text = qsTr("Bridge is now connected to Proton, and has already started downloading your messages. Let’s now connect your email client to Bridge.");
|
descriptionLabel.text = qsTr("Bridge is now connected to Proton, and has already started downloading your messages. Let’s now connect your email client to Bridge.");
|
||||||
@ -40,6 +34,18 @@ Item {
|
|||||||
Layout.preferredHeight = 72;
|
Layout.preferredHeight = 72;
|
||||||
Layout.preferredWidth = 72;
|
Layout.preferredWidth = 72;
|
||||||
}
|
}
|
||||||
|
function showLogin() {
|
||||||
|
descriptionLabel.text = qsTr("Let's start by signing in to your Proton account.");
|
||||||
|
linkLabel1.setLink("https://proton.me/mail/pricing", qsTr("Create or upgrade your account"));
|
||||||
|
linkLabel2.clear();
|
||||||
|
showLoginCommon();
|
||||||
|
}
|
||||||
|
function showLogin2FA() {
|
||||||
|
descriptionLabel.text = qsTr("You have enabled two-factor authentication. Please enter the 6-digit code provided by your authenticator application.");
|
||||||
|
linkLabel1.clear();
|
||||||
|
linkLabel2.clear();
|
||||||
|
showLoginCommon();
|
||||||
|
}
|
||||||
function showLoginCommon() {
|
function showLoginCommon() {
|
||||||
titleLabel.text = qsTr("Sign in to your Proton Account");
|
titleLabel.text = qsTr("Sign in to your Proton Account");
|
||||||
icon.Layout.preferredHeight = 72;
|
icon.Layout.preferredHeight = 72;
|
||||||
@ -65,12 +71,18 @@ Item {
|
|||||||
icon.sourceSize.height = 148;
|
icon.sourceSize.height = 148;
|
||||||
icon.sourceSize.width = 265;
|
icon.sourceSize.width = 265;
|
||||||
}
|
}
|
||||||
function showLogin() {
|
function showOutlookSelector() {
|
||||||
descriptionLabel.text = qsTr("Let's start by signing in to your Proton account.");
|
titleLabel.text = qsTr("Configure Outlook");
|
||||||
linkLabel1.setLink("https://proton.me/mail/pricing", qsTr("Create or upgrade your account"));
|
descriptionLabel.text = qsTr("We will now guide you through the process of setting up your Proton account in Outlook.");
|
||||||
|
linkLabel1.setLink("https://proton.me/support/bridge", qsTr("My version of Outlook is not listed"));
|
||||||
linkLabel2.clear();
|
linkLabel2.clear();
|
||||||
showLoginCommon();
|
icon.Layout.preferredHeight = 72;
|
||||||
|
icon.Layout.preferredWidth = 72;
|
||||||
|
icon.source = "/qml/icons/ic-microsoft-outlook.svg";
|
||||||
|
icon.sourceSize.height = 128;
|
||||||
|
icon.sourceSize.width = 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onLogin2FARequested() {
|
function onLogin2FARequested() {
|
||||||
showLogin2FA();
|
showLogin2FA();
|
||||||
|
|||||||
@ -37,6 +37,12 @@ Item {
|
|||||||
function closeWizard() {
|
function closeWizard() {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
}
|
}
|
||||||
|
function showOutlookSelector() {
|
||||||
|
console.error("showOutlookSelector()");
|
||||||
|
root.visible = true;
|
||||||
|
leftContent.showOutlookSelector();
|
||||||
|
rightContent.currentIndex = 3;
|
||||||
|
}
|
||||||
function start() {
|
function start() {
|
||||||
root.visible = true;
|
root.visible = true;
|
||||||
leftContent.showOnboarding();
|
leftContent.showOnboarding();
|
||||||
@ -57,6 +63,13 @@ Item {
|
|||||||
loginRightPane.reset(true);
|
loginRightPane.reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showClientWarning() {
|
||||||
|
console.error("showClientWarning()");
|
||||||
|
root.visible = true;
|
||||||
|
//leftContent.showWarning();
|
||||||
|
rightContent.currentIndex = 4
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
function onLoginFinished() {
|
function onLoginFinished() {
|
||||||
startClientConfig();
|
startClientConfig();
|
||||||
@ -141,6 +154,20 @@ Item {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wizard: root
|
wizard: root
|
||||||
}
|
}
|
||||||
|
// stack index 3
|
||||||
|
ClientConfigOutlookSelector {
|
||||||
|
id: clientConfigOutlookSelector
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wizard: root
|
||||||
|
}
|
||||||
|
// stack index 4
|
||||||
|
ClientConfigWarning {
|
||||||
|
id: clientConfigWarning
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wizard: root
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LinkLabel {
|
LinkLabel {
|
||||||
id: reportProblemLink
|
id: reportProblemLink
|
||||||
|
|||||||
Reference in New Issue
Block a user