diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-12 19:18:56 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-12 19:18:56 +0200 |
commit | 9b0c38b4c276c140783fdc5e721e998335434505 (patch) | |
tree | 6ab7d09aef7be8ff4997f2e2ce887a4f9403f72d /components | |
parent | 7b6a60ea6274f19837cc5cfe937d70f72b1d6f7b (diff) | |
download | kube-9b0c38b4c276c140783fdc5e721e998335434505.tar.gz kube-9b0c38b4c276c140783fdc5e721e998335434505.zip |
Cleanup
Diffstat (limited to 'components')
-rw-r--r-- | components/accounts/contents/ui/AccountWizard.qml | 2 | ||||
-rw-r--r-- | components/kube/contents/ui/LogView.qml | 138 | ||||
-rw-r--r-- | components/kube/contents/ui/MailView.qml | 5 |
3 files changed, 35 insertions, 110 deletions
diff --git a/components/accounts/contents/ui/AccountWizard.qml b/components/accounts/contents/ui/AccountWizard.qml index fe61d81a..eff9fbb7 100644 --- a/components/accounts/contents/ui/AccountWizard.qml +++ b/components/accounts/contents/ui/AccountWizard.qml | |||
@@ -43,8 +43,6 @@ Kube.Popup { | |||
43 | id: mainView | 43 | id: mainView |
44 | 44 | ||
45 | Item { | 45 | Item { |
46 | anchors.fill: parent | ||
47 | |||
48 | Kirigami.Heading { | 46 | Kirigami.Heading { |
49 | id: heading | 47 | id: heading |
50 | text: "Select your new account type" | 48 | text: "Select your new account type" |
diff --git a/components/kube/contents/ui/LogView.qml b/components/kube/contents/ui/LogView.qml index a9b70c59..e25ea39f 100644 --- a/components/kube/contents/ui/LogView.qml +++ b/components/kube/contents/ui/LogView.qml | |||
@@ -36,92 +36,10 @@ Controls.SplitView { | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | Item { | ||
40 | id: statusBar | ||
41 | anchors { | ||
42 | topMargin: Kube.Units.smallSpacing | ||
43 | top: parent.top | ||
44 | left: parent.left | ||
45 | right: parent.right | ||
46 | } | ||
47 | |||
48 | height: Kube.Units.gridUnit * 2 | ||
49 | |||
50 | Repeater { | ||
51 | model: Kube.AccountsModel { | ||
52 | id: accountsModel | ||
53 | } | ||
54 | |||
55 | Column { | ||
56 | anchors.fill: statusBar | ||
57 | spacing: Kube.Units.smallSpacing | ||
58 | Row { | ||
59 | Kube.Label { | ||
60 | color: Kube.Colors.textColor | ||
61 | text: "Account: " + model.name | ||
62 | } | ||
63 | Kube.Label { | ||
64 | id: statusText | ||
65 | color: Kube.Colors.textColor | ||
66 | visible: false | ||
67 | states: [ | ||
68 | State { | ||
69 | name: "disconnected"; when: accountsModel.status == Kube.AccountsModel.OfflineStatus | ||
70 | PropertyChanges { target: statusText; text: "Offline"; visible: true } | ||
71 | }, | ||
72 | State { | ||
73 | name: "busy"; when: accountsModel.status == Kube.AccountsModel.BusyStatus | ||
74 | PropertyChanges { target: statusText; text: "Busy"; visible: true } | ||
75 | PropertyChanges { target: progressBar; visible: true } | ||
76 | } | ||
77 | ] | ||
78 | } | ||
79 | } | ||
80 | Controls2.ProgressBar { | ||
81 | id: progressBar | ||
82 | indeterminate: true | ||
83 | visible: false | ||
84 | height: Kube.Units.smallSpacing | ||
85 | width: parent.width | ||
86 | |||
87 | background: Rectangle { | ||
88 | color: Kube.Colors.backgroundColor | ||
89 | radius: 3 | ||
90 | } | ||
91 | |||
92 | contentItem: Item { | ||
93 | Rectangle { | ||
94 | width: progressBar.visualPosition * parent.width | ||
95 | height: parent.height | ||
96 | radius: 2 | ||
97 | color: Kube.Colors.highlightColor | ||
98 | } | ||
99 | } | ||
100 | |||
101 | |||
102 | Kube.Listener { | ||
103 | filter: Kube.Messages.progressNotification | ||
104 | onMessageReceived: { | ||
105 | progressBar.indeterminate = false | ||
106 | progressBar.from = 0 | ||
107 | progressBar.to = message.total | ||
108 | progressBar.value = message.progress | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | } | ||
114 | } | ||
115 | |||
116 | ListView { | 39 | ListView { |
117 | id: listView | 40 | id: listView |
118 | |||
119 | anchors { | 41 | anchors { |
120 | top: statusBar.bottom | 42 | margins: Kube.Units.largeSpacing |
121 | left: parent.left | ||
122 | right: parent.right | ||
123 | bottom: parent.bottom | ||
124 | topMargin: Kube.Units.largeSpacing | ||
125 | } | 43 | } |
126 | 44 | ||
127 | clip: true | 45 | clip: true |
@@ -202,30 +120,38 @@ Controls.SplitView { | |||
202 | property date timestamp | 120 | property date timestamp |
203 | property string message | 121 | property string message |
204 | property variant resourceId | 122 | property variant resourceId |
205 | GridLayout { | 123 | color: Kube.Colors.backgroundColor |
206 | anchors.fill: parent | 124 | Rectangle { |
207 | columns: 2 | 125 | anchors { |
208 | Kube.Label { | 126 | fill: parent |
209 | text: "Resource:" | 127 | margins: Kube.Units.largeSpacing |
210 | } | ||
211 | Kube.Label { | ||
212 | text: details.resourceId | ||
213 | } | ||
214 | Kube.Label { | ||
215 | text: "Timestamp:" | ||
216 | } | ||
217 | Kube.Label { | ||
218 | text: Qt.formatDateTime(details.timestamp, " hh:mm:ss dd MMM yyyy") | ||
219 | } | ||
220 | Kube.Label { | ||
221 | text: "Message:" | ||
222 | } | ||
223 | Kube.Label { | ||
224 | text: details.message | ||
225 | } | 128 | } |
226 | Item { | 129 | color: Kube.Colors.viewBackgroundColor |
227 | Layout.columnSpan: 2 | 130 | GridLayout { |
228 | Layout.fillHeight: true | 131 | anchors.fill: parent |
132 | columns: 2 | ||
133 | Kube.Label { | ||
134 | text: "Resource:" | ||
135 | } | ||
136 | Kube.Label { | ||
137 | text: details.resourceId | ||
138 | } | ||
139 | Kube.Label { | ||
140 | text: "Timestamp:" | ||
141 | } | ||
142 | Kube.Label { | ||
143 | text: Qt.formatDateTime(details.timestamp, " hh:mm:ss dd MMM yyyy") | ||
144 | } | ||
145 | Kube.Label { | ||
146 | text: "Message:" | ||
147 | } | ||
148 | Kube.Label { | ||
149 | text: details.message | ||
150 | } | ||
151 | Item { | ||
152 | Layout.columnSpan: 2 | ||
153 | Layout.fillHeight: true | ||
154 | } | ||
229 | } | 155 | } |
230 | } | 156 | } |
231 | } | 157 | } |
diff --git a/components/kube/contents/ui/MailView.qml b/components/kube/contents/ui/MailView.qml index 6e4cbbe1..8ae2ffe4 100644 --- a/components/kube/contents/ui/MailView.qml +++ b/components/kube/contents/ui/MailView.qml | |||
@@ -112,17 +112,18 @@ SplitView { | |||
112 | State { | 112 | State { |
113 | name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus | 113 | name: "disconnected"; when: model.status == Kube.AccountsModel.OfflineStatus |
114 | PropertyChanges { target: statusBar; visible: true } | 114 | PropertyChanges { target: statusBar; visible: true } |
115 | PropertyChanges { target: statusText; text: "Offline"; visible: true } | 115 | PropertyChanges { target: statusText; text: "Disconnected"; visible: true } |
116 | }, | 116 | }, |
117 | State { | 117 | State { |
118 | name: "busy"; when: model.status == Kube.AccountsModel.BusyStatus | 118 | name: "busy"; when: model.status == Kube.AccountsModel.BusyStatus |
119 | PropertyChanges { target: statusBar; visible: true } | 119 | PropertyChanges { target: statusBar; visible: true } |
120 | PropertyChanges { target: statusText; text: "Busy"; visible: true } | 120 | PropertyChanges { target: statusText; text: "Synchronizing..."; visible: true } |
121 | PropertyChanges { target: progressBar; visible: true } | 121 | PropertyChanges { target: progressBar; visible: true } |
122 | }, | 122 | }, |
123 | State { | 123 | State { |
124 | name: "error"; when: model.status == Kube.AccountsModel.ErrorStatus | 124 | name: "error"; when: model.status == Kube.AccountsModel.ErrorStatus |
125 | PropertyChanges { target: statusBar; visible: true } | 125 | PropertyChanges { target: statusBar; visible: true } |
126 | //TODO get to an error description | ||
126 | PropertyChanges { target: statusText; text: "Error"; visible: true } | 127 | PropertyChanges { target: statusText; text: "Error"; visible: true } |
127 | } | 128 | } |
128 | ] | 129 | ] |