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

Side by Side Diff: chrome/browser/resources/chromeos/login/controller-pairing-screen.html

Issue 1179323005: Polymer upgraded to 1.0 in login flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@polymer_pre_migration
Patch Set: Comments addressed. Created 5 years, 6 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
OLDNEW
1 <link rel="import" href="chrome://resources/polymer/core-animated-pages/core-ani mated-pages.html"> 1 <!-- Copyright 2015 The Chromium Authors. All rights reserved.
2 <link rel="import" href="chrome://resources/polymer/core-iconset-svg/core-iconse t-svg.html"> 2 Use of this source code is governed by a BSD-style license that can be
3 <link rel="import" href="chrome://resources/polymer/core-item/core-item.html"> 3 found in the LICENSE file. -->
4 <link rel="import" href="chrome://resources/polymer/core-selector/core-selector. html"> 4
5 <link rel="import" href="chrome://resources/polymer/paper-button/paper-button.ht ml"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html">
6 <link rel="import" href="chrome://resources/polymer/paper-progress/paper-progres s.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l">
7 <link rel="import" href="chrome://resources/polymer/paper-shadow/paper-shadow.ht ml"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-iconset-svg/iron-i conset-svg.html">
8 <link rel="import" href="chrome://resources/polymer/polymer/polymer.html"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele ctor.html">
9 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio ns/fade-in-animation.html">
10 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio ns/fade-out-animation.html">
11 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio ns/hero-animation.html">
12 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani mated-pages.html">
13 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-sha red-element-animatable-behavior.html">
14 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
15 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-icon-i tem.html">
16 <link rel="import" href="chrome://resources/polymer/v1_0/paper-material/paper-ma terial.html">
17 <link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-pr ogress.html">
18 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html ">
19 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
9 20
10 <!-- 21 <!--
11 List of devices. 22 List of devices.
12 Published properties: 23 Published properties:
13 * devices - array of strings, the model of the list. 24 * devices - array of strings, the model of the list.
14 * selected - a name of the selected device ('null' if no devices are 25 * selected - a name of the selected device ('null' if no devices are
15 selected). 26 selected).
16 * connecting - a binary attribute. If set, the list does not respond to the 27 * connecting - a binary attribute. If set, the list does not respond to the
17 user actions and a spinner is shown near selected device. 28 user actions and a spinner is shown near selected device.
18 --> 29 -->
19 <polymer-element name="pairing-device-list" 30 <dom-module name="pairing-device-list">
20 attributes="devices selected connecting"> 31 <link rel="stylesheet" href="pairing_device_list.css">
32
33 <iron-iconset-svg name="pairing-device-list-icons">
34 <svg><defs><g id="circle">
35 <circle cx="12" cy="12" r="12"></circle>
36 </g></defs></svg>
37 </iron-iconset-svg>
38
21 <template> 39 <template>
22 <link rel="stylesheet" href="pairing_device_list.css"> 40 <iron-selector selected="{{selected}}" attr-for-selected="name">
23 41 <template is="dom-repeat" items="[[devices]]">
24 <core-iconset-svg id="icon" iconSize="24"> 42 <paper-icon-item name$="[[item]]" class="relative">
25 <svg><defs><g id="circle"> 43 <iron-icon icon="pairing-device-list-icons:circle" item-icon
26 <circle cx="12" cy="12" r="12"></circle> 44 style$="[[getStyleForDeviceIcon_(item)]]">
27 </g></defs></svg> 45 </iron-icon>
28 </core-iconset-svg> 46 <div><span>[[item]]</span></div>
29 47 <div class="flex horizontal end-justified layout center">
30 <core-selector selected="{{selected}}">
31 <template repeat="{{device in devices}}">
32 <!-- TODO(dzhioev): replace 'core-item' with 'paper-item'.
33 http://crbug.com/423368 -->
34 <core-item name="{{device}}" relative>
35 <core-icon icon="icon:circle"
36 style="color: {{device | colorByName}}"></core-icon>
37 <div>{{device}}</div>
38 <div flex horizontal end-justified layout center>
39 <div class="throbber"></div> 48 <div class="throbber"></div>
40 </div> 49 </div>
41 </core-item> 50 </paper-icon-item>
42 </template> 51 </template>
43 </core-selector> 52 </iron-selector>
44 </template> 53 </template>
45 </polymer-element> 54 </dom-module>
46 55
47 <!-- 56 <!--
48 Single page of the controller's out-of-box flow. 57 Single page of the controller's out-of-box flow.
49 The page consists of the top part and the bottom part. 58 The page consists of the top part and the bottom part.
50 The top part contains a title of the page. Direct successors of the 59 The top part contains a title of the page. Direct successors of the
51 <controller-pairing-page> having 'title' class will be inserted there. 60 <controller-pairing-page> having 'title' class will be inserted there.
52 The bottom part contains controls that are aligned right (all the successors 61 The bottom part contains controls that are aligned right (all the successors
53 that are <paper-button>s) and a content of the page (all the other successors). 62 that are <paper-button>s) and a content of the page (all the other successors).
54 Special case is a help button (<paper-button> with 'help' class set) which 63 Special case is a help button (<paper-button> with 'help' class set) which
55 is aligned left. 64 is aligned left.
56 There are several classes that can be used to change the page appearance: 65 There are several classes that can be used to change the page appearance:
57 * split - if this class is set, top and bottom parts will have different 66 * split - if this class is set, top and bottom parts will have different
58 colors. 67 colors.
59 * big-font - if this class is set, slightly bigger font is used on page. 68 * big-font - if this class is set, slightly bigger font is used on page.
60 * progress - if this class is set and 'split' is not, progress bar is shown 69 * progress - if this class is set and 'split' is not, progress bar is shown
61 instead of top and bottom parts separator. 70 instead of top and bottom parts separator.
62 71
63 Also height of the top part can be specified in CSS as follows: 72 Also height of the top part can be specified in CSS as follows:
64 73
65 controller-pairing-page::shadow #top { 74 controller-pairing-page::shadow #top {
66 height: 100px; 75 height: 100px;
67 } 76 }
68 --> 77 -->
69 <polymer-element name="controller-pairing-page" noscript> 78 <dom-module name="controller-pairing-page">
79 <link rel="stylesheet" href="controller_pairing_page.css">
80
70 <template> 81 <template>
71 <link rel="stylesheet" href="controller_pairing_page.css"> 82 <div class="vertical layout fit">
72 83 <div id="top" class="relative vertical end-justified layout">
73 <div vertical layout fit> 84 <div id="title">
74 <div id="top" hero hero-id="top" relative vertical end-justified layout> 85 <content select=".title"></content>
75 <content select=".title"></content> 86 </div>
76 <div id="separator"> 87 <div id="separator">
77 <indeterminate-progress fill runnerColor="white" 88 <paper-progress indeterminate></paper-progress>
78 backgroundColor="#87ceac" runnerPortion="40">
79 </indeterminate-progress>
80 </div> 89 </div>
81 </div> 90 </div>
82 <div id="bottom" hero hero-id="bottom" flex vertical layout> 91 <div id="bottom" class="flex vertical layout">
83 <div flex vertical layout> 92 <div class="flex vertical layout">
84 <content select=":not(paper-button)"></content> 93 <content select=":not(paper-button)"></content>
85 </div> 94 </div>
86 <div id="controls" horizontal layout center> 95 <div id="controls" class="horizontal layout center">
87 <div flex> 96 <div class="flex">
88 <content select="paper-button.help-button"></content> 97 <content select="paper-button.help-button"></content>
89 </div> 98 </div>
90 <content select="paper-button"></content> 99 <content select="paper-button"></content>
91 </div> 100 </div>
92 </div> 101 </div>
93 </div> 102 </div>
94 </template> 103 </template>
95 </polymer-element> 104 </dom-module>
96 105
97 <polymer-element name="controller-pairing-screen" extends="oobe-screen"> 106 <dom-module name="controller-pairing-screen">
107 <link rel="stylesheet" href="oobe_screen_controller_pairing.css">
108
98 <template> 109 <template>
99 <link rel="stylesheet" href="oobe_screen_controller_pairing.css"> 110 <paper-material class="fit">
111 <neon-animated-pages id="pages" selected="{{C.page}}"
112 attr-for-selected="name" class="fit">
113 <controller-pairing-page name="devices-discovery" class="big-font">
114 <div class="title"
115 i18n-content="login_ControllerPairingScreen_welcomeTitle">
michaelpg 2015/06/23 21:46:39 This will trigger presubmit warnings in future pat
116 </div>
117 <div i18n-content="login_ControllerPairingScreen_searching"></div>
118 <paper-button class="help-button" on-tap="helpButtonClicked_"
119 i18n-content="login_ControllerPairingScreen_helpBtn">
120 </paper-button>
121 </controller-pairing-page>
100 122
101 <template id="help-button"> 123 <controller-pairing-page name="device-select" class="split">
102 <paper-button class="help-button" on-tap="{{helpButtonClicked}}"> 124 <div class="title"
103 {{'helpBtn' | i18n}} 125 i18n-content="login_ControllerPairingScreen_selectTitle">
104 </paper-button> 126 </div>
105 </template> 127 <pairing-device-list devices="[[C.devices]]"
128 selected="{{selectedDevice}}">
129 </pairing-device-list>
130 <paper-button class="help-button" on-tap="helpButtonClicked_"
131 i18n-content="login_ControllerPairingScreen_helpBtn">
132 </paper-button>
133 <paper-button on-tap="userActed" action="chooseDevice"
134 disabled$="[[C.controlsDisabled]]"
135 i18n-content="login_ControllerPairingScreen_connectBtn">
136 </paper-button>
137 </controller-pairing-page>
106 138
107 <template id="progress"> 139 <controller-pairing-page name="device-not-found">
108 <indeterminate-progress runnerColor="#0f9d58" backgroundColor="#87ceac" 140 <div class="title"
109 runnerPortion="23"></indeterminate-progress> 141 i18n-content="login_ControllerPairingScreen_troubleConnectingTitle ">
110 </template> 142 </div>
143 <div i18n-content="login_ControllerPairingScreen_connectingAdvice">
144 </div>
145 <paper-button on-tap="userActed" action="repeatDiscovery"
146 i18n-content="login_ControllerPairingScreen_adviceGotItBtn">
147 </paper-button>
148 </controller-pairing-page>
111 149
112 <paper-shadow z="1" fit> 150 <controller-pairing-page name="establishing-connection" class="split">
113 <core-animated-pages transitions="cross-fade-all hero-transition" 151 <div class="title"
114 selected="{{C.page}}" fit> 152 i18n-content="login_ControllerPairingScreen_selectTitle">
115 <controller-pairing-page name="devices-discovery" class="big-font"> 153 </div>
116 <div class="title">{{'welcomeTitle' | i18n}}</div> 154 <pairing-device-list devices="[[C.devices]]"
117 <div>{{'searching' | i18n}}</div> 155 selected="{{selectedDevice}}" connecting>
118 <template bind ref="help-button"></template> 156 </pairing-device-list>
119 </controller-pairing-page> 157 <paper-button class="help-button" on-tap="helpButtonClicked_"
158 i18n-content="login_ControllerPairingScreen_helpBtn">
159 </paper-button>
160 <paper-button disabled
161 i18n-content="login_ControllerPairingScreen_connecting">
162 </paper-button>
163 </controller-pairing-page>
120 164
121 <controller-pairing-page name="device-select" class="split"> 165 <controller-pairing-page name="establishing-connection-error">
122 <div class="title">{{'selectTitle' | i18n}}</div> 166 <!-- TODO(dzhioev): Strings TBD. http://crbug.com/423740 -->
123 <pairing-device-list devices="{{C.devices}}" 167 <div class="title">
124 selected="{{selectedDevice}}"></pairing-device-list> 168 Unable to connect to <span>[[selectedDevice]]<span>
125 <template bind ref="help-button"></template> 169 </div>
126 <paper-button on-tap="{{userActed}}" action="chooseDevice" 170 <paper-button on-tap="userActed" action="repeatDiscovery">
127 disabled?="{{C.controlsDisabled}}"> 171 Repeat discovery
128 {{'connectBtn' | i18n}} 172 </paper-button>
129 </paper-button> 173 </controller-pairing-page>
130 </controller-pairing-page>
131 174
132 <controller-pairing-page name="device-not-found"> 175 <controller-pairing-page name="code-confirmation" class="split">
133 <div class="title">{{'troubleConnectingTitle' | i18n}}</div> 176 <div class="title"
134 <div>{{'connectingAdvice' | i18n}}</div> 177 i18n-content="login_ControllerPairingScreen_confirmationTitle">
135 <paper-button on-tap="{{userActed}}" action="repeatDiscovery"> 178 </div>
136 {{'adviceGotItBtn' | i18n}} 179 <div
137 </paper-button> 180 i18n-content="login_ControllerPairingScreen_confirmationQuestion">
138 </controller-pairing-page> 181 </div>
182 <div id="code"><span>[[C.code]]</span></div>
183 <paper-button on-tap="userActed" action="rejectCode"
184 disabled$="[[C.controlsDisabled]"
185 i18n-content="login_ControllerPairingScreen_rejectCodeBtn">
186 </paper-button>
187 <paper-button on-tap="userActed" action="acceptCode"
188 disabled$="[[C.controlsDisabled]]"
189 i18n-content="login_ControllerPairingScreen_acceptCodeBtn">
190 </paper-button>
191 </controller-pairing-page>
139 192
140 <controller-pairing-page name="establishing-connection" class="split"> 193 <controller-pairing-page name="host-update" class="split">
141 <div class="title">{{'selectTitle' | i18n}}</div> 194 <div class="title"
142 <pairing-device-list devices="{{C.devices}}" 195 i18n-content="login_ControllerPairingScreen_updateTitle">
143 selected="{{selectedDevice}}" connecting></pairing-device-list> 196 </div>
144 <template bind ref="help-button"></template> 197 <div i18n-content="login_ControllerPairingScreen_updateText"></div>
145 <paper-button disabled>{{'connecting' | i18n}}</paper-button> 198 <paper-progress indeterminate></paper-progress>
146 </controller-pairing-page> 199 </controller-pairing-page>
147 200
148 <controller-pairing-page name="establishing-connection-error"> 201 <controller-pairing-page name="host-connection-lost" class="split">
149 <!-- TODO(dzhioev): Strings TBD. http://crbug.com/423740 --> 202 <div class="title"
150 <div class="title">Unable to connect to {{selectedDevice}}</div> 203 i18n-content="login_ControllerPairingScreen_connectionLostTitle">
151 <paper-button on-tap="{{userActed}}" action="repeatDiscovery"> 204 </div>
152 Repeat discovery 205 <div i18n-content="login_ControllerPairingScreen_connectionLostText">
153 </paper-button> 206 </div>
154 </controller-pairing-page> 207 <paper-progress indeterminate></paper-progress>
208 </controller-pairing-page>
155 209
156 <controller-pairing-page name="code-confirmation" class="split"> 210 <controller-pairing-page name="enrollment-introduction" class="split">
157 <div class="title">{{'confirmationTitle' | i18n}}</div> 211 <div class="title"
158 <div>{{'confirmationQuestion' | i18n}}</div> 212 i18n-content="login_ControllerPairingScreen_enrollTitle">
159 <div id="code">{{C.code}}</div> 213 </div>
160 <paper-button on-tap="{{userActed}}" action="rejectCode" 214 <p i18n-content="login_ControllerPairingScreen_enrollText1"></p>
161 disabled?="{{C.controlsDisabled}}"> 215 <p>
162 {{'rejectCodeBtn' | i18n}} 216 <strong i18n-content="login_ControllerPairingScreen_enrollText2">
163 </paper-button> 217 </strong>
164 <paper-button on-tap="{{userActed}}" action="acceptCode" 218 </p>
165 disabled?="{{C.controlsDisabled}}"> 219 <paper-button on-tap="userActed" action="proceedToAuthentication"
166 {{'acceptCodeBtn' | i18n}} 220 disabled$="[[C.controlsDisabled]]"
167 </paper-button> 221 i18n-content="login_ControllerPairingScreen_continueBtn">
168 </controller-pairing-page> 222 </paper-button>
223 </controller-pairing-page>
169 224
170 <controller-pairing-page name="host-update" class="split"> 225 <controller-pairing-page name="authentication" class="split">
171 <div class="title">{{'updateTitle' | i18n}}</div> 226 <div class="title"
172 <div>{{'updateText' | i18n}}</div> 227 i18n-content="login_ControllerPairingScreen_enrollTitle">
173 <template bind ref="progress"></template> 228 </div>
174 </controller-pairing-page> 229 <div>Not implemented.</div>
230 </controller-pairing-page>
175 231
176 <controller-pairing-page name="host-connection-lost" class="split"> 232 <controller-pairing-page name="host-enrollment" class="progress">
177 <div class="title">{{'connectionLostTitle' | i18n}}</div> 233 <!-- This title contains <strong> tag inside. -->
178 <div>{{'connectionLostText' | i18n}}</div> 234 <html-echo class="title"
179 <template bind ref="progress"></template> 235 content="[[getHostEnrollmentStepTitle_(C.enrollmentDomain)]]">
180 </controller-pairing-page> 236 </html-echo>
237 </controller-pairing-page>
181 238
182 <controller-pairing-page name="enrollment-introduction" class="split"> 239 <controller-pairing-page name="host-enrollment-error" class="progress">
183 <div class="title">{{'enrollTitle' | i18n}}</div> 240 <div class="title"
184 <p>{{'enrollText1' | i18n}}</p> 241 i18n-content="login_ControllerPairingScreen_enrollmentErrorTitle">
185 <p><strong>{{'enrollText2' | i18n}}</strong></p> 242 </div>
186 <paper-button on-click="{{userActed}}" action="proceedToAuthentication" 243 <div
187 disabled?="{{C.controlsDisabled}}"> 244 i18n-content="login_ControllerPairingScreen_enrollmentErrorHostRes tarts">
188 {{'continueBtn' | i18n}} 245 </div>
189 </paper-button> 246 </controller-pairing-page>
190 </controller-pairing-page>
191 247
192 <controller-pairing-page name="authentication" class="split"> 248 <controller-pairing-page name="pairing-done" class="big-font">
193 <div class="title">{{'enrollTitle' | i18n}}</div> 249 <div class="title"
194 <div>Not implemented.</div> 250 i18n-content="login_ControllerPairingScreen_successTitle">
195 </controller-pairing-page> 251 </div>
252 <div><span>[[getSuccessMessage_(selectedDevice)]]</div>
253 <paper-button on-tap="userActed" action="startSession"
254 disabled$="{{C.controlsDisabled}}"
255 i18n-content="login_ControllerPairingScreen_continueToHangoutsBtn" >
256 </paper-button>
257 </controller-pairing-page>
258 </neon-animated-pages>
259 </paper-material>
260 </template>
261 </dom-module>
196 262
197 <controller-pairing-page name="host-enrollment" class="progress">
198 <!-- 'enrollmentTitle' contains <strong> tag. -->
199 <html-echo class="title"
200 content="{{['enrollmentInProgress', C.enrollmentDomain] | i18n}}">
201 </html-echo>
202 </controller-pairing-page>
203
204 <controller-pairing-page name="host-enrollment-error" class="progress">
205 <div class="title">{{'enrollmentErrorTitle' | i18n}}</div>
206 <div>{{'enrollmentErrorHostRestarts' | i18n}}</div>
207 </controller-pairing-page>
208
209 <controller-pairing-page name="pairing-done" class="big-font">
210 <div class="title">{{'successTitle' | i18n}}</div>
211 <div>{{['successText', selectedDevice] | i18n}}</div>
212 <paper-button on-click="{{userActed}}" action="startSession"
213 disabled?="{{C.controlsDisabled}}">
214 {{'continueToHangoutsBtn' | i18n}}
215 </paper-button>
216 </controller-pairing-page>
217 </core-animated-pages>
218 </paper-shadow>
219 </template>
220 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698