Chromium Code Reviews| Index: chrome/browser/resources/settings/people_page/import_data_dialog.html |
| diff --git a/chrome/browser/resources/settings/people_page/import_data_dialog.html b/chrome/browser/resources/settings/people_page/import_data_dialog.html |
| index 57a58568b7e90862a6bd5d195767edea8cd17e34..3889c8c69478bfc81a367b3784b47ea8e034afbc 100644 |
| --- a/chrome/browser/resources/settings/people_page/import_data_dialog.html |
| +++ b/chrome/browser/resources/settings/people_page/import_data_dialog.html |
| @@ -2,70 +2,123 @@ |
| <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| <link rel="import" href="chrome://resources/html/polymer.html"> |
| <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> |
| <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner.html"> |
| <link rel="import" href="/controls/settings_checkbox.html"> |
| +<link rel="import" href="/controls/settings_toggle_button.html"> |
| +<link rel="import" href="/icons.html"> |
| <link rel="import" href="/md_select_css.html"> |
| <link rel="import" href="/people_page/import_data_browser_proxy.html"> |
| <dom-module id="settings-import-data-dialog"> |
| <template> |
| <style include="settings-shared md-select"> |
| - #description { |
| + .description { |
| align-items: center; |
| display: flex; |
| min-height: var(--settings-row-min-height); |
| } |
| + |
| + paper-spinner { |
| + margin: 0 8px; |
| + } |
| + |
| + .icon-container { |
|
tommycli
2016/11/16 17:23:52
nit: Can we remove the need for this by giving the
dpapad
2016/11/16 21:33:02
Done.
|
| + text-align: center; |
| + } |
| + |
| + iron-icon { |
|
tommycli
2016/11/16 17:23:53
Although there is only one iron-icon here, it may
dpapad
2016/11/16 21:33:02
Done.
|
| + fill: var(--paper-blue-600); |
| + height: 80px; |
| + width: 80px; |
| + } |
| </style> |
| <dialog is="cr-dialog" id="dialog"> |
| <div class="title">$i18n{importTitle}</div> |
| <div class="body"> |
| - <span class="md-select-wrapper"> |
| - <select id="browserSelect" class="md-select" on-change="onChange_"> |
| - <template is="dom-repeat" items="[[browserProfiles_]]"> |
| - <option value="[[item.index]]">[[item.name]]</option> |
| - </template> |
| - </select> |
| - <span class="md-select-underline"></span> |
| - </span> |
| - <div id="description">$i18n{importDescription}</div> |
| - <div> |
| - <settings-checkbox |
| - hidden="[[!selected_.history]]" |
| - pref="{{prefs.import_history}}" |
| - label="$i18n{importHistory}"> |
| - </settings-checkbox> |
| - <settings-checkbox |
| - hidden="[[!selected_.favorites]]" |
| - pref="{{prefs.import_bookmarks}}" |
| - label="$i18n{importFavorites}"> |
| - </settings-checkbox> |
| - <settings-checkbox |
| - hidden="[[!selected_.passwords]]" |
| - pref="{{prefs.import_saved_passwords}}" |
| - label="$i18n{importPasswords}"> |
| - </settings-checkbox> |
| - <settings-checkbox |
| - hidden="[[!selected_.search]]" |
| - pref="{{prefs.import_search_engine}}" |
| - label="$i18n{importSearch}"> |
| - </settings-checkbox> |
| - <settings-checkbox |
| - hidden="[[!selected_.autofillFormData]]" |
| - pref="{{prefs.import_autofill_form_data}}" |
| - label="$i18n{importAutofillFormData}"> |
| - </settings-checkbox> |
| + <div hidden$="[[!hasImportStatus_( |
| + importStatusEnum_.SUCCEEDED, importStatus_)]]"> |
| + <div class="icon-container"> |
| + <iron-icon icon="settings:check-circle"></iron-icon> |
| + </div> |
| + <div hidden$="[[!prefs.import_bookmarks.value]]"> |
| + <div class="description">$i18n{importReady}</div> |
| + <settings-toggle-button class="start" |
| + label="$i18n{showBookmarksBar}" |
| + pref="{{prefs.bookmark_bar.show_on_all_tabs}}"> |
| + </settings-toggle-button> |
| + </div> |
| + </div> |
| + |
| + <div hidden$="[[hasImportStatus_( |
| + importStatusEnum_.SUCCEEDED, importStatus_)]]"> |
| + <span class="md-select-wrapper"> |
| + <select id="browserSelect" class="md-select" on-change="onChange_"> |
| + <template is="dom-repeat" items="[[browserProfiles_]]"> |
| + <option value="[[item.index]]">[[item.name]]</option> |
| + </template> |
| + </select> |
| + <span class="md-select-underline"></span> |
| + </span> |
| + <div class="description">$i18n{importDescription}</div> |
| + <div on-iron-change="onCheckboxChange_"> |
| + <settings-checkbox |
| + hidden="[[!selected_.history]]" |
| + pref="{{prefs.import_history}}" |
| + label="$i18n{importHistory}"> |
| + </settings-checkbox> |
| + <settings-checkbox |
| + hidden="[[!selected_.favorites]]" |
| + pref="{{prefs.import_bookmarks}}" |
| + label="$i18n{importFavorites}"> |
| + </settings-checkbox> |
| + <settings-checkbox |
| + hidden="[[!selected_.passwords]]" |
| + pref="{{prefs.import_saved_passwords}}" |
| + label="$i18n{importPasswords}"> |
| + </settings-checkbox> |
| + <settings-checkbox |
| + hidden="[[!selected_.search]]" |
| + pref="{{prefs.import_search_engine}}" |
| + label="$i18n{importSearch}"> |
| + </settings-checkbox> |
| + <settings-checkbox |
| + hidden="[[!selected_.autofillFormData]]" |
| + pref="{{prefs.import_autofill_form_data}}" |
| + label="$i18n{importAutofillFormData}"> |
| + </settings-checkbox> |
| + </div> |
|
tommycli
2016/11/16 17:23:52
It looks like this whole div block is basically un
dpapad
2016/11/16 21:33:01
It was just tabbed over, but I ended up undoing th
|
| </div> |
| </div> |
| <div class="button-container"> |
| - <div class="action-buttons"> |
| - <paper-button class="cancel-button" id="cancel" on-tap="onCancelTap_"> |
| - $i18n{cancel} |
| - </paper-button> |
| - <paper-button id="actionButton" class="action-button" |
| - on-tap="onActionButtonTap_"> |
| - [[getActionButtonText_(selected_)]] |
| - </paper-button> |
| - </div> |
| + <paper-spinner |
|
tommycli
2016/11/16 17:23:52
any situation in which it's not-hidden but inactiv
dpapad
2016/11/16 21:33:02
It is subtle. When you change active to false, pap
tommycli
2016/11/16 21:43:40
Acknowledged.
|
| + active="[[hasImportStatus_( |
| + importStatusEnum_.IN_PROGRESS, importStatus_)]]" |
| + hidden="[[hasImportStatus_( |
| + importStatusEnum_.SUCCEEDED, importStatus_)]]"> |
| + </paper-spinner> |
| + <paper-button class="cancel-button" id="cancel" |
| + hidden="[[hasImportStatus_( |
| + importStatusEnum_.SUCCEEDED, importStatus_)]]" |
| + disabled="[[hasImportStatus_( |
| + importStatusEnum_.IN_PROGRESS, importStatus_)]]" |
| + on-tap="closeDialog_"> |
| + $i18n{cancel} |
| + </paper-button> |
| + <paper-button id="actionButton" class="action-button" |
|
tommycli
2016/11/16 17:23:52
nit: Maybe call this confirmButton or importButton
dpapad
2016/11/16 21:33:01
Removed "id" completely, since it is not needed ye
|
| + hidden="[[hasImportStatus_( |
| + importStatusEnum_.SUCCEEDED, importStatus_)]]" |
| + disabled="[[disallowAction_( |
| + importStatus_, noCategorySelected_)]]" |
| + on-tap="onActionButtonTap_"> |
| + [[getActionButtonText_(selected_)]] |
| + </paper-button> |
| + |
| + <paper-button class="action-button" |
| + hidden$="[[!hasImportStatus_( |
| + importStatusEnum_.SUCCEEDED, importStatus_)]]" |
| + on-tap="closeDialog_">$i18n{done}</paper-button> |
| </div> |
| </dialog> |
| </template> |