OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 6 * @fileoverview |
7 * 'settings-people-page' is the settings page containing sign-in settings. | 7 * 'settings-people-page' is the settings page containing sign-in settings. |
8 */ | 8 */ |
9 Polymer({ | 9 Polymer({ |
10 is: 'settings-people-page', | 10 is: 'settings-people-page', |
11 | 11 |
12 behaviors: [ | 12 behaviors: [ |
| 13 I18nBehavior, |
13 WebUIListenerBehavior, | 14 WebUIListenerBehavior, |
| 15 <if expr="chromeos"> |
| 16 LockStateBehavior, |
| 17 </if> |
14 ], | 18 ], |
15 | 19 |
16 properties: { | 20 properties: { |
17 /** | 21 /** |
18 * Preferences state. | 22 * Preferences state. |
19 */ | 23 */ |
20 prefs: { | 24 prefs: { |
21 type: Object, | 25 type: Object, |
22 notify: true, | 26 notify: true, |
23 }, | 27 }, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 if (this.easyUnlockAllowed_) { | 132 if (this.easyUnlockAllowed_) { |
129 this.addWebUIListener( | 133 this.addWebUIListener( |
130 'easy-unlock-enabled-status', | 134 'easy-unlock-enabled-status', |
131 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 135 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
132 this.easyUnlockBrowserProxy_.getEnabledStatus().then( | 136 this.easyUnlockBrowserProxy_.getEnabledStatus().then( |
133 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 137 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
134 } | 138 } |
135 </if> | 139 </if> |
136 }, | 140 }, |
137 | 141 |
| 142 <if expr="chromeos"> |
| 143 /** @private */ |
| 144 getPasswordState_: function(hasPin, enableScreenLock) { |
| 145 if (!enableScreenLock) |
| 146 return this.i18n('lockScreenNone'); |
| 147 if (hasPin) |
| 148 return this.i18n('lockScreenPinOrPassword'); |
| 149 return this.i18n('lockScreenPasswordOnly'); |
| 150 }, |
| 151 </if> |
| 152 |
138 /** | 153 /** |
139 * Handler for when the profile's icon and name is updated. | 154 * Handler for when the profile's icon and name is updated. |
140 * @private | 155 * @private |
141 * @param {!settings.ProfileInfo} info | 156 * @param {!settings.ProfileInfo} info |
142 */ | 157 */ |
143 handleProfileInfo_: function(info) { | 158 handleProfileInfo_: function(info) { |
144 this.profileName_ = info.name; | 159 this.profileName_ = info.name; |
145 this.profileIconUrl_ = info.iconUrl; | 160 this.profileIconUrl_ = info.iconUrl; |
146 }, | 161 }, |
147 | 162 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 assert(this.syncStatus.syncSystemEnabled); | 240 assert(this.syncStatus.syncSystemEnabled); |
226 | 241 |
227 if (this.syncStatus.managed) | 242 if (this.syncStatus.managed) |
228 return; | 243 return; |
229 | 244 |
230 settings.navigateTo(settings.Route.SYNC); | 245 settings.navigateTo(settings.Route.SYNC); |
231 }, | 246 }, |
232 | 247 |
233 <if expr="chromeos"> | 248 <if expr="chromeos"> |
234 /** @private */ | 249 /** @private */ |
235 onQuickUnlockTap_: function() { | 250 onConfigureLockTap_: function() { |
236 settings.navigateTo(settings.Route.QUICK_UNLOCK_AUTHENTICATE); | 251 settings.navigateTo(settings.Route.LOCK_SCREEN); |
237 }, | 252 }, |
238 | 253 |
239 /** @private */ | 254 /** @private */ |
240 onEasyUnlockSetupTap_: function() { | 255 onEasyUnlockSetupTap_: function() { |
241 this.easyUnlockBrowserProxy_.startTurnOnFlow(); | 256 this.easyUnlockBrowserProxy_.startTurnOnFlow(); |
242 }, | 257 }, |
243 | 258 |
244 /** @private */ | 259 /** @private */ |
245 onEasyUnlockTurnOffTap_: function() { | 260 onEasyUnlockTurnOffTap_: function() { |
246 this.$$('#easyUnlockTurnOffDialog').open(); | 261 this.$$('#easyUnlockTurnOffDialog').open(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 if (!syncStatus) | 325 if (!syncStatus) |
311 return ''; | 326 return ''; |
312 if (syncStatus.hasError) | 327 if (syncStatus.hasError) |
313 return 'settings:sync-problem'; | 328 return 'settings:sync-problem'; |
314 if (syncStatus.managed) | 329 if (syncStatus.managed) |
315 return 'settings:sync-disabled'; | 330 return 'settings:sync-disabled'; |
316 | 331 |
317 return 'settings:done'; | 332 return 'settings:done'; |
318 }, | 333 }, |
319 }); | 334 }); |
OLD | NEW |