blob: bc044b56f6459fb4430eb14d61072b54c803abaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<link rel="import" href="chrome://resources/html/polymer.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-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-progress.html">
<link rel="import" href="../settings_shared_css.html">
<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%;
}
:host-context([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">
<paper-button class="secondary-button header-aligned-button"
on-click="onCancelButtonTap_" id="cancelButton">
$i18n{cancel}
</paper-button>
<paper-button class="action-button header-aligned-button"
on-click="onExportTap_" id="exportPasswordsButton">
$i18n{exportPasswords}
</paper-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">
<paper-button id="cancel_progress_button"
class="secondary-button header-aligned-button"
on-click="onCancelProgressButtonTap_">
$i18n{cancel}
</paper-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">
<paper-button class="secondary-button header-aligned-button"
on-click="onCancelButtonTap_" id="cancelErrorButton">
$i18n{cancel}
</paper-button>
<paper-button class="action-button header-aligned-button"
on-click="onExportTap_" id="tryAgainButton">
$i18n{exportPasswordsTryAgain}
</paper-button>
</div>
</cr-dialog>
</template>
</template>
<script src="passwords_export_dialog.js"></script>
</dom-module>
|