Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 5 <link rel="import" href="/route.html"> | |
| 5 <link rel="import" href="/settings_shared_css.html"> | 6 <link rel="import" href="/settings_shared_css.html"> |
| 6 | 7 |
| 7 <dom-module id="settings-user-list"> | 8 <dom-module id="settings-user-list"> |
| 8 <template> | 9 <template> |
| 9 <style include="settings-shared"> | 10 <style include="settings-shared"> |
| 10 .soft-border { | 11 .user-list { |
| 11 border: 1px solid #c4c4c4; | 12 /* 4 users (the extra 1px is to account for the border-bottom) */ |
| 12 border-radius: 2px; | 13 max-height: calc(4 * (var(--settings-row-two-line-min-height) + 1px)); |
| 14 overflow-y: auto; | |
| 13 } | 15 } |
| 14 | 16 |
| 15 .user { | 17 .user { |
| 16 -webkit-padding-end: 8px; | 18 border-bottom: var(--settings-separator-line); |
| 17 -webkit-padding-start: 20px; | |
| 18 font-size: 0.75em; | |
| 19 height: 34px; | |
| 20 } | 19 } |
| 21 | 20 |
| 22 .user-list { | 21 .user-icon { |
| 23 border: 1px solid gray; | 22 background-position: center; |
| 24 height: 160px; | 23 background-repeat: no-repeat; |
| 25 overflow-y: auto; | 24 background-size: cover; |
| 26 padding: 10px 0; | 25 border-radius: 20px; |
| 26 flex-shrink: 0; | |
| 27 height: 40px; | |
| 28 width: 40px; | |
| 29 } | |
| 30 | |
| 31 .user-info { | |
| 32 -webkit-padding-start: 16px; | |
| 27 } | 33 } |
| 28 </style> | 34 </style> |
| 29 <div class="user-list soft-border"> | 35 <div class="user-list"> |
| 30 <template is="dom-repeat" items="[[users]]"> | 36 <template is="dom-repeat" items="[[users_]]"> |
| 31 <div class="user layout horizontal justified"> | 37 <div class="user layout horizontal center two-line"> |
| 32 <div class="layout vertical center-justified">[[item.name]]</div> | 38 <img class="user-icon" src="[[getProfilePictureUrl_(item.name)]]"> |
| 33 <div class="close-button" | 39 <div class="flex user-info"> |
| 34 hidden$="[[shouldHideCloseButton_(disabled, item.isOwner)]]"> | 40 <div> |
| 35 <paper-icon-button icon="cr:clear" class="clear-icon" | 41 [[item.name]] |
|
tommycli
2016/11/14 20:11:57
Odd that you say the display name isn't shown corr
Moe
2016/11/15 16:46:48
Your patch clearly returns the display email (the
tommycli
2016/11/15 17:50:35
Okay cool. So long as the behavior is consistent w
| |
| 36 on-tap="removeUser_"> | 42 <span hidden="[[!item.isOwner]]">$i18n{deviceOwnerLabel}</span> |
| 37 </paper-icon-button> | 43 </div> |
| 44 <div class="secondary">[[item.email]]</div> | |
| 38 </div> | 45 </div> |
| 46 <paper-icon-button icon="cr:clear" class="clear-icon" | |
| 47 on-tap="removeUser_" | |
| 48 hidden="[[shouldHideCloseButton_(disabled, item.isOwner)]]"> | |
| 49 </paper-icon-button> | |
| 39 </div> | 50 </div> |
| 40 </template> | 51 </template> |
| 41 </div> | 52 </div> |
| 42 </template> | 53 </template> |
| 43 <script src="user_list.js"></script> | 54 <script src="user_list.js"></script> |
| 44 </dom-module> | 55 </dom-module> |
| OLD | NEW |