| 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); } |
| 40 |
| 41 .paper-green { color: var(--paper-green-600); } |
| 42 |
| 43 .paper-red { color: var(--paper-red-600); } |
| 44 |
| 45 .paper-grey { color: var(--paper-grey-600); } |
| 46 |
| 35 </style> | 47 </style> |
| 36 | 48 |
| 37 <paper-card elevation="2"> | 49 <paper-card elevation="2"> |
| 38 <div class="card-content"> | 50 <div class="card-content"> |
| 39 <div class="config-title">[[_formatName(name)]] | 51 <div class="config-title">[[_formatName(name)]] |
| 40 <div class="validation light"> | 52 <div class="validation"> |
| 41 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true"> | 53 <template is="dom-if" if="[[lastImportAttempt]]" restamp="true"> |
| 42 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp="
true"> | 54 <template is="dom-if" if="[[lastImportAttempt.success]]" restamp="
true"> |
| 43 <iron-icon icon="icons:check-circle"></iron-icon> | 55 <iron-icon icon="icons:check-circle" class="paper-green"></iron-
icon> |
| 44 </template> | 56 </template> |
| 45 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]" res
tamp="true"> | 57 <template is="dom-if" if="[[_not(lastImportAttempt.success)]]" res
tamp="true"> |
| 46 <iron-icon icon="icons:warning"></iron-icon> | 58 <iron-icon icon="icons:warning" class="paper-red"></iron-icon> |
| 47 </template> | 59 </template> |
| 48 </template> | 60 </template> |
| 49 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="true
"> | 61 <template is="dom-if" if="[[_not(lastImportAttempt)]]" restamp="true
"> |
| 50 <iron-icon icon="icons:help"></iron-icon> | 62 <iron-icon icon="icons:help" class="paper-grey"></iron-icon> |
| 51 </template> | 63 </template> |
| 52 </div> | 64 </div> |
| 53 </div> | 65 </div> |
| 54 <p class="light">Path: [[name]]</p> | 66 <p>Path: [[name]]</p> |
| 55 </div> | 67 </div> |
| 56 <div class="card-actions"> | 68 <div class="card-actions"> |
| 57 <div class="horizontal justified"> | 69 <div class="horizontal justified"> |
| 58 <a href="#/[[name]]"> | 70 <a href="#/[[name]]"> |
| 59 <paper-button class="config-open">Open</paper-button> | 71 <paper-button class="config-open">Open</paper-button> |
| 60 </a> | 72 </a> |
| 61 </div> | 73 </div> |
| 62 </div> | 74 </div> |
| 63 </paper-card> | 75 </paper-card> |
| 64 </template> | 76 </template> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 83 _formatName: function(name) { | 95 _formatName: function(name) { |
| 84 var tempName = name.substring(name.indexOf("/") + 1); | 96 var tempName = name.substring(name.indexOf("/") + 1); |
| 85 return tempName.includes("/") ? | 97 return tempName.includes("/") ? |
| 86 tempName.substring(0, tempName.indexOf("/")) : tempName; | 98 tempName.substring(0, tempName.indexOf("/")) : tempName; |
| 87 }, | 99 }, |
| 88 | 100 |
| 89 }); | 101 }); |
| 90 </script> | 102 </script> |
| 91 </dom-module> | 103 </dom-module> |
| 92 | 104 |
| OLD | NEW |