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

Unified Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 1984313003: Settings People Revamp: Update main card Sync 'look' to match new spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/people_page/people_page.js
diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js
index ef135b7018ce9fd9c14721b77b6b2f077ba982ec..42cbf711e134114503f75de68514f56e37882e48 100644
--- a/chrome/browser/resources/settings/people_page/people_page.js
+++ b/chrome/browser/resources/settings/people_page/people_page.js
@@ -149,10 +149,6 @@ Polymer({
*/
handleSyncStatus_: function(syncStatus) {
this.syncStatus = syncStatus;
-
- // TODO(tommycli): Remove once we figure out how to refactor the sync
- // code to not include HTML in the status messages.
- this.$.syncStatusText.innerHTML = syncStatus.statusText;
},
<if expr="chromeos">
@@ -207,6 +203,11 @@ Polymer({
/** @private */
onSyncTap_: function() {
+ if (!this.syncStatus.signedIn || this.syncStatus.managed ||
+ !this.syncStatus.syncSystemEnabled) {
dschuyler 2016/05/18 00:08:00 Can these reasonably happen? Or is this action una
tommycli 2016/05/18 18:31:46 Done. I made the two that can't reasonably happen
+ return;
+ }
+
this.$.pages.setSubpageChain(['sync']);
},
@@ -236,16 +237,30 @@ Polymer({
* @private
dschuyler 2016/05/18 00:08:00 @param for syncStatus
tommycli 2016/05/18 18:31:46 Done.
* @return {boolean}
*/
- isStatusTextSet_: function(syncStatus) {
- return syncStatus && syncStatus.statusText.length > 0;
+ isAdvancedSyncSettingsVisible_: function(syncStatus) {
+ return syncStatus && syncStatus.signedIn && syncStatus.syncSystemEnabled;
},
/**
* @private
dschuyler 2016/05/18 00:08:00 @param for syncStatus
tommycli 2016/05/18 18:31:46 Done.
- * @return {boolean}
+ * @return {string}
*/
- isAdvancedSyncSettingsVisible_: function(syncStatus) {
- return syncStatus && syncStatus.signedIn && !syncStatus.managed &&
- syncStatus.syncSystemEnabled;
+ getSyncIcon_: function(syncStatus) {
+ if (!syncStatus)
+ return '';
+ if (syncStatus.hasError)
+ return 'settings:sync-problem';
+ if (syncStatus.managed)
+ return 'settings:sync-disabled';
+
+ return 'settings:done';
+ },
+
+ /**
+ * @private
dschuyler 2016/05/18 00:08:00 @param
tommycli 2016/05/18 18:31:46 Done.
+ * @return {string}
+ */
+ getSyncStatusClass_: function(syncStatus) {
+ return (syncStatus && syncStatus.hasError) ? 'sync-error' : '';
},
});

Powered by Google App Engine
This is Rietveld 408576698