From c6249b5f9c8c57c6dbbf314faf54fa051122d7a8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 29 Mar 2017 23:13:33 +0200 Subject: Statusbar --- components/mail/contents/ui/Mail.qml | 43 +++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 6 deletions(-) (limited to 'components/mail') diff --git a/components/mail/contents/ui/Mail.qml b/components/mail/contents/ui/Mail.qml index 04820d54..a2b25035 100644 --- a/components/mail/contents/ui/Mail.qml +++ b/components/mail/contents/ui/Mail.qml @@ -114,6 +114,12 @@ Controls2.ApplicationWindow { } } + //Model + KubeAccountsFramework.AccountsModel { + id: currentAccountModel + accountId: accountSwitcher.accountId + } + //BEGIN Shortcuts Shortcut { sequence: StandardKey.Refresh @@ -273,11 +279,8 @@ Controls2.ApplicationWindow { } Repeater { - model: KubeAccountsFramework.AccountsModel { - accountId: accountSwitcher.accountId - } - - RowLayout { + model: currentAccountModel + Row { anchors { bottom: parent.bottom left: parent.left @@ -325,7 +328,7 @@ Controls2.ApplicationWindow { anchors { top: accountName.bottom topMargin: Kirigami.Units.smallSpacing - bottom: outbox.top + bottom: statusBar.top left: parent.left right: parent.right } @@ -334,6 +337,34 @@ Controls2.ApplicationWindow { accountId: accountSwitcher.accountId } + Item { + id: statusBar + anchors { + topMargin: Kirigami.Units.smallSpacing + bottom: outbox.top + left: parent.left + right: parent.right + } + + height: Kirigami.Units.gridUnit * 1 + + Repeater { + model: currentAccountModel + Text { + id: statusText + anchors.centerIn: parent + visible: false + color: KubeTheme.Colors.textColor + states: [ + State { + name: "disconnected"; when: model.status == KubeAccountsFramework.AccountsModel.OfflineStatus + PropertyChanges { target: statusText; text: "Offline"; visible: true } + } + ] + } + } + } + KubeComponents.Outbox { id: outbox -- cgit v1.2.3