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

Side by Side Diff: chrome/browser/resources/settings/people_page/sync_page.html

Issue 2230833003: MD Settings: Remove iron-pages usage from <settings-sync-page>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 4 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 | « no previous file | chrome/browser/resources/settings/people_page/sync_page.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> 1 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
2 <link rel="import" href="chrome://resources/html/polymer.html"> 2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> 3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-pages/iron-pages.h tml">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input .html">
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-button/pape r-radio-button.html">
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper -radio-group.html">
10 <link rel="import" href="/controls/settings_checkbox.html"> 9 <link rel="import" href="/controls/settings_checkbox.html">
11 <link rel="import" href="/people_page/sync_browser_proxy.html"> 10 <link rel="import" href="/people_page/sync_browser_proxy.html">
12 <link rel="import" href="/route.html"> 11 <link rel="import" href="/route.html">
13 <link rel="import" href="/settings_shared_css.html"> 12 <link rel="import" href="/settings_shared_css.html">
14 13
15 <dom-module id="settings-sync-page"> 14 <dom-module id="settings-sync-page">
16 <template> 15 <template>
17 <style include="settings-shared"> 16 <style include="settings-shared">
18 #create-password-box { 17 #create-password-box {
19 /* The password fields line up with the encryption radio box text. */ 18 /* The password fields line up with the encryption radio box text. */
20 -webkit-margin-start: 36px; 19 -webkit-margin-start: 36px;
21 } 20 }
22 21
23 paper-input { 22 paper-input {
24 width: var(--paper-input-max-width); 23 width: var(--paper-input-max-width);
25 } 24 }
26 </style> 25 </style>
27 <iron-pages id="pages" selected="[[selectedPage_]]" attr-for-selected="id"> 26 <div id="[[pages.SPINNER]]" class="settings-box first"
28 <div id="[[pages.SPINNER]]" class="settings-box first"> 27 hidden$="[[!isStatus_(pages.SPINNER, pageStatus_)]]">
29 $i18n{syncLoading} 28 $i18n{syncLoading}
29 </div>
30 <div id="[[pages.TIMEOUT]]" class="settings-box first"
31 hidden$="[[!isStatus_(pages.TIMEOUT, pageStatus_)]]">
32 $i18n{syncTimeout}
33 </div>
34 <div id="[[pages.CONFIGURE]]"
35 hidden$="[[!isStatus_(pages.CONFIGURE, pageStatus_)]]">
36 <div class="settings-box first">
37 <paper-checkbox id="syncAllDataTypesCheckbox"
38 checked="{{syncPrefs.syncAllDataTypes}}"
39 on-change="onSyncAllDataTypesChanged_">
40 $i18n{syncEverythingCheckboxLabel}
41 </paper-checkbox>
30 </div> 42 </div>
31 <div id="[[pages.TIMEOUT]]" class="settings-box first"> 43
32 $i18n{syncTimeout} 44 <div class="list-frame">
45 <paper-checkbox checked="{{syncPrefs.appsSynced}}"
46 on-change="onSingleSyncDataTypeChanged_" class="list-item"
47 hidden="[[!syncPrefs.appsRegistered]]"
48 disabled="[[shouldSyncCheckboxBeDisabled_(
49 syncPrefs.syncAllDataTypes, syncPrefs.appsEnforced)]]">
50 $i18n{appCheckboxLabel}
51 </paper-checkbox>
52
53 <!-- Autofill has a special on-change handler to deal with
54 Payments integriation. -->
55 <paper-checkbox checked="{{syncPrefs.autofillSynced}}"
56 on-change="onAutofillDataTypeChanged_" class="list-item"
57 hidden="[[!syncPrefs.autofillRegistered]]"
58 disabled="[[shouldSyncCheckboxBeDisabled_(
59 syncPrefs.syncAllDataTypes, syncPrefs.autofillEnforced)]]">
60 $i18n{autofillCheckboxLabel}
61 </paper-checkbox>
62
63 <paper-checkbox checked="{{syncPrefs.bookmarksSynced}}"
64 on-change="onSingleSyncDataTypeChanged_" class="list-item"
65 hidden="[[!syncPrefs.bookmarksRegistered]]"
66 disabled="[[shouldSyncCheckboxBeDisabled_(
67 syncPrefs.syncAllDataTypes, syncPrefs.bookmarksEnforced)]]">
68 $i18n{bookmarksCheckboxLabel}
69 </paper-checkbox>
70 <paper-checkbox checked="{{syncPrefs.extensionsSynced}}"
71 on-change="onSingleSyncDataTypeChanged_" class="list-item"
72 hidden="[[!syncPrefs.extensionsRegistered]]"
73 disabled="[[shouldSyncCheckboxBeDisabled_(
74 syncPrefs.syncAllDataTypes, syncPrefs.extensionsEnforced)]]">
75 $i18n{extensionsCheckboxLabel}
76 </paper-checkbox>
77 <paper-checkbox checked="{{syncPrefs.typedUrlsSynced}}"
78 on-change="onSingleSyncDataTypeChanged_" class="list-item"
79 hidden="[[!syncPrefs.typedUrlsRegistered]]"
80 disabled="[[shouldSyncCheckboxBeDisabled_(
81 syncPrefs.syncAllDataTypes, syncPrefs.typedUrlsEnforced)]]">
82 $i18n{historyCheckboxLabel}
83 </paper-checkbox>
84 <paper-checkbox checked="{{syncPrefs.passwordsSynced}}"
85 on-change="onSingleSyncDataTypeChanged_" class="list-item"
86 hidden="[[!syncPrefs.passwordsRegistered]]"
87 disabled="[[shouldSyncCheckboxBeDisabled_(
88 syncPrefs.syncAllDataTypes, syncPrefs.passwordsEnforced)]]">
89 $i18n{passwordsCheckboxLabel}
90 </paper-checkbox>
91 <paper-checkbox checked="{{syncPrefs.preferencesSynced}}"
92 on-change="onSingleSyncDataTypeChanged_" class="list-item"
93 hidden="[[!syncPrefs.preferencesRegistered]]"
94 disabled="[[shouldSyncCheckboxBeDisabled_(
95 syncPrefs.syncAllDataTypes, syncPrefs.preferencesEnforced)]]">
96 $i18n{settingsCheckboxLabel}
97 </paper-checkbox>
98 <paper-checkbox checked="{{syncPrefs.themesSynced}}"
99 on-change="onSingleSyncDataTypeChanged_" class="list-item"
100 hidden="[[!syncPrefs.themesRegistered]]"
101 disabled="[[shouldSyncCheckboxBeDisabled_(
102 syncPrefs.syncAllDataTypes, syncPrefs.themesEnforced)]]">
103 $i18n{themesAndWallpapersCheckboxLabel}
104 </paper-checkbox>
105 <paper-checkbox checked="{{syncPrefs.tabsSynced}}"
106 on-change="onSingleSyncDataTypeChanged_" class="list-item"
107 hidden="[[!syncPrefs.tabsRegistered]]"
108 disabled="[[shouldSyncCheckboxBeDisabled_(
109 syncPrefs.syncAllDataTypes, syncPrefs.tabsEnforced)]]">
110 $i18n{openTabsCheckboxLabel}
111 </paper-checkbox>
112
113 <!-- The Payments integration checkbox is a special case in many ways.
114 It's visible only if autofill is registered. It's disabled and
115 unchecked if autofill is unchecked.-->
116 <paper-checkbox checked="{{syncPrefs.paymentsIntegrationEnabled}}"
117 on-change="onSingleSyncDataTypeChanged_" class="list-item"
118 hidden="[[!syncPrefs.autofillRegistered]]"
119 disabled="[[shouldPaymentsCheckboxBeDisabled_(
120 syncPrefs.syncAllDataTypes, syncPrefs.autofillSynced)]]">
121 $i18n{enablePaymentsIntegrationCheckboxLabel}
122 <a href="$i18nRaw{autofillHelpURL}" target="_blank">
123 $i18n{learnMore}
124 </a>
125 </paper-checkbox>
33 </div> 126 </div>
34 <div id="[[pages.CONFIGURE]]">
35 <div class="settings-box first">
36 <paper-checkbox id="syncAllDataTypesCheckbox"
37 checked="{{syncPrefs.syncAllDataTypes}}"
38 on-change="onSyncAllDataTypesChanged_">
39 $i18n{syncEverythingCheckboxLabel}
40 </paper-checkbox>
41 </div>
42 127
128 <div class="settings-box two-line single-column" actionable
129 on-tap="onManageSyncedDataTap_">
130 <div>$i18n{manageSyncedDataTitle}</div>
131 <div class="secondary">$i18n{manageSyncedDataDescription}</div>
132 </div>
133
134 <div class="settings-box two-line single-column">
135 <div>$i18n{encryptionOptionsTitle}</div>
136 <div class="secondary">$i18n{syncDataEncryptedText}</div>
137 </div>
138
139 <div id="encryptionRadioGroupContainer" class="list-frame"
140 hidden="[[syncPrefs.passphraseRequired]]">
141 <paper-radio-group
142 selected="[[selectedEncryptionRadio_(
143 syncPrefs.passphraseTypeIsCustom)]]"
144 on-paper-radio-group-changed="onEncryptionRadioSelectionChanged_">
145 <paper-radio-button name="encrypt-with-google"
146 class="list-item" disabled="[[syncPrefs.encryptAllData]]">
147 $i18n{encryptWithGoogleCredentialsLabel}
148 </paper-radio-button>
149 <paper-radio-button name="encrypt-with-passphrase"
150 class="list-item" disabled="[[syncPrefs.encryptAllData]]">
151 <span>
152 [[encryptWithPassphraseBody_(syncPrefs.fullEncryptionBody)]]
153 </span>
154 </paper-radio-button>
155 </paper-radio-group>
156 </div>
157
158 <template is="dom-if" if="[[creatingNewPassphrase_]]">
43 <div class="list-frame"> 159 <div class="list-frame">
44 <paper-checkbox checked="{{syncPrefs.appsSynced}}" 160 <div id="create-password-box">
45 on-change="onSingleSyncDataTypeChanged_" class="list-item" 161 <div>$i18n{passphraseExplanationText}</div>
46 hidden="[[!syncPrefs.appsRegistered]]" 162 <paper-input id="passphraseInput" type="password"
47 disabled="[[shouldSyncCheckboxBeDisabled_(
48 syncPrefs.syncAllDataTypes, syncPrefs.appsEnforced)]]">
49 $i18n{appCheckboxLabel}
50 </paper-checkbox>
51
52 <!-- Autofill has a special on-change handler to deal with
53 Payments integriation. -->
54 <paper-checkbox checked="{{syncPrefs.autofillSynced}}"
55 on-change="onAutofillDataTypeChanged_" class="list-item"
56 hidden="[[!syncPrefs.autofillRegistered]]"
57 disabled="[[shouldSyncCheckboxBeDisabled_(
58 syncPrefs.syncAllDataTypes, syncPrefs.autofillEnforced)]]">
59 $i18n{autofillCheckboxLabel}
60 </paper-checkbox>
61
62 <paper-checkbox checked="{{syncPrefs.bookmarksSynced}}"
63 on-change="onSingleSyncDataTypeChanged_" class="list-item"
64 hidden="[[!syncPrefs.bookmarksRegistered]]"
65 disabled="[[shouldSyncCheckboxBeDisabled_(
66 syncPrefs.syncAllDataTypes, syncPrefs.bookmarksEnforced)]]">
67 $i18n{bookmarksCheckboxLabel}
68 </paper-checkbox>
69 <paper-checkbox checked="{{syncPrefs.extensionsSynced}}"
70 on-change="onSingleSyncDataTypeChanged_" class="list-item"
71 hidden="[[!syncPrefs.extensionsRegistered]]"
72 disabled="[[shouldSyncCheckboxBeDisabled_(
73 syncPrefs.syncAllDataTypes, syncPrefs.extensionsEnforced)]]">
74 $i18n{extensionsCheckboxLabel}
75 </paper-checkbox>
76 <paper-checkbox checked="{{syncPrefs.typedUrlsSynced}}"
77 on-change="onSingleSyncDataTypeChanged_" class="list-item"
78 hidden="[[!syncPrefs.typedUrlsRegistered]]"
79 disabled="[[shouldSyncCheckboxBeDisabled_(
80 syncPrefs.syncAllDataTypes, syncPrefs.typedUrlsEnforced)]]">
81 $i18n{historyCheckboxLabel}
82 </paper-checkbox>
83 <paper-checkbox checked="{{syncPrefs.passwordsSynced}}"
84 on-change="onSingleSyncDataTypeChanged_" class="list-item"
85 hidden="[[!syncPrefs.passwordsRegistered]]"
86 disabled="[[shouldSyncCheckboxBeDisabled_(
87 syncPrefs.syncAllDataTypes, syncPrefs.passwordsEnforced)]]">
88 $i18n{passwordsCheckboxLabel}
89 </paper-checkbox>
90 <paper-checkbox checked="{{syncPrefs.preferencesSynced}}"
91 on-change="onSingleSyncDataTypeChanged_" class="list-item"
92 hidden="[[!syncPrefs.preferencesRegistered]]"
93 disabled="[[shouldSyncCheckboxBeDisabled_(
94 syncPrefs.syncAllDataTypes, syncPrefs.preferencesEnforced)]]">
95 $i18n{settingsCheckboxLabel}
96 </paper-checkbox>
97 <paper-checkbox checked="{{syncPrefs.themesSynced}}"
98 on-change="onSingleSyncDataTypeChanged_" class="list-item"
99 hidden="[[!syncPrefs.themesRegistered]]"
100 disabled="[[shouldSyncCheckboxBeDisabled_(
101 syncPrefs.syncAllDataTypes, syncPrefs.themesEnforced)]]">
102 $i18n{themesAndWallpapersCheckboxLabel}
103 </paper-checkbox>
104 <paper-checkbox checked="{{syncPrefs.tabsSynced}}"
105 on-change="onSingleSyncDataTypeChanged_" class="list-item"
106 hidden="[[!syncPrefs.tabsRegistered]]"
107 disabled="[[shouldSyncCheckboxBeDisabled_(
108 syncPrefs.syncAllDataTypes, syncPrefs.tabsEnforced)]]">
109 $i18n{openTabsCheckboxLabel}
110 </paper-checkbox>
111
112 <!-- The Payments integration checkbox is a special case in many ways.
113 It's visible only if autofill is registered. It's disabled and
114 unchecked if autofill is unchecked.-->
115 <paper-checkbox checked="{{syncPrefs.paymentsIntegrationEnabled}}"
116 on-change="onSingleSyncDataTypeChanged_" class="list-item"
117 hidden="[[!syncPrefs.autofillRegistered]]"
118 disabled="[[shouldPaymentsCheckboxBeDisabled_(
119 syncPrefs.syncAllDataTypes, syncPrefs.autofillSynced)]]">
120 $i18n{enablePaymentsIntegrationCheckboxLabel}
121 <a href="$i18nRaw{autofillHelpURL}" target="_blank">
122 $i18n{learnMore}
123 </a>
124 </paper-checkbox>
125 </div>
126
127 <div class="settings-box two-line single-column" actionable
128 on-tap="onManageSyncedDataTap_">
129 <div>$i18n{manageSyncedDataTitle}</div>
130 <div class="secondary">$i18n{manageSyncedDataDescription}</div>
131 </div>
132
133 <div class="settings-box two-line single-column">
134 <div>$i18n{encryptionOptionsTitle}</div>
135 <div class="secondary">$i18n{syncDataEncryptedText}</div>
136 </div>
137
138 <div id="encryptionRadioGroupContainer" class="list-frame"
139 hidden="[[syncPrefs.passphraseRequired]]">
140 <paper-radio-group
141 selected="[[selectedEncryptionRadio_(
142 syncPrefs.passphraseTypeIsCustom)]]"
143 on-paper-radio-group-changed="onEncryptionRadioSelectionChanged_">
144 <paper-radio-button name="encrypt-with-google"
145 class="list-item" disabled="[[syncPrefs.encryptAllData]]">
146 $i18n{encryptWithGoogleCredentialsLabel}
147 </paper-radio-button>
148 <paper-radio-button name="encrypt-with-passphrase"
149 class="list-item" disabled="[[syncPrefs.encryptAllData]]">
150 <span>
151 [[encryptWithPassphraseBody_(syncPrefs.fullEncryptionBody)]]
152 </span>
153 </paper-radio-button>
154 </paper-radio-group>
155 </div>
156
157 <template is="dom-if" if="[[creatingNewPassphrase_]]">
158 <div class="list-frame">
159 <div id="create-password-box">
160 <div>$i18n{passphraseExplanationText}</div>
161 <paper-input id="passphraseInput" type="password"
162 placeholder="$i18n{passphrasePlaceholder}"
163 error-message="$i18n{emptyPassphraseError}">
164 </paper-input>
165 <paper-input id="passphraseConfirmationInput" type="password"
166 placeholder="$i18n{passphraseConfirmationPlaceholder}"
167 error-message="$i18n{mismatchedPassphraseError}">
168 </paper-input>
169 <paper-button id="saveNewPassphrase"
170 on-tap="onSaveNewPassphraseTap_" class="action-button">
171 $i18n{save}
172 </paper-button>
173 </div>
174 </div>
175 </template>
176
177 <template is="dom-if" if="[[syncPrefs.passphraseRequired]]">
178 <div class="list-frame">
179 <div id="askCustomPassphraseMessage"
180 hidden$="[[!syncPrefs.passphraseTypeIsCustom]]">
181 [[syncPrefs.enterPassphraseBody]]
182 </div>
183 <div id="askOldGooglePassphraseMessage"
184 hidden$="[[syncPrefs.passphraseTypeIsCustom]]">
185 [[syncPrefs.enterGooglePassphraseBody]]
186 </div>
187 <paper-input id="existingPassphraseInput" type="password"
188 placeholder="$i18n{passphrasePlaceholder}" 163 placeholder="$i18n{passphrasePlaceholder}"
189 error-message="$i18n{incorrectPassphraseError}"> 164 error-message="$i18n{emptyPassphraseError}">
190 </paper-input> 165 </paper-input>
191 <paper-button id="submitExistingPassphrase" 166 <paper-input id="passphraseConfirmationInput" type="password"
192 on-tap="onSubmitExistingPassphraseTap_" class="action-button"> 167 placeholder="$i18n{passphraseConfirmationPlaceholder}"
193 $i18n{submitPassphraseButton} 168 error-message="$i18n{mismatchedPassphraseError}">
169 </paper-input>
170 <paper-button id="saveNewPassphrase"
171 on-tap="onSaveNewPassphraseTap_" class="action-button">
172 $i18n{save}
194 </paper-button> 173 </paper-button>
195 </div> 174 </div>
196 </template> 175 </div>
197 </div> 176 </template>
198 </iron-pages> 177
178 <template is="dom-if" if="[[syncPrefs.passphraseRequired]]">
179 <div class="list-frame">
180 <div id="askCustomPassphraseMessage"
181 hidden$="[[!syncPrefs.passphraseTypeIsCustom]]">
182 [[syncPrefs.enterPassphraseBody]]
183 </div>
184 <div id="askOldGooglePassphraseMessage"
185 hidden$="[[syncPrefs.passphraseTypeIsCustom]]">
186 [[syncPrefs.enterGooglePassphraseBody]]
187 </div>
188 <paper-input id="existingPassphraseInput" type="password"
189 placeholder="$i18n{passphrasePlaceholder}"
190 error-message="$i18n{incorrectPassphraseError}">
191 </paper-input>
192 <paper-button id="submitExistingPassphrase"
193 on-tap="onSubmitExistingPassphraseTap_" class="action-button">
194 $i18n{submitPassphraseButton}
195 </paper-button>
196 </div>
197 </template>
198 </div>
199 </template> 199 </template>
200 <script src="sync_page.js"></script> 200 <script src="sync_page.js"></script>
201 </dom-module> 201 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/sync_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698