| OLD | NEW |
| 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 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1935 if (this.user.hasLocalCreds) { | 1935 if (this.user.hasLocalCreds) { |
| 1936 this.user.initialAuthType = AUTH_TYPE.OFFLINE_PASSWORD; | 1936 this.user.initialAuthType = AUTH_TYPE.OFFLINE_PASSWORD; |
| 1937 } else { | 1937 } else { |
| 1938 this.user.initialAuthType = AUTH_TYPE.ONLINE_SIGN_IN; | 1938 this.user.initialAuthType = AUTH_TYPE.ONLINE_SIGN_IN; |
| 1939 } | 1939 } |
| 1940 } | 1940 } |
| 1941 UserPod.prototype.initialize.call(this); | 1941 UserPod.prototype.initialize.call(this); |
| 1942 }, | 1942 }, |
| 1943 | 1943 |
| 1944 /** @override */ | 1944 /** @override */ |
| 1945 get mainInput() { |
| 1946 if (this.user.needsSignin) |
| 1947 return this.passwordElement; |
| 1948 else |
| 1949 return this.nameElement; |
| 1950 }, |
| 1951 |
| 1952 /** @override */ |
| 1945 update: function() { | 1953 update: function() { |
| 1946 this.imageElement.src = this.user.userImage; | 1954 this.imageElement.src = this.user.userImage; |
| 1947 this.nameElement.textContent = this.user.displayName; | 1955 this.nameElement.textContent = this.user.displayName; |
| 1948 this.reauthNameHintElement.textContent = this.user.displayName; | 1956 this.reauthNameHintElement.textContent = this.user.displayName; |
| 1949 | 1957 |
| 1950 var isLockedUser = this.user.needsSignin; | 1958 var isLockedUser = this.user.needsSignin; |
| 1951 var isLegacySupervisedUser = this.user.legacySupervisedUser; | 1959 var isLegacySupervisedUser = this.user.legacySupervisedUser; |
| 1952 var isChildUser = this.user.childUser; | 1960 var isChildUser = this.user.childUser; |
| 1953 this.classList.toggle('locked', isLockedUser); | 1961 this.classList.toggle('locked', isLockedUser); |
| 1954 this.classList.toggle('legacy-supervised', isLegacySupervisedUser); | 1962 this.classList.toggle('legacy-supervised', isLegacySupervisedUser); |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3173 if (pod && pod.multiProfilesPolicyApplied) { | 3181 if (pod && pod.multiProfilesPolicyApplied) { |
| 3174 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3182 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3175 } | 3183 } |
| 3176 } | 3184 } |
| 3177 }; | 3185 }; |
| 3178 | 3186 |
| 3179 return { | 3187 return { |
| 3180 PodRow: PodRow | 3188 PodRow: PodRow |
| 3181 }; | 3189 }; |
| 3182 }); | 3190 }); |
| OLD | NEW |