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 <div id="no-items" class="empty-list-message" |
|
Devlin
2017/07/10 20:23:53
If we wanted to be super fancy, we could do:
#emp
scottchen
2017/07/10 22:13:40
I was trying to think of clever ways to do only 1
Devlin
2017/07/12 02:22:02
Given these are the (slightly) less common case, a
scottchen
2017/07/12 18:08:04
I tried to do as you suggested, then found out tha
| |
| 36 hidden$="[[!shouldShowEmptyItemsMessage_(items.length)]]"> | |
| 37 <span>$i18nRaw{noExtensionsOrApps}</span> | |
| 38 </div> | |
| 39 <div id="no-search-results" class="empty-list-message" | |
| 40 hidden$="[[!shouldShowEmptySearchMessage_(shownItems_.length)]]"> | |
| 41 <span>$i18n{noSearchResults}</span> | |
| 42 </div> | |
| 43 | |
| 44 <iron-list id="list" items="[[shownItems_]]" | |
| 26 as="item" grid> | 45 as="item" grid> |
| 27 <template> | 46 <template> |
| 28 <div class="wrapper"> | 47 <div class="wrapper"> |
| 29 <extensions-item data="[[item]]" delegate="[[delegate]]" | 48 <extensions-item data="[[item]]" delegate="[[delegate]]" |
| 30 id="[[item.id]]" in-dev-mode="[[inDevMode]]"> | 49 id="[[item.id]]" in-dev-mode="[[inDevMode]]"> |
| 31 </extensions-item> | 50 </extensions-item> |
| 32 </div> | 51 </div> |
| 33 </template> | 52 </template> |
| 34 </iron-list> | 53 </iron-list> |
| 35 </template> | 54 </template> |
| 36 <script src="chrome://extensions/item_list.js"></script> | 55 <script src="chrome://extensions/item_list.js"></script> |
| 37 </dom-module> | 56 </dom-module> |
| OLD | NEW |