Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 1191273002: ChromeOS: Show the new POD RE-AUTH ICON when users needs to re-auth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 /** 981 /**
982 * Gets the custom icon. This icon is normally hidden, but can be shown 982 * Gets the custom icon. This icon is normally hidden, but can be shown
983 * using the chrome.screenlockPrivate API. 983 * using the chrome.screenlockPrivate API.
984 * @type {!HTMLDivElement} 984 * @type {!HTMLDivElement}
985 */ 985 */
986 get customIconElement() { 986 get customIconElement() {
987 return this.querySelector('.custom-icon-container'); 987 return this.querySelector('.custom-icon-container');
988 }, 988 },
989 989
990 /** 990 /**
991 * Gets the warning triangle element.
992 * @type {!HTMLDivElement}
993 */
994 get reauthWarningElement() {
995 return this.querySelector('.reauth-warning');
996 },
997
998 /**
991 * Updates the user pod element. 999 * Updates the user pod element.
992 */ 1000 */
993 update: function() { 1001 update: function() {
994 this.imageElement.src = 'chrome://userimage/' + this.user.username + 1002 this.imageElement.src = 'chrome://userimage/' + this.user.username +
995 '?id=' + UserPod.userImageSalt_[this.user.username]; 1003 '?id=' + UserPod.userImageSalt_[this.user.username];
996 1004
997 this.nameElement.textContent = this.user_.displayName; 1005 this.nameElement.textContent = this.user_.displayName;
998 this.classList.toggle('signed-in', this.user_.signedIn); 1006 this.classList.toggle('signed-in', this.user_.signedIn);
999 1007
1000 if (this.isAuthTypeUserClick) 1008 if (this.isAuthTypeUserClick)
1001 this.passwordLabelElement.textContent = this.authValue; 1009 this.passwordLabelElement.textContent = this.authValue;
1002 1010
1011 if (this.isAuthTypeOnlineSignIn) {
1012 this.reauthWarningElement.style.display = 'inline-flex';
dzhioev (left Google) 2015/06/22 23:51:25 Why not this.reauthWarningElementHidden = this.isA
1013 } else {
1014 this.reauthWarningElement.style.display = 'none';
1015 }
1016
1003 this.updateActionBoxArea(); 1017 this.updateActionBoxArea();
1004 1018
1005 this.passwordElement.setAttribute('aria-label', loadTimeData.getStringF( 1019 this.passwordElement.setAttribute('aria-label', loadTimeData.getStringF(
1006 'passwordFieldAccessibleName', this.user_.emailAddress)); 1020 'passwordFieldAccessibleName', this.user_.emailAddress));
1007 1021
1008 this.customizeUserPodPerUserType(); 1022 this.customizeUserPodPerUserType();
1009 }, 1023 },
1010 1024
1011 updateActionBoxArea: function() { 1025 updateActionBoxArea: function() {
1012 if (this.user_.publicAccount || this.user_.isApp) { 1026 if (this.user_.publicAccount || this.user_.isApp) {
(...skipping 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 if (pod && pod.multiProfilesPolicyApplied) { 3163 if (pod && pod.multiProfilesPolicyApplied) {
3150 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3164 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3151 } 3165 }
3152 } 3166 }
3153 }; 3167 };
3154 3168
3155 return { 3169 return {
3156 PodRow: PodRow 3170 PodRow: PodRow
3157 }; 3171 };
3158 }); 3172 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698