Merge lp:~diegosarmentero/pay-ui/new-design into lp:pay-ui
- new-design
- Merge into first-branch
Proposed by
Diego Sarmentero
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 15 |
Merged at revision: | 12 |
Proposed branch: | lp:~diegosarmentero/pay-ui/new-design |
Merge into: | lp:pay-ui |
Diff against target: |
950 lines (+427/-308) 5 files modified
app/payui.qml (+43/-14) app/ui/AddPaymentPage.qml (+180/-0) app/ui/CheckoutPage.qml (+52/-177) app/ui/DirectPurchase.qml (+151/-116) manifest.json (+1/-1) |
To merge this branch: | bzr merge lp:~diegosarmentero/pay-ui/new-design |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+228175@code.launchpad.net |
Commit message
- Update UI with New Design
Description of the change
To post a comment you must log in.
- 13. By Diego Sarmentero
-
remove commented code
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
dobey (dobey) : | # |
review:
Needs Fixing
- 14. By Diego Sarmentero
-
fixing html usage in labels
- 15. By Diego Sarmentero
-
fix links colors
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:15
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
review:
Approve
(continuous-integration)
Revision history for this message
dobey (dobey) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'app/payui.qml' |
2 | --- app/payui.qml 2014-07-14 19:54:22 +0000 |
3 | +++ app/payui.qml 2014-07-24 19:43:47 +0000 |
4 | @@ -25,6 +25,7 @@ |
5 | states: |
6 | - add-payment |
7 | - direct |
8 | + - payment |
9 | - buy-interaction |
10 | - checkout |
11 | - no-credentials |
12 | @@ -66,16 +67,22 @@ |
13 | checkout.itemTitle = title; |
14 | checkout.itemSubtitle = publisher; |
15 | checkout.price = "$" + price; |
16 | - checkout.icon = icon; |
17 | + payment.itemTitle = title; |
18 | + payment.itemSubtitle = publisher; |
19 | + payment.price = "$" + price; |
20 | } |
21 | |
22 | onPaymentTypesObtained: { |
23 | checkout.model = payments; |
24 | if (payments.length == 0) { |
25 | - webkit.title = i18n.tr("Add Payment"); |
26 | - webkit.url = purchase.getAddPaymentUrl(); |
27 | - mainView.state = "add-payment"; |
28 | - pageStack.push(webkit); |
29 | + direct.hasPayments = false; |
30 | + } else { |
31 | + direct.hasPayments = true; |
32 | + } |
33 | + if (mainView.state == "add-payment") { |
34 | + mainView.state = "checkout"; |
35 | + pageStack.pop(); |
36 | + pageStack.push(checkout); |
37 | } else { |
38 | mainView.state = "direct"; |
39 | pageStack.push(direct); |
40 | @@ -98,6 +105,7 @@ |
41 | webkit.title = ""; |
42 | webkit.url = url; |
43 | mainView.state = "buy-interaction"; |
44 | + pageStack.pop(); |
45 | pageStack.push(webkit); |
46 | } |
47 | |
48 | @@ -107,20 +115,18 @@ |
49 | } |
50 | |
51 | onAuthenticationError: { |
52 | - if (pageStack.currentPage) { |
53 | + if (pageStack.currentPage == direct) { |
54 | mainView.hideLoading(); |
55 | - pageStack.currentPage.showWrongPassword(); |
56 | + direct.showWrongPassword(); |
57 | } else { |
58 | - mainView.state = "no-credentials"; |
59 | - pageStack.push(noCredentials); |
60 | mainView.hideLoading(); |
61 | + Qt.openUrlExternally("settings:///system/online-accounts"); |
62 | } |
63 | } |
64 | |
65 | onCredentialsNotFound: { |
66 | - mainView.state = "no-credentials"; |
67 | - pageStack.push(noCredentials); |
68 | mainView.hideLoading(); |
69 | + Qt.openUrlExternally("settings:///system/online-accounts"); |
70 | } |
71 | } |
72 | |
73 | @@ -228,9 +234,14 @@ |
74 | } |
75 | |
76 | onBuy: { |
77 | - mainView.purchasing = true; |
78 | - purchase.buyItemWithPreferredPayment(email, password); |
79 | - showLoading(); |
80 | + if (direct.hasPayments) { |
81 | + mainView.purchasing = true; |
82 | + purchase.buyItemWithPreferredPayment(email, password); |
83 | + showLoading(); |
84 | + } else { |
85 | + mainView.state = "payment"; |
86 | + pageStack.push(payment); |
87 | + } |
88 | } |
89 | } |
90 | |
91 | @@ -246,6 +257,7 @@ |
92 | onBuy: { |
93 | mainView.purchasing = true; |
94 | showLoading(); |
95 | + var password = direct.password; |
96 | purchase.buyItem(email, password, paymentId, backendId); |
97 | } |
98 | |
99 | @@ -257,11 +269,26 @@ |
100 | } |
101 | } |
102 | |
103 | + AddPaymentPage { |
104 | + id: payment |
105 | + visible: false |
106 | + account: accounts |
107 | + |
108 | + onAddCreditCard: { |
109 | + webkit.title = i18n.tr("Add Payment"); |
110 | + webkit.url = purchase.getAddPaymentUrl(); |
111 | + mainView.state = "add-payment"; |
112 | + pageStack.pop(); |
113 | + pageStack.push(webkit); |
114 | + } |
115 | + } |
116 | + |
117 | UbuntuPurchaseWebkit { |
118 | id: webkit |
119 | visible: false |
120 | |
121 | onPurchaseCanceled: { |
122 | + pageStack.pop(); |
123 | hideLoading(); |
124 | if (mainView.state == "add-payment") { |
125 | creditCardErrorDialog.open = true; |
126 | @@ -272,6 +299,7 @@ |
127 | onPurchaseSucceeded: { |
128 | if (mainView.state == "add-payment") { |
129 | showLoading(); |
130 | + pageStack.pop(); |
131 | purchase.getPaymentTypes(); |
132 | } else { |
133 | purchase.quitSuccess(); |
134 | @@ -296,6 +324,7 @@ |
135 | } |
136 | |
137 | onRetry: { |
138 | + pageStack.pop(); |
139 | purchase.checkCredentials(); |
140 | showLoading(); |
141 | } |
142 | |
143 | === added file 'app/ui/AddPaymentPage.qml' |
144 | --- app/ui/AddPaymentPage.qml 1970-01-01 00:00:00 +0000 |
145 | +++ app/ui/AddPaymentPage.qml 2014-07-24 19:43:47 +0000 |
146 | @@ -0,0 +1,180 @@ |
147 | +/* |
148 | + * Copyright 2014 Canonical Ltd. |
149 | + * |
150 | + * This program is free software; you can redistribute it and/or modify |
151 | + * it under the terms of the GNU General Public License as published by |
152 | + * the Free Software Foundation; version 3. |
153 | + * |
154 | + * This program is distributed in the hope that it will be useful, |
155 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
156 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
157 | + * GNU General Public License for more details. |
158 | + * |
159 | + * You should have received a copy of the GNU General Public License |
160 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
161 | + */ |
162 | + |
163 | +import QtQuick 2.0 |
164 | +import Ubuntu.Components 0.1 |
165 | +import Ubuntu.Components.ListItems 0.1 as ListItem |
166 | + |
167 | +Page { |
168 | + id: pageAddPayment |
169 | + objectName: "pageAddPayment" |
170 | + |
171 | + title: i18n.tr("Payment") |
172 | + |
173 | + property alias itemTitle: titleLabel.text |
174 | + property alias itemSubtitle: subtitleLabel.text |
175 | + property alias price: priceLabel.text |
176 | + property alias account: accountView.model |
177 | + |
178 | + signal addCreditCard |
179 | + |
180 | + function launchPurchase() { |
181 | + var pay = selector.model[selector.selectedIndex]; |
182 | + var email = accountView.currentItem.email; |
183 | + pageAddPayment.buy(email, pay.paymentId, pay.backendId); |
184 | + } |
185 | + |
186 | + Flickable { |
187 | + id: checkoutFlickable |
188 | + anchors { |
189 | + left: parent.left |
190 | + right: parent.right |
191 | + top: parent.top |
192 | + } |
193 | + |
194 | + contentHeight: contentItem.childrenRect.height |
195 | + |
196 | + Item { |
197 | + id: header |
198 | + height: units.gu(8) |
199 | + anchors { |
200 | + left: parent.left |
201 | + right: parent.right |
202 | + top: parent.top |
203 | + } |
204 | + |
205 | + Column { |
206 | + id: col |
207 | + spacing: units.gu(1) |
208 | + anchors { |
209 | + left: parent.left |
210 | + top: parent.top |
211 | + right: priceLabel.left |
212 | + margins: units.gu(2) |
213 | + } |
214 | + |
215 | + Label { |
216 | + id: titleLabel |
217 | + objectName: "titleLabel" |
218 | + fontSize: "medium" |
219 | + anchors { |
220 | + left: parent.left |
221 | + right: parent.right |
222 | + } |
223 | + elide: Text.ElideRight |
224 | + } |
225 | + Label { |
226 | + id: subtitleLabel |
227 | + objectName: "subtitleLabel" |
228 | + fontSize: "small" |
229 | + anchors { |
230 | + left: parent.left |
231 | + right: parent.right |
232 | + } |
233 | + elide: Text.ElideRight |
234 | + } |
235 | + } |
236 | + |
237 | + Label { |
238 | + id: priceLabel |
239 | + objectName: "priceLabel" |
240 | + font.bold: true |
241 | + fontSize: "x-large" |
242 | + verticalAlignment: Text.AlignVCenter |
243 | + |
244 | + anchors { |
245 | + right: parent.right |
246 | + top: parent.top |
247 | + bottom: parent.bottom |
248 | + rightMargin: units.gu(2) |
249 | + } |
250 | + } |
251 | + } |
252 | + |
253 | + Rectangle { |
254 | + id: separator |
255 | + height: units.dp(1) |
256 | + color: "gray" |
257 | + anchors { |
258 | + left: parent.left |
259 | + right: parent.right |
260 | + top: header.bottom |
261 | + rightMargin: units.gu(2) |
262 | + leftMargin: units.gu(2) |
263 | + topMargin: units.gu(1) |
264 | + } |
265 | + } |
266 | + |
267 | + ListView { |
268 | + id: accountView |
269 | + anchors { |
270 | + left: parent.left |
271 | + right: parent.right |
272 | + top: separator.bottom |
273 | + leftMargin: units.gu(2) |
274 | + rightMargin: units.gu(2) |
275 | + topMargin: units.gu(2) |
276 | + } |
277 | + height: units.gu(2) |
278 | + enabled: false |
279 | + delegate: Label { |
280 | + id: ubuntuIdLabel |
281 | + objectName: "ubuntuIdLabel" |
282 | + text: "'" + model.displayName + "'" |
283 | + elide: Text.ElideRight |
284 | + property string email: model.displayName |
285 | + } |
286 | + } |
287 | + |
288 | + Column { |
289 | + id: colButtons |
290 | + anchors { |
291 | + left: parent.left |
292 | + right: parent.right |
293 | + top: accountView.bottom |
294 | + margins: units.gu(4) |
295 | + } |
296 | + spacing: units.gu(2) |
297 | + |
298 | + Button { |
299 | + id: buyButton |
300 | + objectName: "buyButton" |
301 | + text: i18n.tr("Add credit/debit card") |
302 | + anchors { |
303 | + left: parent.left |
304 | + right: parent.right |
305 | + } |
306 | + |
307 | + onClicked: { |
308 | + pageAddPayment.addCreditCard(); |
309 | + } |
310 | + } |
311 | + Button { |
312 | + id: cancelButton |
313 | + objectName: "cancelButton" |
314 | + text: i18n.tr("Cancel") |
315 | + color: "#797979" |
316 | + anchors { |
317 | + left: parent.left |
318 | + right: parent.right |
319 | + } |
320 | + |
321 | + onClicked: pageAddPayment.cancel(); |
322 | + } |
323 | + } |
324 | + |
325 | + } |
326 | +} |
327 | |
328 | === modified file 'app/ui/CheckoutPage.qml' |
329 | --- app/ui/CheckoutPage.qml 2014-07-15 19:06:16 +0000 |
330 | +++ app/ui/CheckoutPage.qml 2014-07-24 19:43:47 +0000 |
331 | @@ -22,30 +22,23 @@ |
332 | id: pageCheckout |
333 | objectName: "pageCheckout" |
334 | |
335 | - title: selector.currentlyExpanded ? i18n.tr("Payment type") : i18n.tr("Checkout") |
336 | + title: i18n.tr("Payment") |
337 | |
338 | - property bool _errorVisible: false |
339 | property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0 |
340 | property alias itemTitle: titleLabel.text |
341 | property alias itemSubtitle: subtitleLabel.text |
342 | property alias price: priceLabel.text |
343 | - property alias icon: iconImage.source |
344 | property alias account: accountView.model |
345 | property alias model: selector.model |
346 | |
347 | signal cancel |
348 | - signal buy(string email, string password, string paymentId, string backendId) |
349 | + signal buy(string email, string paymentId, string backendId) |
350 | signal addCreditCard |
351 | |
352 | function launchPurchase() { |
353 | - pageCheckout._errorVisible = false; |
354 | var pay = selector.model[selector.selectedIndex]; |
355 | var email = accountView.currentItem.email; |
356 | - pageCheckout.buy(email, passwordField.text, pay.paymentId, pay.backendId); |
357 | - } |
358 | - |
359 | - function showWrongPassword() { |
360 | - pageCheckout._errorVisible = true; |
361 | + pageCheckout.buy(email, pay.paymentId, pay.backendId); |
362 | } |
363 | |
364 | Flickable { |
365 | @@ -58,7 +51,7 @@ |
366 | |
367 | contentHeight: contentItem.childrenRect.height + pageCheckout.keyboardSize |
368 | |
369 | - Rectangle { |
370 | + Item { |
371 | id: header |
372 | height: units.gu(8) |
373 | anchors { |
374 | @@ -66,39 +59,15 @@ |
375 | right: parent.right |
376 | top: parent.top |
377 | } |
378 | - color: "#d6d6d6" |
379 | - border { |
380 | - width: 1 |
381 | - color: "#c3c3c3" |
382 | - } |
383 | - |
384 | - UbuntuShape { |
385 | - id: iconShape |
386 | - width: units.gu(6) |
387 | - height: units.gu(6) |
388 | - anchors { |
389 | - left: parent.left |
390 | - top: parent.top |
391 | - leftMargin: units.gu(2) |
392 | - topMargin: units.gu(1) |
393 | - } |
394 | - Image { |
395 | - id: iconImage |
396 | - objectName: "iconImage" |
397 | - anchors.fill: parent |
398 | - } |
399 | - } |
400 | |
401 | Column { |
402 | id: col |
403 | spacing: units.gu(1) |
404 | anchors { |
405 | - left: iconShape.right |
406 | + left: parent.left |
407 | top: parent.top |
408 | right: priceLabel.left |
409 | - leftMargin: units.gu(1) |
410 | - topMargin: units.gu(1) |
411 | - rightMargin: units.gu(1) |
412 | + margins: units.gu(2) |
413 | } |
414 | |
415 | Label { |
416 | @@ -139,72 +108,38 @@ |
417 | } |
418 | } |
419 | |
420 | - Item { |
421 | - id: paymentLabelItem |
422 | + Rectangle { |
423 | + id: separator |
424 | + height: units.dp(1) |
425 | + color: "gray" |
426 | anchors { |
427 | left: parent.left |
428 | right: parent.right |
429 | top: header.bottom |
430 | - topMargin: units.gu(2) |
431 | + rightMargin: units.gu(2) |
432 | leftMargin: units.gu(2) |
433 | - rightMargin: units.gu(2) |
434 | - } |
435 | - height: paymentLabel.height |
436 | - |
437 | - Label { |
438 | - id: paymentLabel |
439 | - text: i18n.tr("Your payment selection") |
440 | - font.bold: true |
441 | - fontSize: "medium" |
442 | - anchors { |
443 | - left: parent.left |
444 | - top: parent.top |
445 | - } |
446 | - } |
447 | - |
448 | - Image { |
449 | - anchors { |
450 | -// source: "../graphics/lock@8.png" |
451 | - right: parent.right |
452 | - top: parent.top |
453 | - } |
454 | - } |
455 | - } |
456 | - |
457 | - Rectangle { |
458 | - id: ubuntuIdArea |
459 | - color: "#d6d6d6" |
460 | - visible: !selector.currentlyExpanded |
461 | - anchors { |
462 | - left: parent.left |
463 | - right: parent.right |
464 | - top: paymentLabelItem.bottom |
465 | topMargin: units.gu(1) |
466 | } |
467 | - height: visible ? accountView.height + units.gu(2) : 0 |
468 | - border { |
469 | - width: 1 |
470 | - color: "#c3c3c3" |
471 | + } |
472 | + |
473 | + ListView { |
474 | + id: accountView |
475 | + anchors { |
476 | + left: parent.left |
477 | + right: parent.right |
478 | + top: separator.bottom |
479 | + leftMargin: units.gu(2) |
480 | + rightMargin: units.gu(2) |
481 | + topMargin: units.gu(2) |
482 | } |
483 | - |
484 | - ListView { |
485 | - id: accountView |
486 | - anchors { |
487 | - left: parent.left |
488 | - right: parent.right |
489 | - top: parent.top |
490 | - leftMargin: units.gu(2) |
491 | - topMargin: units.gu(1) |
492 | - } |
493 | - height: units.gu(2) |
494 | - enabled: false |
495 | - delegate: Label { |
496 | - id: ubuntuIdLabel |
497 | - objectName: "ubuntuIdLabel" |
498 | - text: "Ubuntu ID: " + model.displayName |
499 | - elide: Text.ElideRight |
500 | - property string email: model.displayName |
501 | - } |
502 | + height: units.gu(2) |
503 | + enabled: false |
504 | + delegate: Label { |
505 | + id: ubuntuIdLabel |
506 | + objectName: "ubuntuIdLabel" |
507 | + text: "'" + model.displayName + "'" |
508 | + elide: Text.ElideRight |
509 | + property string email: model.displayName |
510 | } |
511 | } |
512 | |
513 | @@ -214,95 +149,20 @@ |
514 | anchors { |
515 | left: parent.left |
516 | right: parent.right |
517 | - top: ubuntuIdArea.bottom |
518 | - margins: units.gu(1) |
519 | + top: accountView.bottom |
520 | + margins: units.gu(2) |
521 | } |
522 | - |
523 | - // Get image for paypal or credit card |
524 | delegate: OptionSelectorDelegate { text: modelData.name; subText: modelData.description; |
525 | - iconSource: modelData.image; height: units.gu(8) } |
526 | - } |
527 | - |
528 | - Button { |
529 | - id: addCardButton |
530 | - objectName: "addCardButton" |
531 | - text: i18n.tr("Add a new card") |
532 | - anchors { |
533 | - left: parent.left |
534 | - right: parent.right |
535 | - top: selector.bottom |
536 | - margins: units.gu(1) |
537 | - } |
538 | - height: units.gu(8) |
539 | - color: "#a9a9a9" |
540 | - visible: selector.currentlyExpanded |
541 | - |
542 | - onClicked: pageCheckout.addCreditCard(); |
543 | - } |
544 | - |
545 | - Label { |
546 | - id: manageCardLabel |
547 | - text: i18n.tr("Manage your card association from System Settings") |
548 | - anchors { |
549 | - left: parent.left |
550 | - right: parent.right |
551 | - top: addCardButton.bottom |
552 | - margins: units.gu(1) |
553 | - } |
554 | - visible: selector.currentlyExpanded |
555 | - } |
556 | - |
557 | - TextField { |
558 | - id: passwordField |
559 | - objectName: "passwordField" |
560 | - placeholderText: i18n.tr("password") |
561 | - echoMode: TextInput.Password |
562 | - anchors { |
563 | - left: parent.left |
564 | - right: parent.right |
565 | - top: selector.bottom |
566 | - margins: units.gu(1) |
567 | - } |
568 | - visible: !selector.currentlyExpanded |
569 | - |
570 | - Keys.onReturnPressed: launchPurchase(); |
571 | - } |
572 | - |
573 | - Label { |
574 | - id: errorPasswordLabel |
575 | - objectName: "errorPasswordLabel" |
576 | - color: "red" |
577 | - text: i18n.tr("Incorrect Password, please try again.") |
578 | - wrapMode: Text.WordWrap |
579 | - visible: selector.currentlyExpanded ? false : pageCheckout._errorVisible |
580 | - anchors { |
581 | - left: parent.left |
582 | - right: parent.right |
583 | - top: passwordField.bottom |
584 | - margins: units.gu(1) |
585 | - } |
586 | - } |
587 | - |
588 | - Rectangle { |
589 | - id: separator |
590 | - color: "#dedede" |
591 | - anchors { |
592 | - left: parent.left |
593 | - right: parent.right |
594 | - top: selector.currentlyExpanded ? manageCardLabel.bottom : errorPasswordLabel.bottom |
595 | - topMargin: units.gu(2) |
596 | - } |
597 | - height: 2 |
598 | - visible: !selector.currentlyExpanded |
599 | + height: units.gu(8) } |
600 | } |
601 | |
602 | Row { |
603 | - visible: !selector.currentlyExpanded |
604 | + id: rowButtons |
605 | anchors { |
606 | left: parent.left |
607 | right: parent.right |
608 | - top: separator.bottom |
609 | - margins: units.gu(1) |
610 | + top: selector.bottom |
611 | + margins: units.gu(4) |
612 | } |
613 | |
614 | spacing: units.gu(2) |
615 | @@ -311,7 +171,7 @@ |
616 | Button { |
617 | id: cancelButton |
618 | objectName: "cancelButton" |
619 | - text: i18n.tr("Cancel Checkout") |
620 | + text: i18n.tr("Cancel") |
621 | width: parent.buttonsWidth |
622 | color: "#797979" |
623 | |
624 | @@ -328,5 +188,20 @@ |
625 | } |
626 | } |
627 | } |
628 | + |
629 | + Label { |
630 | + id: paymentTypeLabel |
631 | + objectName: "paymentTypeLabel" |
632 | + textFormat: Text.RichText |
633 | + text: '<a href="#"><span style="color: #797979;">%1</span></a>'.arg(i18n.tr("Add credit/debit card")) |
634 | + anchors { |
635 | + left: parent.left |
636 | + right: parent.right |
637 | + top: rowButtons.bottom |
638 | + topMargin: units.gu(6) |
639 | + } |
640 | + horizontalAlignment: Text.AlignHCenter |
641 | + onLinkActivated: pageCheckout.addCreditCard(); |
642 | + } |
643 | } |
644 | } |
645 | |
646 | === modified file 'app/ui/DirectPurchase.qml' |
647 | --- app/ui/DirectPurchase.qml 2014-07-04 14:24:22 +0000 |
648 | +++ app/ui/DirectPurchase.qml 2014-07-24 19:43:47 +0000 |
649 | @@ -25,6 +25,9 @@ |
650 | signal showPaymentTypes |
651 | |
652 | property alias account: accountView.model |
653 | + property bool hasPayments: false |
654 | + property alias password: passwordField.text |
655 | + property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0 |
656 | |
657 | function launchPurchase() { |
658 | errorPasswordLabel.visible = false; |
659 | @@ -36,130 +39,162 @@ |
660 | errorPasswordLabel.visible = true; |
661 | } |
662 | |
663 | - Column { |
664 | - spacing: units.gu(2) |
665 | + Rectangle { |
666 | anchors.fill: parent |
667 | - anchors.margins: units.gu(1) |
668 | - |
669 | - Item { |
670 | - id: titleContainer |
671 | + color: "black" |
672 | + } |
673 | + |
674 | + UbuntuShape { |
675 | + color: "white" |
676 | + radius: "medium" |
677 | + height: colHeader.height + colBottom.height + units.gu(10) |
678 | + anchors { |
679 | + left: parent.left |
680 | + right: parent.right |
681 | + top: parent.top |
682 | + leftMargin: units.gu(1) |
683 | + rightMargin: units.gu(1) |
684 | + topMargin: Qt.inputMethod.visible ? units.gu(1) : (parent.height / 2) - (height / 2) |
685 | + } |
686 | + |
687 | + Column { |
688 | + id: colHeader |
689 | + spacing: units.gu(2) |
690 | + height: childrenRect.height |
691 | anchors { |
692 | left: parent.left |
693 | right: parent.right |
694 | + top: parent.top |
695 | + margins: units.gu(2) |
696 | } |
697 | - property int margin: units.gu(1) |
698 | - height: titleLabel.height + (titleContainer.margin * 2) |
699 | |
700 | Label { |
701 | id: titleLabel |
702 | objectName: "titleLabel" |
703 | - fontSize: "medium" |
704 | - anchors { |
705 | - left: parent.left |
706 | - right: lockImage.left |
707 | - top: parent.top |
708 | - } |
709 | - text: i18n.tr("To complete payment, enter Ubuntu ID password") |
710 | - wrapMode: Text.WordWrap |
711 | - } |
712 | - Image { |
713 | - id: lockImage |
714 | -// source: Qt.resolvedUrl("../graphics/lock.png") |
715 | - anchors.right: parent.right |
716 | - anchors.top: parent.top |
717 | - anchors.bottom: parent.bottom |
718 | - } |
719 | - } |
720 | - |
721 | - ListView { |
722 | - id: accountView |
723 | - anchors { |
724 | - left: parent.left |
725 | - right: parent.right |
726 | - } |
727 | - height: units.gu(1) |
728 | - delegate: Label { |
729 | - id: emailLabel |
730 | - objectName: "emailLabel" |
731 | - text: model.displayName |
732 | - fontSize: "medium" |
733 | - elide: Text.ElideRight |
734 | - } |
735 | - } |
736 | - |
737 | - TextField { |
738 | - id: passwordField |
739 | - objectName: "passwordField" |
740 | - placeholderText: i18n.tr("password") |
741 | - echoMode: TextInput.Password |
742 | - anchors { |
743 | - left: parent.left |
744 | - right: parent.right |
745 | - } |
746 | - |
747 | - Keys.onReturnPressed: launchPurchase(); |
748 | - } |
749 | - |
750 | - Label { |
751 | - id: errorPasswordLabel |
752 | - objectName: "errorPasswordLabel" |
753 | - color: "red" |
754 | - text: i18n.tr("Incorrect Password, please try again.") |
755 | - wrapMode: Text.WordWrap |
756 | - visible: false |
757 | - anchors { |
758 | - left: parent.left |
759 | - right: parent.right |
760 | - } |
761 | - } |
762 | - |
763 | - Label { |
764 | - id: paymentTypeLabel |
765 | - objectName: "paymentTypeLabel" |
766 | - textFormat: Text.RichText |
767 | - text: '<html><style type="text/css">a:link {color: #797979;}</style><body><a href="#">' + |
768 | - i18n.tr("Show payment type") + "</a>" |
769 | - anchors { |
770 | - left: parent.left |
771 | - right: parent.right |
772 | - } |
773 | - onLinkActivated: { |
774 | - errorPasswordLabel.visible = false; |
775 | - pageDirectPayment.showPaymentTypes(); |
776 | - } |
777 | - } |
778 | - |
779 | - Row { |
780 | - id: rowButtons |
781 | - anchors { |
782 | - left: parent.left |
783 | - right: parent.right |
784 | - } |
785 | - spacing: units.gu(1) |
786 | - |
787 | - Button { |
788 | - id: cancelButton |
789 | - objectName: "cancelButton" |
790 | - text: i18n.tr("Cancel") |
791 | - color: "#797979" |
792 | - width: (parent.width / 2) - (rowButtons.spacing / 2) |
793 | - |
794 | - onClicked: { |
795 | - pageDirectPayment.cancel(); |
796 | - } |
797 | - } |
798 | - |
799 | - Button { |
800 | - id: buyButton |
801 | - objectName: "buyButton" |
802 | - text: i18n.tr("Buy Now") |
803 | - width: (parent.width / 2) - (rowButtons.spacing / 2) |
804 | - |
805 | - onClicked: { |
806 | - launchPurchase(); |
807 | - } |
808 | - } |
809 | - } |
810 | - |
811 | + fontSize: "large" |
812 | + anchors { |
813 | + left: parent.left |
814 | + right: parent.right |
815 | + } |
816 | + text: i18n.tr("Sign in to Ubuntu Store") |
817 | + wrapMode: Text.WordWrap |
818 | + } |
819 | + |
820 | + Label { |
821 | + id: subtitleLabel |
822 | + objectName: "subtitleLabel" |
823 | + fontSize: "medium" |
824 | + anchors { |
825 | + left: parent.left |
826 | + right: parent.right |
827 | + } |
828 | + text: i18n.tr("Enter the Ubuntu password for") |
829 | + wrapMode: Text.WordWrap |
830 | + } |
831 | + |
832 | + ListView { |
833 | + id: accountView |
834 | + anchors { |
835 | + left: parent.left |
836 | + right: parent.right |
837 | + } |
838 | + height: units.gu(1) |
839 | + delegate: Label { |
840 | + id: emailLabel |
841 | + objectName: "emailLabel" |
842 | + text: "'" + model.displayName + "'" |
843 | + fontSize: "medium" |
844 | + elide: Text.ElideRight |
845 | + } |
846 | + } |
847 | + |
848 | + TextField { |
849 | + id: passwordField |
850 | + objectName: "passwordField" |
851 | + placeholderText: i18n.tr("Password") |
852 | + echoMode: TextInput.Password |
853 | + anchors { |
854 | + left: parent.left |
855 | + right: parent.right |
856 | + } |
857 | + |
858 | + Keys.onReturnPressed: launchPurchase(); |
859 | + } |
860 | + |
861 | + Label { |
862 | + id: errorPasswordLabel |
863 | + objectName: "errorPasswordLabel" |
864 | + color: "red" |
865 | + text: i18n.tr("Incorrect Password, please try again.") |
866 | + wrapMode: Text.WordWrap |
867 | + visible: false |
868 | + anchors { |
869 | + left: parent.left |
870 | + right: parent.right |
871 | + } |
872 | + } |
873 | + } |
874 | + |
875 | + Column { |
876 | + id: colBottom |
877 | + height: childrenRect.height |
878 | + anchors { |
879 | + left: parent.left |
880 | + right: parent.right |
881 | + top: colHeader.bottom |
882 | + margins: units.gu(4) |
883 | + } |
884 | + spacing: units.gu(2) |
885 | + |
886 | + Row { |
887 | + id: rowButtons |
888 | + anchors { |
889 | + left: parent.left |
890 | + right: parent.right |
891 | + } |
892 | + |
893 | + spacing: units.gu(2) |
894 | + property int buttonsWidth: (width / 2) - (spacing / 2) |
895 | + |
896 | + Button { |
897 | + id: cancelButton |
898 | + objectName: "cancelButton" |
899 | + text: i18n.tr("Cancel") |
900 | + width: parent.buttonsWidth |
901 | + color: "#797979" |
902 | + |
903 | + onClicked: pageDirectPayment.cancel(); |
904 | + } |
905 | + Button { |
906 | + id: buyButton |
907 | + objectName: "buyButton" |
908 | + text: i18n.tr("Buy Now") |
909 | + width: parent.buttonsWidth |
910 | + enabled: passwordField.text.length > 7 ? true : false |
911 | + |
912 | + onClicked: { |
913 | + launchPurchase(); |
914 | + } |
915 | + } |
916 | + } |
917 | + |
918 | + Label { |
919 | + id: paymentTypeLabel |
920 | + visible: (pageDirectPayment.hasPayments && passwordField.text.length > 7) ? true : false |
921 | + objectName: "paymentTypeLabel" |
922 | + textFormat: Text.RichText |
923 | + text: '<a href="#"><span style="color: #797979;">%1</span></a>'.arg(i18n.tr("View wallet")) |
924 | + anchors { |
925 | + left: parent.left |
926 | + right: parent.right |
927 | + } |
928 | + horizontalAlignment: Text.AlignRight |
929 | + onLinkActivated: { |
930 | + errorPasswordLabel.visible = false; |
931 | + pageDirectPayment.showPaymentTypes(); |
932 | + } |
933 | + } |
934 | + |
935 | + } |
936 | } |
937 | } |
938 | |
939 | === modified file 'manifest.json' |
940 | --- manifest.json 2014-07-16 18:52:08 +0000 |
941 | +++ manifest.json 2014-07-24 19:43:47 +0000 |
942 | @@ -10,6 +10,6 @@ |
943 | "desktop": "payui.desktop" |
944 | } |
945 | }, |
946 | - "version": "0.3", |
947 | + "version": "0.3.1", |
948 | "maintainer": "Sarmentero Diego <diego.sarmentero@canonical.com>" |
949 | } |
950 | \ No newline at end of file |
PASSED: Continuous integration, rev:13 jenkins. qa.ubuntu. com/job/ pay-ui- ci/34/ jenkins. qa.ubuntu. com/job/ generic- click-builder- utopic- armhf/315 jenkins. qa.ubuntu. com/job/ pay-ui- utopic- amd64-ci/ 31 jenkins. qa.ubuntu. com/job/ pay-ui- utopic- armhf-ci/ 31 jenkins. qa.ubuntu. com/job/ pay-ui- utopic- armhf-ci/ 31/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ pay-ui- utopic- i386-ci/ 31
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/pay- ui-ci/34/ rebuild
http://