blob: ae962e2577f4808ea5a8996af1ab84bbdc65ce37 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-progress.html">
<link rel="import" href="../settings_shared_css.html">
<if expr="chromeos">
<link rel="import" href="blocking_request_manager.html">
</if>
<dom-module id="passwords-export-dialog">
<template>
<style include="settings-shared iron-flex">
paper-progress {
--paper-progress-active-color: var(--google-blue-500);
width: 100%;
}
@media (prefers-color-scheme: dark) {
paper-progress {
/* TODO(dbeam): this is the same as downloads (and probably anywhere
* else that uses paper-progress). Should we make something like a
* paper_progress_style_css.html? */
--paper-progress-active-color: var(--google-blue-refresh-300);
}
}
.action-button {
margin-inline-start: 8px;
}
</style>
<template is="dom-if" if="[[showStartDialog_]]" restamp>
<cr-dialog id="dialog_start" close-text="$i18n{close}" show-on-attach>
<div slot="title">$i18n{exportPasswordsTitle}</div>
<div slot="body">
<div class="layout horizontal center">
<div>$i18n{exportPasswordsDescription}</div>
</div>
</div>
<div slot="button-container">
<cr-button class="secondary-button header-aligned-button"
on-click="onCancelButtonTap_" id="cancelButton">
$i18n{cancel}
</cr-button>
<cr-button class="action-button header-aligned-button"
on-click="onExportTap_" id="exportPasswordsButton">
$i18n{exportPasswords}
</cr-button>
</div>
</cr-dialog>
</template>
<template is="dom-if" if="[[showProgressDialog_]]" restamp>
<cr-dialog id="dialog_progress" no-cancel="true" show-on-attach>
<div slot="title">$i18n{exportingPasswordsTitle}</div>
<div slot="body">
<paper-progress indeterminate class="blue"></paper-progress>
</div>
<div slot="button-container">
<cr-button id="cancel_progress_button" class="header-aligned-button"
on-click="onCancelProgressButtonTap_">
$i18n{cancel}
</cr-button>
</div>
</cr-dialog>
</template>
<template is="dom-if" if="[[showErrorDialog_]]" restamp>
<cr-dialog id="dialog_error" close-text="$i18n{close}" show-on-attach>
<div slot="title">[[exportErrorMessage]]</div>
<div slot="body">
$i18n{exportPasswordsFailTips}
<ul>
<li>$i18n{exportPasswordsFailTipsEnoughSpace}</li>
<li>$i18n{exportPasswordsFailTipsAnotherFolder}</li>
</ul>
</div>
<div slot="button-container">
<cr-button class="header-aligned-button" on-click="onCancelButtonTap_"
id="cancelErrorButton">
$i18n{cancel}
</cr-button>
<cr-button class="action-button header-aligned-button"
on-click="onExportTap_" id="tryAgainButton">
$i18n{exportPasswordsTryAgain}
</cr-button>
</div>
</cr-dialog>
</template>
</template>
<script src="passwords_export_dialog.js"></script>
</dom-module>