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

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: rebase 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/sync_section.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * accountInfo: (string|undefined),
9 * childUser: (boolean|undefined), 10 * childUser: (boolean|undefined),
10 * hasError: (boolean|undefined), 11 * hasError: (boolean|undefined),
11 * hasUnrecoverableError: (boolean|undefined), 12 * hasUnrecoverableError: (boolean|undefined),
12 * managed: (boolean|undefined), 13 * managed: (boolean|undefined),
13 * setupCompleted: (boolean|undefined), 14 * setupCompleted: (boolean|undefined),
14 * setupInProgress: (boolean|undefined), 15 * setupInProgress: (boolean|undefined),
15 * signedIn: (boolean|undefined), 16 * signedIn: (boolean|undefined),
16 * signinAllowed: (boolean|undefined), 17 * signinAllowed: (boolean|undefined),
17 * signoutAllowed: (boolean|undefined), 18 * signoutAllowed: (boolean|undefined),
18 * statusText: (string|undefined), 19 * statusText: (string|undefined),
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 signInButton.hidden = cr.isChromeOS || syncData.supervisedUser; 1179 signInButton.hidden = cr.isChromeOS || syncData.supervisedUser;
1179 1180
1180 signInButton.textContent = 1181 signInButton.textContent =
1181 this.signedIn_ ? 1182 this.signedIn_ ?
1182 loadTimeData.getString('syncButtonTextStop') : 1183 loadTimeData.getString('syncButtonTextStop') :
1183 syncData.setupInProgress ? 1184 syncData.setupInProgress ?
1184 loadTimeData.getString('syncButtonTextInProgress') : 1185 loadTimeData.getString('syncButtonTextInProgress') :
1185 loadTimeData.getString('syncButtonTextSignIn'); 1186 loadTimeData.getString('syncButtonTextSignIn');
1186 $('start-stop-sync-indicator').hidden = signInButton.hidden; 1187 $('start-stop-sync-indicator').hidden = signInButton.hidden;
1187 1188
1189 $('account-info').textContent = syncData.accountInfo;
1190 $('account-info').hidden = !this.signedIn_;
1191
1188 // TODO(estade): can this just be textContent? 1192 // TODO(estade): can this just be textContent?
1189 $('sync-status-text').innerHTML = syncData.statusText; 1193 $('sync-status-text').innerHTML = syncData.statusText;
1190 var statusSet = syncData.statusText.length != 0; 1194 var statusSet = syncData.statusText.length != 0;
1191 $('sync-overview').hidden = 1195 $('sync-overview').hidden =
1192 statusSet || 1196 statusSet ||
1193 (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount()); 1197 (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount());
1194 $('sync-status').hidden = !statusSet; 1198 $('sync-status').hidden = !statusSet;
1195 1199
1196 $('sync-action-link').textContent = syncData.actionLinkText; 1200 $('sync-action-link').textContent = syncData.actionLinkText;
1197 // Don't show the action link if it is empty or undefined. 1201 // Don't show the action link if it is empty or undefined.
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 2420
2417 settings.hidden = !isVisible; 2421 settings.hidden = !isVisible;
2418 }; 2422 };
2419 } 2423 }
2420 2424
2421 // Export 2425 // Export
2422 return { 2426 return {
2423 BrowserOptions: BrowserOptions 2427 BrowserOptions: BrowserOptions
2424 }; 2428 };
2425 }); 2429 });
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/resources/options/sync_section.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698