-
Notifications
You must be signed in to change notification settings - Fork 6.6k
/
assistant_voice_match.html
171 lines (160 loc) · 6.64 KB
/
assistant_voice_match.html
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!--
Copyright 2018 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_lottie/cr_lottie.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/ash/common/load_time_data.html">
<link rel="import" href="chrome://resources/ash/common/util.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="../components/behaviors/multi_step_behavior.html">
<link rel="import" href="../components/behaviors/oobe_dialog_host_behavior.html">
<link rel="import" href="../components/behaviors/oobe_i18n_behavior.html">
<link rel="import" href="../components/buttons/oobe_next_button.html">
<link rel="import" href="../components/buttons/oobe_text_button.html">
<link rel="import" href="../components/common_styles/oobe_dialog_host_styles.css.js">
<link rel="import" href="../components/dialogs/oobe_adaptive_dialog.html">
<link rel="import" href="../components/oobe_cr_lottie.html">
<link rel="import" href="./assistant_common_styles.html">
<link rel="import" href="./assistant_icon.html">
<link rel="import" href="./browser_proxy.html">
<link rel="import" href="./voice_match_entry.html">
<dom-module id="assistant-voice-match">
<template>
<style include="oobe-dialog-host-styles assistant-common-styles">
#voice-match-animation {
height: 170px;
}
#ready-img {
height: 95%;
max-height: 95%;
max-width: 95%;
width: 95%;
}
@media screen and (max-height: 736px) {
#voice-match-animation {
height: 150px;
}
}
#loading-animation {
margin: 80px auto;
width: 100px;
}
#loading-spinner {
height: 100px;
width: 100px;
}
</style>
<oobe-adaptive-dialog id="voiceMatchIntroDialog" role="dialog"
aria-label$="[[getDialogTitle_(locale, uiStep, childName_)]]"
hide-shadow for-step="intro">
<iron-icon slot="icon" icon="assistant-32:assistant"
aria-label$="[[i18nDynamic(locale, 'assistantLogo')]]">
</iron-icon>
<h1 slot="title">
[[getDialogTitle_(locale, uiStep, childName_)]]
</h1>
<div slot="subtitle" id="voice-match-animation">
<oobe-cr-lottie id="voice-match-lottie"
animation-url="[[getVoiceMatchAnimationUrl_(isDarkModeActive_,
isTabletMode_)]]">
</oobe-cr-lottie>
</div>
<div slot="content" class="landscape-vertical-centered">
<div inner-h-t-m-l=
"[[getSubtitleMessage_(locale, uiStep, childName_)]]">
</div>
</div>
<div slot="bottom-buttons">
<oobe-text-button id="skip-button" on-click="onSkipTap_"
disabled="[[buttonsDisabled]]"
text-key="assistantOptinNoThanksButton">
</oobe-text-button>
<oobe-text-button id="agree-button" inverse="[[!equalWeightButtons_]]"
on-click="onAgreeTap_" disabled="[[buttonsDisabled]]"
text-key="assistantOptinAgreeButton">
</oobe-text-button>
</div>
</oobe-adaptive-dialog>
<oobe-adaptive-dialog id="voiceMatchRecordingDialog" role="dialog"
aria-label$="[[getDialogTitle_(locale, uiStep, childName_)]]"
hide-shadow for-step="recording, completed">
<iron-icon slot="icon" icon="assistant-32:assistant"
aria-label$="[[i18nDynamic(locale, 'assistantLogo')]]">
</iron-icon>
<h1 slot="title">
[[getDialogTitle_(locale, uiStep, childName_)]]
</h1>
<div slot="subtitle" hidden="[[childName_]]">
[[i18nDynamic(locale, 'assistantVoiceMatchFooter')]]
</div>
<div slot="subtitle" hidden="[[!childName_]]"
inner-h-t-m-l="[[getSubtitleMessage_(locale, uiStep, childName_)]]">
</div>
<div slot="content" class="landscape-header-aligned
portrait-horizontal-centered">
<div id="voice-match-entries">
<voice-match-entry id="voice-entry-0">
<div slot="entry-content">
[[i18nDynamic(locale, 'assistantVoiceMatchInstruction0')]]
</div>
</voice-match-entry>
<voice-match-entry id="voice-entry-1">
<div slot="entry-content">
[[i18nDynamic(locale, 'assistantVoiceMatchInstruction1')]]
</div>
</voice-match-entry>
<voice-match-entry id="voice-entry-2">
<div slot="entry-content">
[[i18nDynamic(locale, 'assistantVoiceMatchInstruction2')]]
</div>
</voice-match-entry>
<voice-match-entry id="voice-entry-3">
<div slot="entry-content">
[[i18nDynamic(locale, 'assistantVoiceMatchInstruction3')]]
</div>
</voice-match-entry>
</div>
<div id="loading-animation" hidden>
<paper-spinner-lite id="loading-spinner" active>
</paper-spinner-lite>
</div>
</div>
<div slot="bottom-buttons">
<oobe-text-button id="later-button" class="focus-on-show"
on-click="onSkipTap_" disabled="[[buttonsDisabled]]"
text-key="assistantOptinSkipButton">
</oobe-text-button>
</div>
</oobe-adaptive-dialog>
<oobe-adaptive-dialog id="voiceMatchAlreadySetupDialog" role="dialog"
aria-label$=
"[[i18nDynamic(locale, 'assistantVoiceMatchAlreadySetupTitle')]]"
hide-shadow for-step="already-setup">
<iron-icon slot="icon" icon="assistant-32:assistant"
aria-label$="[[i18nDynamic(locale, 'assistantLogo')]]">
</iron-icon>
<h1 slot="title">
[[i18nDynamic(locale, 'assistantVoiceMatchAlreadySetupTitle')]]
</h1>
<div slot="subtitle" hidden="[[childName_]]">
[[i18nDynamic(locale, 'assistantVoiceMatchAlreadySetupMessage')]]
</div>
<div slot="subtitle" hidden="[[!childName_]]">
[[i18nDynamic(locale,
'assistantVoiceMatchAlreadySetupMessageForChild', childName_)]]
</div>
<div slot="content" class="flex layout vertical center center-justified">
<iron-media-query query="(prefers-color-scheme: dark)"
query-matches="{{isDarkModeActive_}}">
</iron-media-query>
<cr-lottie id="ready-img" aria-hidden="true"
animation-url="[[getReadyImgUrl_(isDarkModeActive_)]]">
</cr-lottie>
</div>
</oobe-adaptive-dialog>
</template>
<script src="assistant_voice_match.js"></script>
</dom-module>