Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- | 1 <!-- |
| 2 Copyright 2017 The LUCI Authors. All rights reserved. | 2 Copyright 2017 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. | 4 that can be found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 | 6 |
| 7 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> | 7 <link rel="import" href="../../bower_components/paper-item/paper-item.html"> |
| 8 <link rel="import" href="../../bower_components/polymer/polymer.html"> | 8 <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| 9 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> | |
| 10 <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layou t.html"> | |
| 9 | 11 |
| 10 <dom-module id="config-set-card"> | 12 <dom-module id="config-set-card"> |
| 11 <template> | 13 <template> |
| 12 <style> | 14 <style include="iron-flex iron-flex-alignment"> |
| 13 .center { | 15 .center { |
| 14 margin: auto; | 16 margin: auto; |
| 15 width: 25%; | 17 width: 25%; |
| 16 border-style: solid; | 18 border-style: solid; |
| 17 border-width: 2px; | 19 border-width: 2px; |
| 18 } | 20 } |
| 21 | |
| 22 iron-icon { | |
| 23 float: right; | |
| 24 } | |
| 25 | |
| 19 </style> | 26 </style> |
| 20 | 27 |
| 21 <paper-item class="center" id="paper-box"> | 28 <paper-item class="center" id="paper-box"> |
| 22 <!-- TODO(cwpayton): Add launch icon next to the name of the config | 29 <!-- TODO(cwpayton): Add launch icon next to the name of the config |
| 23 so that upon clicking the icon, the user will be taken to the config | 30 so that upon clicking the icon, the user will be taken to the config |
| 24 set page. --> | 31 set page. --> |
| 25 [[name]] | 32 <div class="horizontal layout wrap" style="width: 100%"> |
| 33 [[name]] | |
| 34 <template is="dom-if" if="[[lastImportAttempt]]"> | |
| 35 <iron-icon icon="icons:check-circle"></iron-icon> | |
| 36 </template> | |
| 37 <template is="dom-if" if="[[_not(lastImportAttempt)]]"> | |
| 38 <iron-icon icon="icons:warning"></iron-icon> | |
| 39 </template> | |
| 40 </div> | |
| 26 </paper-item> | 41 </paper-item> |
| 27 </template> | 42 </template> |
| 28 <script> | 43 <script> |
| 29 Polymer({ | 44 Polymer({ |
| 30 is: "config-set-card", | 45 is: "config-set-card", |
| 31 | 46 |
| 32 properties: { | 47 properties: { |
| 48 | |
| 33 name: { | 49 name: { |
| 34 type: String | 50 type: String |
| 35 } | 51 }, |
| 36 } | 52 |
| 53 lastImportAttempt: { | |
|
Sergey Berezin
2017/06/26 23:16:26
nit: I'd name it lastImportAttemptSuccess, to be c
ayanaadylova
2017/06/28 15:37:28
Done.
| |
| 54 type: Boolean, | |
| 55 }, | |
| 56 | |
| 57 }, | |
| 58 | |
| 59 _not: function(b) { | |
| 60 return !b; | |
| 61 }, | |
| 37 | 62 |
| 38 }); | 63 }); |
| 39 </script> | 64 </script> |
| 40 </dom-module> | 65 </dom-module> |
| 41 | 66 |
| OLD | NEW |