feat(GODT-2960): added content in empty view when there is no account.
This commit is contained in:
parent
55a9d4973c
commit
742d9eeef3
|
@ -81,6 +81,7 @@
|
|||
<file>qml/KeychainSettings.qml</file>
|
||||
<file>qml/LocalCacheSettings.qml</file>
|
||||
<file>qml/MainWindow.qml</file>
|
||||
<file>qml/NoAccountView.qml</file>
|
||||
<file>qml/NotificationDialog.qml</file>
|
||||
<file>qml/NotificationPopups.qml</file>
|
||||
<file>qml/Notifications/Notification.qml</file>
|
||||
|
|
|
@ -324,23 +324,32 @@ Item {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
AccountView {
|
||||
StackLayout {
|
||||
// 0
|
||||
colorScheme: root.colorScheme
|
||||
notifications: root.notifications
|
||||
user: {
|
||||
if (accounts.currentIndex < 0)
|
||||
return undefined;
|
||||
if (Backend.users.count === 0)
|
||||
return undefined;
|
||||
return Backend.users.get(accounts.currentIndex);
|
||||
currentIndex: (Backend.users.count > 0 ? 1 : 0)
|
||||
NoAccountView {
|
||||
colorScheme: root.colorScheme
|
||||
onLinkClicked: function() {
|
||||
root.showLogin("")
|
||||
}
|
||||
}
|
||||
AccountView {
|
||||
colorScheme: root.colorScheme
|
||||
notifications: root.notifications
|
||||
user: {
|
||||
if (accounts.currentIndex < 0)
|
||||
return undefined;
|
||||
if (Backend.users.count === 0)
|
||||
return undefined;
|
||||
return Backend.users.get(accounts.currentIndex);
|
||||
}
|
||||
|
||||
onShowClientConfigurator: function (user, address, justLoggedIn) {
|
||||
root.showClientConfigurator(user, address, justLoggedIn);
|
||||
}
|
||||
onShowLogin: function (username) {
|
||||
root.showLogin(username);
|
||||
onShowClientConfigurator: function (user, address, justLoggedIn) {
|
||||
root.showClientConfigurator(user, address, justLoggedIn);
|
||||
}
|
||||
onShowLogin: function (username) {
|
||||
root.showLogin(username);
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
// 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 QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Proton
|
||||
import "SetupWizard"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property ColorScheme colorScheme
|
||||
|
||||
color: root.colorScheme.background_norm
|
||||
|
||||
signal linkClicked()
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
// we use the setup wizard left pane (onboarding version)
|
||||
LeftPane {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredWidth: ProtonStyle.wizard_pane_width
|
||||
colorScheme: root.colorScheme
|
||||
wizard: setupWizard
|
||||
|
||||
Component.onCompleted: {
|
||||
showOnboarding();
|
||||
link1.setCallback(root.linkClicked, "Start setup", false)
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: mailLogoWithWordmark
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.bottomMargin: ProtonStyle.wizard_window_margin
|
||||
height: sourceSize.height
|
||||
source: root.colorScheme.mail_logo_with_wordmark
|
||||
sourceSize.height: 36
|
||||
sourceSize.width: 134
|
||||
width: sourceSize.width
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,6 +22,10 @@ Item {
|
|||
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
|
||||
|
||||
function showAppleMailAutoconfigCertificateInstall() {
|
||||
showAppleMailAutoconfigCommon();
|
||||
|
@ -100,7 +104,7 @@ Item {
|
|||
id: titleLabel
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
colorScheme: wizard.colorScheme
|
||||
colorScheme: _colorScheme
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: ""
|
||||
type: Label.LabelType.Heading
|
||||
|
@ -111,7 +115,7 @@ Item {
|
|||
id: descriptionLabel
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
colorScheme: wizard.colorScheme
|
||||
colorScheme: _colorScheme
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: ""
|
||||
type: Label.LabelType.Body
|
||||
|
@ -120,13 +124,13 @@ Item {
|
|||
LinkLabel {
|
||||
id: linkLabel1
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
colorScheme: wizard.colorScheme
|
||||
colorScheme: _colorScheme
|
||||
visible: (text !== "")
|
||||
}
|
||||
LinkLabel {
|
||||
id: linkLabel2
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
colorScheme: wizard.colorScheme
|
||||
colorScheme: _colorScheme
|
||||
visible: (text !== "")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue