feat(AppMain): Replace MailserverConnectionDialog with banner
Close #6213
This commit is contained in:
parent
128ac8dbd8
commit
e0ba80a085
|
@ -21,7 +21,6 @@ class MainWalletScreen(Enum):
|
|||
SAVED_ADDRESSES_BUTTON: str = "mainWallet_Saved_Addresses_Button"
|
||||
NETWORK_SELECTOR_BUTTON: str = "mainWallet_Network_Selector_Button"
|
||||
RIGHT_SIDE_TABBAR: str = "mainWallet_Right_Side_Tab_Bar"
|
||||
MAILSERVER_RETRY: str = "mailserver_retry"
|
||||
FIRST_ACCOUNT_ITEM: str = "firstWalletAccount_Item"
|
||||
EPHEMERAL_NOTIFICATION_LIST: str = "mainWallet_Ephemeral_Notification_List"
|
||||
TOTAL_CURRENCY_BALANCE: str = "mainWallet_totalCurrencyBalance"
|
||||
|
|
|
@ -12,9 +12,6 @@ mainWallet_Network_Selector_Button = {"container": statusDesktop_mainWindow, "ob
|
|||
mainWallet_Right_Side_Tab_Bar = {"container": statusDesktop_mainWindow, "objectName": "rightSideWalletTabBar", "type": "StatusTabBar"}
|
||||
mainWallet_Ephemeral_Notification_List = {"container": statusDesktop_mainWindow, "objectName": "ephemeralNotificationList", "type": "StatusListView"}
|
||||
|
||||
mailserver_dialog = {"container": statusDesktop_mainWindow_overlay, "objectName": "mailserverConnectionDialog", "type": "StatusDialog"}
|
||||
mailserver_retry = {"container": mailserver_dialog, "objectName": "mailserverConnectionDialog_retryButton", "type": "StatusButton"}
|
||||
|
||||
accounts_StatusListView = {"container": statusDesktop_mainWindow, "objectName": "walletAccountsListView", "type": "StatusListView", "visible": True}
|
||||
firstWalletAccount_Item = {"container": accounts_StatusListView, "index": 0, "objectName": "walletAccountItem", "type": "StatusListItem", "visible": True}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ import AppLayouts.stores 1.0
|
|||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import "popups"
|
||||
import "panels"
|
||||
import "activitycenter/popups"
|
||||
import "activitycenter/stores"
|
||||
|
@ -70,7 +69,7 @@ Item {
|
|||
}
|
||||
|
||||
onMailserverNotWorking: {
|
||||
Global.openPopup(mailserverNotWorkingPopupComponent)
|
||||
mailserverConnectionBanner.show()
|
||||
}
|
||||
|
||||
onActiveSectionChanged: {
|
||||
|
@ -714,7 +713,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
ModuleWarning {
|
||||
id: downloadingArchivesBanner
|
||||
Layout.fillWidth: true
|
||||
|
@ -724,6 +722,14 @@ Item {
|
|||
closeBtnVisible: false
|
||||
}
|
||||
|
||||
ModuleWarning {
|
||||
id: mailserverConnectionBanner
|
||||
type: ModuleWarning.Danger
|
||||
text: qsTr("Can not connect to mailserver. Retrying automatically")
|
||||
onCloseClicked: hide()
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Component {
|
||||
id: connectedBannerComponent
|
||||
|
||||
|
@ -1009,15 +1015,6 @@ Item {
|
|||
}
|
||||
} // ColumnLayout
|
||||
|
||||
Component {
|
||||
id: mailserverNotWorkingPopupComponent
|
||||
MailserverConnectionDialog {
|
||||
onClosed: {
|
||||
destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: chooseBrowserPopupComponent
|
||||
ChooseBrowserPopup {
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
import QtQml.Models 2.14
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Popups.Dialog 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
StatusDialog {
|
||||
id: root
|
||||
objectName: "mailserverConnectionDialog"
|
||||
|
||||
title: qsTr("Can not connect to mailserver")
|
||||
|
||||
StatusBaseText {
|
||||
anchors.fill: parent
|
||||
text: qsTr("The mailserver you're connecting to is unavailable.")
|
||||
}
|
||||
|
||||
footer: StatusDialogFooter {
|
||||
rightButtons: ObjectModel {
|
||||
StatusButton {
|
||||
text: qsTr("Pick another")
|
||||
onClicked: {
|
||||
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.messaging)
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
StatusButton {
|
||||
objectName: "mailserverConnectionDialog_retryButton"
|
||||
text: qsTr("Retry")
|
||||
onClicked: {
|
||||
// Retrying already happens automatically, so doing nothing
|
||||
// here is the same as retrying...
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue