OLD | NEW |
---|---|
1 <!-- TODO(dzhioev): replace all the strings with i18n-values. --> | 1 <link rel="import" href="chrome://oobe/custom_elements.html"> |
2 <link rel="import" href="polymer/core-animated-pages/core-animated-pages.html"> | |
3 <link rel="import" href="polymer/core-iconset-svg/core-iconset-svg.html"> | |
4 <link rel="import" href="polymer/core-item/core-item.html"> | |
5 <link rel="import" href="polymer/core-selector/core-selector.html"> | |
6 <link rel="import" href="polymer/paper-button/paper-button.html"> | |
7 <link rel="import" href="polymer/paper-progress/paper-progress.html"> | |
8 <link rel="import" href="polymer/paper-shadow/paper-shadow.html"> | |
9 <link rel="import" href="polymer/polymer/polymer.html"> | |
10 | |
11 <!-- | |
12 List of devices. | |
13 Published properties: | |
14 * devices - array of strings, the model of the list. | |
15 * selected - a name of the selected device ('null' if no devices are | |
16 selected). | |
17 * connecting - a binary attribute. If set, the list does not respond to the | |
18 user actions and a spinner is shown near selected device. | |
19 --> | |
20 <polymer-element name="pairing-device-list" | |
21 attributes="devices selected connecting"> | |
22 <template> | |
23 <link rel="stylesheet" href="pairing_device_list.css"> | |
24 | |
25 <core-iconset-svg id="icon" iconSize="24"> | |
26 <svg><defs><g id="circle"> | |
27 <circle cx="12" cy="12" r="12"></circle> | |
28 </g></defs></svg> | |
29 </core-iconset-svg> | |
30 | |
31 <core-selector selected="{{selected}}"> | |
32 <template repeat="{{device in devices}}"> | |
33 <!-- TODO(dzhioev): replace 'core-item' with 'paper-item'. --> | |
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> | |
dzhioev (left Google)
2014/10/10 13:53:01
About these attributes you can read here https://w
| |
39 <div class="throbber"></div> | |
40 </div> | |
41 </core-item> | |
42 </template> | |
43 </core-selector> | |
44 </template> | |
45 </polymer-element> | |
46 | |
47 <!-- | |
48 Single page of the controller's out-of-box flow. | |
49 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 | |
51 <controller-pairing-page> having 'title' class will be inserted there. | |
52 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). | |
54 Special case is a help button (<paper-button> with 'help' class set) which | |
55 is aligned left. | |
56 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 | |
58 colors. | |
59 * big - 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 | |
61 instead of top and bottom parts separator. | |
62 | |
63 Also height of the top part can be specified in CSS as follows: | |
64 | |
65 controller-pairing-page::shadow #top { | |
66 height: 100px; | |
67 } | |
68 --> | |
69 <polymer-element name="controller-pairing-page"> | |
70 <template> | |
71 <link rel="stylesheet" href="controller_pairing_page.css"> | |
72 | |
73 <div vertical layout fit> | |
74 <div id="top" hero hero-id="top" relative vertical end-justified layout> | |
75 <content select=".title"></content> | |
76 <div id="separator"> | |
77 <indeterminate-progress fill runnerColor="white" | |
78 backgroundColor="#87ceAC" runnerPortion="40"> | |
79 </indeterminate-progress> | |
80 </div> | |
81 </div> | |
82 <div id="bottom" hero hero-id="bottom" flex vertical layout> | |
83 <div flex vertical layout> | |
84 <content select=":not(paper-button)"></content> | |
85 </div> | |
86 <div id="controls" horizontal layout center> | |
87 <div flex> | |
88 <content select="paper-button.help-button"></content> | |
89 </div> | |
90 <content select="paper-button"></content> | |
91 </div> | |
92 </div> | |
93 </div> | |
94 </template> | |
95 </polymer-element> | |
96 | |
97 <polymer-element name="controller-pairing-screen" extends="oobe-screen"> | |
98 <template> | |
99 <link rel="stylesheet" href="oobe_screen_controller_pairing.css"> | |
100 | |
101 <template id="help-button"> | |
102 <paper-button class="help-button" on-tap="{{helpButtonClicked}}" | |
103 label="{{'needHelp' | i18n}}"></paper-button> | |
104 </template> | |
105 | |
106 <template id="progress"> | |
107 <indeterminate-progress runnerColor="#0f9d58" backgroundColor="#87ceAC" | |
108 runnerPortion="23"></indeterminate-progress> | |
109 </template> | |
110 | |
111 <paper-shadow z="1"></paper-shadow> | |
112 | |
113 <core-animated-pages transitions="cross-fade-all hero-transition" | |
114 selected="{{C.page}}"> | |
115 <controller-pairing-page name="devices-discovery" class="big"> | |
116 <div class="title">{{'welcome' | i18n}}</div> | |
117 <div>{{'searching' | i18n}}</div> | |
118 <template bind ref="help-button"></template> | |
119 </controller-pairing-page> | |
120 | |
121 <controller-pairing-page name="device-select" class="split"> | |
122 <div class="title">{{'selectTitle' | i18n}}</div> | |
123 <pairing-device-list devices="{{C.devices}}" | |
124 selected="{{selectedDevice}}"></pairing-device-list> | |
125 <template bind ref="help-button"></template> | |
126 <paper-button label="{{'connect' | i18n}}" on-tap="{{userActed}}" | |
127 action="chooseDevice" disabled?="{{C.controlsDisabled}}"> | |
128 </paper-button> | |
129 </controller-pairing-page> | |
130 | |
131 <controller-pairing-page name="device-not-found"> | |
132 <div class="title">{{'troubleConnecting' | i18n}}</div> | |
133 <div>{{'connectingAdvice' | i18n}}</div> | |
134 <paper-button label="{{'adviceGotIt' | i18n}}" on-tap="{{userActed}}" | |
135 action="repeatDiscovery"> | |
136 </paper-button> | |
137 </controller-pairing-page> | |
138 | |
139 <controller-pairing-page name="establishing-connection" class="split"> | |
140 <div class="title">{{'selectTitle' | i18n}}</div> | |
141 <pairing-device-list devices="{{C.devices}}" | |
142 selected="{{selectedDevice}}" connecting></pairing-device-list> | |
143 <template bind ref="help-button"></template> | |
144 <paper-button label="{{'connecting' | i18n}}" disabled></paper-button> | |
145 </controller-pairing-page> | |
146 | |
147 <controller-pairing-page name="establishing-connection-error"> | |
148 <!-- TODO(dzhioev): Strings TBD. --> | |
149 <div class="title">Unable to connect to {{selectedDevice}}</div> | |
150 <paper-button on-tap="{{userActed}}" action="repeatDiscovery" | |
151 label="Repeat discovery"></paper-button> | |
152 </button> | |
153 </controller-pairing-page> | |
154 | |
155 <controller-pairing-page name="code-confirmation" class="split"> | |
156 <div class="title">{{'confirmationTitle' | i18n}}</div> | |
157 <div>{{'confirmationQuestion' | i18n}}</div> | |
158 <div id="code">{{C.code}}</div> | |
159 <paper-button label="{{'rejectCode' | i18n}}" on-tap="{{userActed}}" | |
160 action="rejectCode" disabled?="{{C.controlsDisabled}}"> | |
161 </paper-button> | |
162 <paper-button label="{{'acceptCode' | i18n}}" on-tap="{{userActed}}" | |
163 action="acceptCode" disabled?="{{C.controlsDisabled}}"> | |
164 </paper-button> | |
165 </controller-pairing-page> | |
166 | |
167 <controller-pairing-page name="host-update" class="split"> | |
168 <div class="title">{{'updateTitle' | i18n}}</div> | |
169 <div>{{'updateText' | i18n}}</div> | |
170 <template bind ref="progress"></template> | |
171 </controller-pairing-page> | |
172 | |
173 <controller-pairing-page name="host-connection-lost" class="split"> | |
174 <div class="title">{{'connectionLostTitle' | i18n}}</div> | |
175 <div>{{'connectionLostText' | i18n}}</div> | |
176 <template bind ref="progress"></template> | |
177 </controller-pairing-page> | |
178 | |
179 <controller-pairing-page name="enrollment-introduction" class="split"> | |
180 <div class="title">{{'enrollTitle' | i18n}}</div> | |
181 <p>{{'enrollText1' | i18n}}</p> | |
182 <p><strong>{{'enrollText2' | i18n}}</strong></p> | |
183 <paper-button label="{{'continue' | i18n}}" on-click="{{userActed}}" | |
184 action="proceedToAuthentication" disabled?="{{C.controlsDisabled}}"> | |
185 </paper-button> | |
186 </controller-pairing-page> | |
187 | |
188 <controller-pairing-page name="authentication" class="split"> | |
189 <div class="title">{{'enrollTitle' | i18n}}</div> | |
190 <iframe id="gaiaFrame" frameBorder="0" scrolling="no" class="gaia-frame" | |
191 flex self-center></iframe> | |
192 </controller-pairing-page> | |
193 | |
194 <controller-pairing-page name="host-enrollment" class="progress"> | |
195 <!-- 'enrollmentTitle' contains <strong> tag. --> | |
196 <html-echo class="title" | |
197 content="{{['enrollmentInProgress', C.enrollmentDomain] | i18n}}"> | |
198 </html-echo> | |
199 </controller-pairing-page> | |
200 | |
201 <controller-pairing-page name="host-enrollment-error" class="progress"> | |
202 <div class="title">{{'enrollmentErrorTitle' | i18n}}</div> | |
203 <div>{{'enrollmentErrorHostRestarts' | i18n}}</div> | |
204 </controller-pairing-page> | |
205 | |
206 <controller-pairing-page name="pairing-done" class="big"> | |
207 <div class="title">{{'successTitle' | i18n}}</div> | |
208 <div>{{['successText', selectedDevice] | i18n}}</div> | |
209 <paper-button label="{{'continueToHangouts' | i18n}}" | |
210 on-click="{{userActed}}" action="startSession" | |
211 disabled?="{{C.controlsDisabled}}"> | |
212 </paper-button> | |
213 </controller-pairing-page> | |
214 </core-animated-pages> | |
215 </template> | |
216 </polymer-element> | |
217 | |
2 <div class="step hidden no-logo" id="controller-pairing" hidden> | 218 <div class="step hidden no-logo" id="controller-pairing" hidden> |
3 <div alias="throbber_" class="throbber" hidden></div> | 219 <controller-pairing-screen name="ControllerPairingScreen"> |
4 <div alias="pageNameLabel_" class="page-name"></div> | 220 </controller-pairing-screen> |
5 <div class="page page-devices-discovery"> | |
6 <div>Searching for nearby Chromeboxes...</div> | |
7 </div> | |
8 <div class="page page-device-select"> | |
9 <div>Select a Chromebox to connect to</div> | |
10 <list alias="deviceList_" class="device-list"></list> | |
11 <button action="chooseDevice"> | |
12 Connect | |
13 </button> | |
14 </div> | |
15 <div class="page page-device-not-found"> | |
16 <div>No Chromeboxes were found.</div> | |
17 <button action="repeatDiscovery">Repeat discovery</button> | |
18 </div> | |
19 <div class="page page-establishing-connection"> | |
20 <div>Connecting...</div> | |
21 </div> | |
22 <div class="page page-establishing-connection-error"> | |
23 <div>Can't connect to Chromebox.</div> | |
24 <button action="repeatDiscovery">Repeat discovery</button> | |
25 </div> | |
26 <div class="page page-code-confirmation"> | |
27 <div alias="confirmationCodeLabel_"></div> | |
28 <button action="acceptCode" disabled>Yes</button> | |
29 <button action="rejectCode" disabled>No</button> | |
30 </div> | |
31 <div class="page page-host-update"> | |
32 <div>Updating Chromebox.</div> | |
33 </div> | |
34 <div class="page page-host-connection-lost"> | |
35 <div>Connection lost. Please come closer.</div> | |
36 </div> | |
37 <div class="page page-enrollment-introduction"> | |
38 <div>Press continue to connect to your domain.</div> | |
39 <button action="proceedToAuthentication" disabled>Continue</button> | |
40 </div> | |
41 <div class="page page-authentication"> | |
42 <div>Connect to your domain.</div> | |
43 <iframe alias="gaiaFrame_" frameBorder="0" class="gaia-frame"></iframe> | |
44 </div> | |
45 <div class="page page-host-enrollment"> | |
46 <div> | |
47 Connecting to <strong alias="domainNameLabel_">domain.com</strong>. | |
48 </div> | |
49 </div> | |
50 <div class="page page-host-enrollment-error"> | |
51 <div>Host enrollment failed.</div> | |
52 <button action="repeatDiscovery">Repeat discovery</button> | |
53 </div> | |
54 <div class="page page-pairing-done"> | |
55 <div>Great success!</div> | |
56 <button action="startSession">Continue to Hangouts</button> | |
57 </div> | |
58 </div> | 221 </div> |
222 | |
OLD | NEW |