Chromium Code Reviews| Index: chrome/browser/resources/md_extensions/item_list.html |
| diff --git a/chrome/browser/resources/md_extensions/item_list.html b/chrome/browser/resources/md_extensions/item_list.html |
| index e4ad4abd4d1eea2a9f51475c2362236f0b0715e3..14883739fccf277e90e9799618f96e2207a4aa35 100644 |
| --- a/chrome/browser/resources/md_extensions/item_list.html |
| +++ b/chrome/browser/resources/md_extensions/item_list.html |
| @@ -1,3 +1,4 @@ |
| +<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html"> |
| <link rel="import" href="chrome://resources/html/cr.html"> |
| <link rel="import" href="chrome://resources/html/polymer.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html"> |
| @@ -8,7 +9,7 @@ |
| <dom-module id="extensions-item-list"> |
| <template> |
| - <style> |
| + <style include="cr-hidden-style"> |
| :host { |
| @apply(--layout-vertical); |
| } |
| @@ -18,11 +19,29 @@ |
| margin-top: 18px; |
| } |
| + .empty-list-message { |
| + align-items: center; |
| + color: #6e6e6e; |
| + display: flex; |
| + flex: 1; |
| + font-weight: 500; |
| + justify-content: center; |
| + } |
| + |
| .wrapper { |
| padding: 6px; |
| } |
| </style> |
| - <iron-list id="list" items="[[computeShownItems_(items.*, filter)]]" |
| + <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
|
| + hidden$="[[!shouldShowEmptyItemsMessage_(items.length)]]"> |
| + <span>$i18nRaw{noExtensionsOrApps}</span> |
| + </div> |
| + <div id="no-search-results" class="empty-list-message" |
| + hidden$="[[!shouldShowEmptySearchMessage_(shownItems_.length)]]"> |
| + <span>$i18n{noSearchResults}</span> |
| + </div> |
| + |
| + <iron-list id="list" items="[[shownItems_]]" |
| as="item" grid> |
| <template> |
| <div class="wrapper"> |