chore(dialogs): extract MailserverConnectionDialog
iterates: status-im/StatusQ#760
This commit is contained in:
parent
5aea3d26a8
commit
eb05eb8044
|
@ -34,6 +34,8 @@ import AppLayouts.Browser.stores 1.0 as BrowserStores
|
|||
|
||||
import AppLayouts.stores 1.0
|
||||
|
||||
import "popups"
|
||||
|
||||
Item {
|
||||
id: appMain
|
||||
anchors.fill: parent
|
||||
|
@ -428,7 +430,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
@ -649,7 +651,7 @@ Item {
|
|||
anchors.right: parent.right
|
||||
width: chatLayoutContainer.chatView.width - chatLayoutContainer.chatView.leftPanel.width - anchors.rightMargin - anchors.leftMargin
|
||||
visible: createChatView.opened
|
||||
|
||||
|
||||
Connections {
|
||||
target: Global
|
||||
onOpenCreateChatView: {
|
||||
|
@ -681,45 +683,14 @@ Item {
|
|||
|
||||
Component {
|
||||
id: mailserverNotWorkingPopupComponent
|
||||
StatusModal {
|
||||
id: msNotWorkingPopup
|
||||
anchors.centerIn: parent
|
||||
header.title: qsTr("Can not connect to mailserver")
|
||||
|
||||
MailserverConnectionDialog {
|
||||
onClosed: {
|
||||
appLayout.mailserverNotWorkingPopup = null
|
||||
destroy()
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
width: msNotWorkingPopup.width
|
||||
implicitHeight: 100
|
||||
|
||||
StatusBaseText {
|
||||
text: qsTr("The mailserver you're connecting to is unavailable.")
|
||||
color: Theme.palette.directColor1
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
|
||||
rightButtons: [
|
||||
StatusButton {
|
||||
text: qsTr("Pick another")
|
||||
onClicked: {
|
||||
Global.changeAppSectionBySectionType(Constants.appSection.profile, Constants.settingsSubsection.messaging)
|
||||
msNotWorkingPopup.close()
|
||||
}
|
||||
},
|
||||
StatusButton {
|
||||
text: qsTr("Retry")
|
||||
onClicked: {
|
||||
// Retrying already happens automatically, so doing nothing
|
||||
// here is the same as retrying...
|
||||
msNotWorkingPopup.close()
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: chooseBrowserPopupComponent
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
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
|
||||
|
||||
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 {
|
||||
text: qsTr("Retry")
|
||||
onClicked: {
|
||||
// Retrying already happens automatically, so doing nothing
|
||||
// here is the same as retrying...
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue