fix(GODT-3019): fix title of main window when no account is connected.
This commit is contained in:
parent
1d53044803
commit
c2afb42fd4
|
@ -368,7 +368,7 @@ Item {
|
||||||
currentIndex: hasAccount() ? 1 : 0
|
currentIndex: hasAccount() ? 1 : 0
|
||||||
NoAccountView {
|
NoAccountView {
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
onLinkClicked: function() {
|
onStartSetup: {
|
||||||
root.showLogin("")
|
root.showLogin("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ Rectangle {
|
||||||
|
|
||||||
color: root.colorScheme.background_norm
|
color: root.colorScheme.background_norm
|
||||||
|
|
||||||
signal linkClicked()
|
signal startSetup()
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -38,8 +38,10 @@ Rectangle {
|
||||||
wizard: setupWizard
|
wizard: setupWizard
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
showOnboarding();
|
showNoAccount();
|
||||||
link1.setCallback(root.linkClicked, "Start setup", false)
|
}
|
||||||
|
onStartSetup: {
|
||||||
|
root.startSetup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
|
|
|
@ -18,14 +18,21 @@ import QtQuick.Controls
|
||||||
Item {
|
Item {
|
||||||
id: root
|
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 int iconHeight
|
||||||
property string iconSource
|
property string iconSource
|
||||||
property int iconWidth
|
property int iconWidth
|
||||||
property var wizard
|
property var wizard
|
||||||
property ColorScheme colorScheme
|
property ColorScheme colorScheme
|
||||||
property var _colorScheme: wizard ? wizard.colorScheme : colorScheme
|
property var _colorScheme: wizard ? wizard.colorScheme : colorScheme
|
||||||
property var link1: linkLabel1
|
|
||||||
property var link2: linkLabel2
|
signal startSetup()
|
||||||
|
|
||||||
function showAppleMailAutoconfigCertificateInstall() {
|
function showAppleMailAutoconfigCertificateInstall() {
|
||||||
showAppleMailAutoconfigCommon();
|
showAppleMailAutoconfigCommon();
|
||||||
|
@ -65,14 +72,25 @@ Item {
|
||||||
function showLoginMailboxPassword() {
|
function showLoginMailboxPassword() {
|
||||||
showOnboarding();
|
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() {
|
function showOnboarding() {
|
||||||
titleLabel.text = (Backend.users.count === 0) ? qsTr("Welcome to\nProton Mail Bridge") : qsTr("Add a Proton Mail account");
|
titleLabel.text = (Backend.users.count === 0) ? welcomeTitle : addAccountTitle;
|
||||||
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. ");
|
descriptionLabel.text = welcomeDescription
|
||||||
linkLabel1.setCallback(function() { Backend.openKBArticle("https://proton.me/support/why-you-need-bridge"); }, qsTr("Why do I need Bridge?"), true);
|
linkLabel1.setCallback(function() { Backend.openKBArticle("https://proton.me/support/why-you-need-bridge"); }, qsTr("Why do I need Bridge?"), true);
|
||||||
linkLabel2.clear();
|
linkLabel2.clear();
|
||||||
root.iconSource = "/qml/icons/img-welcome.svg";
|
root.iconSource = welcomeImage;
|
||||||
root.iconHeight = 148;
|
root.iconHeight = welcomeImageHeight;
|
||||||
root.iconWidth = 265;
|
root.iconWidth = welcomeImageWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
Loading…
Reference in New Issue