aboutsummaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-02-27 17:49:28 +0300
committerlink2xt <link2xt@testrun.org>2021-02-27 17:49:28 +0300
commit502e28ecd76c6f4299dfcec10f71e3b234aa4a5b (patch)
treeb79e3f9f3287f768160b427f06e0af2495473721 /qml
parent698f2fde901dd9accd7837448e910d0e2c91563d (diff)
downloadkdeltachat-502e28ecd76c6f4299dfcec10f71e3b234aa4a5b.tar.gz
kdeltachat-502e28ecd76c6f4299dfcec10f71e3b234aa4a5b.zip
Switch to 2-page layout
Account switching is an overlay now.
Diffstat (limited to 'qml')
-rw-r--r--qml/AccountsPage.qml1
-rw-r--r--qml/SplashPage.qml8
-rw-r--r--qml/main.qml9
3 files changed, 17 insertions, 1 deletions
diff --git a/qml/AccountsPage.qml b/qml/AccountsPage.qml
index b48a4e4..ce1df02 100644
--- a/qml/AccountsPage.qml
+++ b/qml/AccountsPage.qml
@@ -114,6 +114,7 @@ Kirigami.Page {
} else {
pageStack.replace("qrc:/qml/ConfigurePage.qml", {context: context})
}
+ pageStack.layers.pop()
}
}
diff --git a/qml/SplashPage.qml b/qml/SplashPage.qml
new file mode 100644
index 0000000..d3af1c9
--- /dev/null
+++ b/qml/SplashPage.qml
@@ -0,0 +1,8 @@
+import QtQuick 2.12
+import org.kde.kirigami 2.12 as Kirigami
+
+Kirigami.Page {
+ id: splashPage
+
+ title: qsTr("Delta Chat")
+}
diff --git a/qml/main.qml b/qml/main.qml
index 546d553..7b0601b 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -12,7 +12,9 @@ Kirigami.ApplicationWindow {
title: qsTr("Delta Chat")
- pageStack.initialPage: AccountsPage {}
+ Component {id: accountsPage; AccountsPage {}}
+
+ pageStack.initialPage: SplashPage {}
globalDrawer: Kirigami.GlobalDrawer {
header: Controls.Switch {
@@ -31,6 +33,11 @@ Kirigami.ApplicationWindow {
text: "Maybe network"
iconName: "view-refresh"
onTriggered: dcAccounts.maybeNetwork()
+ },
+ Kirigami.Action {
+ text: "Switch account"
+ iconName: "view-refresh"
+ onTriggered: pageStack.layers.push(accountsPage)
}
]
}