Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html"> | |
| 1 <link rel="import" href="chrome://resources/html/cr.html"> | 2 <link rel="import" href="chrome://resources/html/cr.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-resizable-behavior /iron-resizable-behavior.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-resizable-behavior /iron-resizable-behavior.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable-behavior.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani matable-behavior.html"> |
| 6 <link rel="import" href="chrome://extensions/animation_helper.html"> | 7 <link rel="import" href="chrome://extensions/animation_helper.html"> |
| 7 <link rel="import" href="chrome://extensions/item.html"> | 8 <link rel="import" href="chrome://extensions/item.html"> |
| 8 | 9 |
| 9 <dom-module id="extensions-item-list"> | 10 <dom-module id="extensions-item-list"> |
| 10 <template> | 11 <template> |
| 11 <style> | 12 <style include="cr-hidden-style"> |
| 12 :host { | 13 :host { |
| 13 @apply(--layout-vertical); | 14 @apply(--layout-vertical); |
| 14 } | 15 } |
| 15 | 16 |
| 16 iron-list { | 17 iron-list { |
| 17 @apply(--layout-flex); | 18 @apply(--layout-flex); |
| 18 margin-top: 18px; | 19 margin-top: 18px; |
| 19 } | 20 } |
| 20 | 21 |
| 22 .empty-list-message { | |
| 23 align-items: center; | |
| 24 color: #6e6e6e; | |
| 25 display: flex; | |
| 26 flex: 1; | |
| 27 font-weight: 500; | |
| 28 justify-content: center; | |
| 29 } | |
| 30 | |
| 21 .wrapper { | 31 .wrapper { |
| 22 padding: 6px; | 32 padding: 6px; |
| 23 } | 33 } |
| 24 </style> | 34 </style> |
| 25 <iron-list id="list" items="[[computeShownItems_(items.*, filter)]]" | 35 <template is="dom-if" if="[[isEmpty_(items.length)]]"> |
|
dpapad
2017/07/07 00:45:04
Dom-if has a lot of overhead. It makes sense when
Devlin
2017/07/07 00:48:07
This is a very cheap section. We should probably
scottchen
2017/07/07 23:08:42
Done.
| |
| 36 <div class="empty-list-message"> | |
| 37 <span>$i18nRaw{noExtensionsOrApps}</span> | |
| 38 </div> | |
| 39 </template> | |
| 40 <template is="dom-if" if="[[!isEmpty_(items.length)]]"> | |
| 41 <div class="empty-list-message" | |
| 42 hidden$="[[!isEmpty_(shownItems_.length)]]"> | |
| 43 <span>$i18n{noSearchResults}</span> | |
| 44 </div> | |
| 45 </template> | |
| 46 <iron-list id="list" items="[[shownItems_]]" | |
| 26 as="item" grid> | 47 as="item" grid> |
| 27 <template> | 48 <template> |
| 28 <div class="wrapper"> | 49 <div class="wrapper"> |
| 29 <extensions-item data="[[item]]" delegate="[[delegate]]" | 50 <extensions-item data="[[item]]" delegate="[[delegate]]" |
| 30 id="[[item.id]]" in-dev-mode="[[inDevMode]]"> | 51 id="[[item.id]]" in-dev-mode="[[inDevMode]]"> |
| 31 </extensions-item> | 52 </extensions-item> |
| 32 </div> | 53 </div> |
| 33 </template> | 54 </template> |
| 34 </iron-list> | 55 </iron-list> |
| 35 </template> | 56 </template> |
| 36 <script src="chrome://extensions/item_list.js"></script> | 57 <script src="chrome://extensions/item_list.js"></script> |
| 37 </dom-module> | 58 </dom-module> |
| OLD | NEW |