summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/Outbox.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/package/contents/ui/Outbox.qml')
-rw-r--r--components/package/contents/ui/Outbox.qml41
1 files changed, 14 insertions, 27 deletions
diff --git a/components/package/contents/ui/Outbox.qml b/components/package/contents/ui/Outbox.qml
index e8edb0f4..19646459 100644
--- a/components/package/contents/ui/Outbox.qml
+++ b/components/package/contents/ui/Outbox.qml
@@ -28,36 +28,23 @@ import org.kube.framework.domain 1.0 as KubeFramework
28import org.kube.components 1.0 as KubeComponents 28import org.kube.components 1.0 as KubeComponents
29import org.kube.components.theme 1.0 as KubeTheme 29import org.kube.components.theme 1.0 as KubeTheme
30 30
31Button { 31KubeComponents.Button {
32 id: root 32 id: root
33 33
34 text: outboxModel.count > 0 ? "outbox (" + outboxModel.count + ")" : "outbox" 34 text: outboxModel.count > 0 ? "Outbox (" + outboxModel.count + ")" : "Outbox"
35 contentItem: Item { 35 color: "transparent"
36 Text { 36 textColor: KubeTheme.Colors.highlightedTextColor
37 text: parent.text 37 iconName: ""
38 font: parent.font 38 states: [
39 horizontalAlignment: Text.AlignHCenter 39 State {
40 verticalAlignment: Text.AlignVCenter 40 name: "busy"; when: outboxModel.status == KubeFramework.OutboxModel.InProgressStatus
41 elide: Text.ElideRight 41 PropertyChanges { target: root; iconName: KubeTheme.Icons.busy }
42 },
43 State {
44 name: "error"; when: outboxModel.status == KubeFramework.OutboxModel.ErrorStatus
45 PropertyChanges { target: root; iconName: KubeTheme.Icons.error }
42 } 46 }
43 KubeComponents.Icon { 47 ]
44 id: statusIcon
45 anchors {
46 right: parent.right
47 }
48 visible: false
49 states: [
50 State {
51 name: "busy"; when: outboxModel.status == KubeFramework.OutboxModel.InProgressStatus
52 PropertyChanges { target: statusIcon; iconName: KubeTheme.Icons.busy; visible: true }
53 },
54 State {
55 name: "error"; when: outboxModel.status == KubeFramework.OutboxModel.ErrorStatus
56 PropertyChanges { target: statusIcon; iconName: KubeTheme.Icons.error; visible: true }
57 }
58 ]
59 }
60 }
61 48
62 onClicked: { 49 onClicked: {
63 dialog.visible = dialog.visible ? false : true 50 dialog.visible = dialog.visible ? false : true