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

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 2393643004: [MD Settings][People] Updates positions of username and sync status message (Closed)
Patch Set: Addressed comments Created 4 years, 2 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 (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),
11 * hasUnrecoverableError: (boolean|undefined), 11 * hasUnrecoverableError: (boolean|undefined),
12 * managed: (boolean|undefined), 12 * managed: (boolean|undefined),
13 * setupCompleted: (boolean|undefined), 13 * setupCompleted: (boolean|undefined),
14 * setupInProgress: (boolean|undefined), 14 * setupInProgress: (boolean|undefined),
15 * signedIn: (boolean|undefined), 15 * signedIn: (boolean|undefined),
16 * signinAllowed: (boolean|undefined), 16 * signinAllowed: (boolean|undefined),
17 * signoutAllowed: (boolean|undefined), 17 * signoutAllowed: (boolean|undefined),
18 * statusText: (string|undefined), 18 * statusText: (string|undefined),
19 * supervisedUser: (boolean|undefined), 19 * supervisedUser: (boolean|undefined),
20 * accountInfo: (string|undefined),
tommycli 2016/10/05 19:37:37 alphabetize?
Moe 2016/10/05 21:08:24 Done.
20 * syncSystemEnabled: (boolean|undefined)}} 21 * syncSystemEnabled: (boolean|undefined)}}
21 * @see chrome/browser/ui/webui/options/browser_options_handler.cc 22 * @see chrome/browser/ui/webui/options/browser_options_handler.cc
22 */ 23 */
23 options.SyncStatus; 24 options.SyncStatus;
24 25
25 /** 26 /**
26 * @typedef {{id: string, name: string}} 27 * @typedef {{id: string, name: string}}
27 */ 28 */
28 options.ExtensionData; 29 options.ExtensionData;
29 30
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 signInButton.hidden = cr.isChromeOS || syncData.supervisedUser; 1182 signInButton.hidden = cr.isChromeOS || syncData.supervisedUser;
1182 1183
1183 signInButton.textContent = 1184 signInButton.textContent =
1184 this.signedIn_ ? 1185 this.signedIn_ ?
1185 loadTimeData.getString('syncButtonTextStop') : 1186 loadTimeData.getString('syncButtonTextStop') :
1186 syncData.setupInProgress ? 1187 syncData.setupInProgress ?
1187 loadTimeData.getString('syncButtonTextInProgress') : 1188 loadTimeData.getString('syncButtonTextInProgress') :
1188 loadTimeData.getString('syncButtonTextSignIn'); 1189 loadTimeData.getString('syncButtonTextSignIn');
1189 $('start-stop-sync-indicator').hidden = signInButton.hidden; 1190 $('start-stop-sync-indicator').hidden = signInButton.hidden;
1190 1191
1192 $('account-info').textContent = syncData.accountInfo;
1193 $('account-info').hidden = !this.signedIn_;
1194
1191 // TODO(estade): can this just be textContent? 1195 // TODO(estade): can this just be textContent?
1192 $('sync-status-text').innerHTML = syncData.statusText; 1196 $('sync-status-text').innerHTML = syncData.statusText;
1193 var statusSet = syncData.statusText.length != 0; 1197 var statusSet = syncData.statusText.length != 0;
1194 $('sync-overview').hidden = 1198 $('sync-overview').hidden =
1195 statusSet || 1199 statusSet ||
1196 (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount()); 1200 (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount());
1197 $('sync-status').hidden = !statusSet; 1201 $('sync-status').hidden = !statusSet;
1198 1202
1199 $('sync-action-link').textContent = syncData.actionLinkText; 1203 $('sync-action-link').textContent = syncData.actionLinkText;
1200 // Don't show the action link if it is empty or undefined. 1204 // Don't show the action link if it is empty or undefined.
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 2423
2420 settings.hidden = !isVisible; 2424 settings.hidden = !isVisible;
2421 }; 2425 };
2422 } 2426 }
2423 2427
2424 // Export 2428 // Export
2425 return { 2429 return {
2426 BrowserOptions: BrowserOptions 2430 BrowserOptions: BrowserOptions
2427 }; 2431 };
2428 }); 2432 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698