mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-16 23:26:44 +00:00
feat(GODT-2960): added content in empty view when there is no account.
This commit is contained in:
@ -81,6 +81,7 @@
|
|||||||
<file>qml/KeychainSettings.qml</file>
|
<file>qml/KeychainSettings.qml</file>
|
||||||
<file>qml/LocalCacheSettings.qml</file>
|
<file>qml/LocalCacheSettings.qml</file>
|
||||||
<file>qml/MainWindow.qml</file>
|
<file>qml/MainWindow.qml</file>
|
||||||
|
<file>qml/NoAccountView.qml</file>
|
||||||
<file>qml/NotificationDialog.qml</file>
|
<file>qml/NotificationDialog.qml</file>
|
||||||
<file>qml/NotificationPopups.qml</file>
|
<file>qml/NotificationPopups.qml</file>
|
||||||
<file>qml/Notifications/Notification.qml</file>
|
<file>qml/Notifications/Notification.qml</file>
|
||||||
|
|||||||
@ -324,8 +324,16 @@ Item {
|
|||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
AccountView {
|
StackLayout {
|
||||||
// 0
|
// 0
|
||||||
|
currentIndex: (Backend.users.count > 0 ? 1 : 0)
|
||||||
|
NoAccountView {
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
onLinkClicked: function() {
|
||||||
|
root.showLogin("")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AccountView {
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
notifications: root.notifications
|
notifications: root.notifications
|
||||||
user: {
|
user: {
|
||||||
@ -343,6 +351,7 @@ Item {
|
|||||||
root.showLogin(username);
|
root.showLogin(username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@ -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 string iconSource
|
||||||
property int iconWidth
|
property int iconWidth
|
||||||
property var wizard
|
property var wizard
|
||||||
|
property ColorScheme colorScheme
|
||||||
|
property var _colorScheme: wizard ? wizard.colorScheme : colorScheme
|
||||||
|
property var link1: linkLabel1
|
||||||
|
property var link2: linkLabel2
|
||||||
|
|
||||||
function showAppleMailAutoconfigCertificateInstall() {
|
function showAppleMailAutoconfigCertificateInstall() {
|
||||||
showAppleMailAutoconfigCommon();
|
showAppleMailAutoconfigCommon();
|
||||||
@ -100,7 +104,7 @@ Item {
|
|||||||
id: titleLabel
|
id: titleLabel
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
colorScheme: wizard.colorScheme
|
colorScheme: _colorScheme
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: ""
|
text: ""
|
||||||
type: Label.LabelType.Heading
|
type: Label.LabelType.Heading
|
||||||
@ -111,7 +115,7 @@ Item {
|
|||||||
id: descriptionLabel
|
id: descriptionLabel
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
colorScheme: wizard.colorScheme
|
colorScheme: _colorScheme
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: ""
|
text: ""
|
||||||
type: Label.LabelType.Body
|
type: Label.LabelType.Body
|
||||||
@ -120,13 +124,13 @@ Item {
|
|||||||
LinkLabel {
|
LinkLabel {
|
||||||
id: linkLabel1
|
id: linkLabel1
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
colorScheme: wizard.colorScheme
|
colorScheme: _colorScheme
|
||||||
visible: (text !== "")
|
visible: (text !== "")
|
||||||
}
|
}
|
||||||
LinkLabel {
|
LinkLabel {
|
||||||
id: linkLabel2
|
id: linkLabel2
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
colorScheme: wizard.colorScheme
|
colorScheme: _colorScheme
|
||||||
visible: (text !== "")
|
visible: (text !== "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user