OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.exportPath('options'); | 5 cr.exportPath('options'); |
6 | 6 |
7 /** | 7 /** |
8 * @typedef {{actionLinkText: (string|undefined), | 8 * @typedef {{actionLinkText: (string|undefined), |
9 * childUser: (boolean|undefined), | 9 * childUser: (boolean|undefined), |
10 * hasError: (boolean|undefined), | 10 * hasError: (boolean|undefined), |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 // Disable the "customize / set up sync" button if sync has an | 1090 // Disable the "customize / set up sync" button if sync has an |
1091 // unrecoverable error. Also disable the button if sync has not been set | 1091 // unrecoverable error. Also disable the button if sync has not been set |
1092 // up and the user is being presented with a link to re-auth. | 1092 // up and the user is being presented with a link to re-auth. |
1093 // See crbug.com/289791. | 1093 // See crbug.com/289791. |
1094 customizeSyncButton.disabled = | 1094 customizeSyncButton.disabled = |
1095 syncData.hasUnrecoverableError || | 1095 syncData.hasUnrecoverableError || |
1096 (!syncData.setupCompleted && !$('sync-action-link').hidden); | 1096 (!syncData.setupCompleted && !$('sync-action-link').hidden); |
1097 }, | 1097 }, |
1098 | 1098 |
1099 /** | 1099 /** |
1100 * Update the UI depending on whether the current profile has a pairing for | 1100 * Update the UI depending on whether Easy Unlock is enabled for the current |
1101 * Easy Unlock. | 1101 * profile. |
1102 * @param {boolean} hasPairing True if the current profile has a pairing. | 1102 * @param {boolean} isEnabled True if the feature is enabled for the current |
| 1103 * profile. |
1103 */ | 1104 */ |
1104 updateEasyUnlock_: function(hasPairing) { | 1105 updateEasyUnlock_: function(isEnabled) { |
1105 $('easy-unlock-setup').hidden = hasPairing; | 1106 $('easy-unlock-disabled').hidden = isEnabled; |
1106 $('easy-unlock-enable').hidden = !hasPairing; | 1107 $('easy-unlock-enabled').hidden = !isEnabled; |
1107 if (!hasPairing && EasyUnlockTurnOffOverlay.getInstance().visible) { | 1108 if (!isEnabled && EasyUnlockTurnOffOverlay.getInstance().visible) { |
1108 EasyUnlockTurnOffOverlay.dismiss(); | 1109 EasyUnlockTurnOffOverlay.dismiss(); |
1109 } | 1110 } |
1110 }, | 1111 }, |
1111 | 1112 |
1112 /** | 1113 /** |
1113 * Update the UI depending on whether the current profile manages any | 1114 * Update the UI depending on whether the current profile manages any |
1114 * supervised users. | 1115 * supervised users. |
1115 * @param {boolean} show True if the current profile manages any supervised | 1116 * @param {boolean} show True if the current profile manages any supervised |
1116 * users. | 1117 * users. |
1117 */ | 1118 */ |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 } | 2235 } |
2235 button.textContent = loadTimeData.getString(strId); | 2236 button.textContent = loadTimeData.getString(strId); |
2236 }; | 2237 }; |
2237 } | 2238 } |
2238 | 2239 |
2239 // Export | 2240 // Export |
2240 return { | 2241 return { |
2241 BrowserOptions: BrowserOptions | 2242 BrowserOptions: BrowserOptions |
2242 }; | 2243 }; |
2243 }); | 2244 }); |
OLD | NEW |