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/iron-icons/iron-icons.html"> | 7 <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> |
| 8 <link rel="import" href="../../bower_components/paper-button/paper-button.html"> | 8 <link rel="import" href="../../bower_components/paper-button/paper-button.html"> |
| 9 <link rel="import" href="../../bower_components/paper-card/paper-card.html"> | 9 <link rel="import" href="../../bower_components/paper-card/paper-card.html"> |
| 10 <link rel="import" href="../../bower_components/polymer/polymer.html"> | 10 <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| 11 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> | 11 <link rel="import" href="../../bower_components/iron-icons/maps-icons.html"> |
| 12 <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layou t.html"> | 12 <link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layou t.html"> |
| 13 | 13 |
| 14 <dom-module id="config-set-card"> | 14 <dom-module id="config-set-card"> |
| 15 <template> | 15 <template> |
| 16 <style> | 16 <style> |
| 17 a { text-decoration: none; } | 17 a { text-decoration: none; } |
| 18 | 18 |
| 19 paper-card { | 19 paper-card { |
| 20 max-width: 500px; | |
| 21 width: 100%; | 20 width: 100%; |
| 22 } | 21 } |
| 23 | 22 |
| 24 .config-title { @apply --paper-font-headline; } | 23 p { |
| 24 color: var(--paper-grey-600); | |
| 25 word-wrap: break-word; | |
| 26 } | |
| 25 | 27 |
| 26 .light { color: var(--paper-grey-600); } | 28 .config-title { |
| 29 @apply --paper-font-headline; | |
| 30 word-wrap: break-word; | |
| 31 } | |
| 27 | 32 |
| 28 .validation { | 33 .validation { |
| 29 float: right; | 34 float: right; |
| 30 font-size: 15px; | 35 font-size: 15px; |
| 31 vertical-align: middle; | 36 vertical-align: middle; |
| 32 } | 37 } |
| 33 | 38 |
| 34 .config-open { color: var(--google-blue-500); } | 39 .config-open { color: var(--google-blue-500); } |
| 35 </style> | 40 </style> |
| 36 | 41 |
| 37 <paper-card elevation="2"> | 42 <paper-card elevation="2"> |
| 38 <div class="card-content"> | 43 <div class="card-content"> |
| 39 <div class="config-title">[[_formatName(name)]] | 44 <div class="config-title">[[_formatName(name)]] |
| 40 <div class="validation light"> | 45 <div class="validation"> |
| 41 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true"> | 46 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true"> |
| 42 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp=" true"> | 47 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp=" true"> |
| 43 <iron-icon icon="icons:check-circle"></iron-icon> | 48 <iron-icon icon="icons:check-circle" style="color: var(--paper-g reen-600);"></iron-icon> |
|
Ryan Tseng
2017/07/13 22:16:53
should give these class names and add them to the
| |
| 44 </template> | 49 </template> |
| 45 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]" res tamp="true"> | 50 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]" res tamp="true"> |
| 46 <iron-icon icon="icons:warning"></iron-icon> | 51 <iron-icon icon="icons:warning" style="color: var(--paper-red-60 0);"></iron-icon> |
| 47 </template> | 52 </template> |
| 48 </template> | 53 </template> |
| 49 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="true "> | 54 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="true "> |
| 50 <iron-icon icon="icons:help"></iron-icon> | 55 <iron-icon icon="icons:help" style="color: var(--paper-grey-600);" ></iron-icon> |
| 51 </template> | 56 </template> |
| 52 </div> | 57 </div> |
| 53 </div> | 58 </div> |
| 54 <p class="light">Path: [[name]]</p> | 59 <p>Path: [[name]]</p> |
| 55 </div> | 60 </div> |
| 56 <div class="card-actions"> | 61 <div class="card-actions"> |
| 57 <div class="horizontal justified"> | 62 <div class="horizontal justified"> |
| 58 <a href="#/[[name]]"> | 63 <a href="#/[[name]]"> |
| 59 <paper-button class="config-open">Open</paper-button> | 64 <paper-button class="config-open">Open</paper-button> |
| 60 </a> | 65 </a> |
| 61 </div> | 66 </div> |
| 62 </div> | 67 </div> |
| 63 </paper-card> | 68 </paper-card> |
| 64 </template> | 69 </template> |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 83 _formatName: function(name) { | 88 _formatName: function(name) { |
| 84 var tempName = name.substring(name.indexOf("/") + 1); | 89 var tempName = name.substring(name.indexOf("/") + 1); |
| 85 return tempName.includes("/") ? | 90 return tempName.includes("/") ? |
| 86 tempName.substring(0, tempName.indexOf("/")) : tempName; | 91 tempName.substring(0, tempName.indexOf("/")) : tempName; |
| 87 }, | 92 }, |
| 88 | 93 |
| 89 }); | 94 }); |
| 90 </script> | 95 </script> |
| 91 </dom-module> | 96 </dom-module> |
| 92 | 97 |
| OLD | NEW |