OLD | NEW |
1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. |
2 Use of this source code is governed by a BSD-style license that can be | 2 Use of this source code is governed by a BSD-style license that can be |
3 found in the LICENSE file. --> | 3 found in the LICENSE file. --> |
4 | 4 |
5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 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/v1_0/neon-animation/animatio
ns/slide-from-left-animation.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-from-left-animation.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-from-right-animation.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-from-right-animation.html"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-left-animation.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-left-animation.html"> |
9 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-right-animation.html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/animatio
ns/slide-right-animation.html"> |
10 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
matable.html"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
matable.html"> |
11 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
mated-pages.html"> | 11 <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-ani
mated-pages.html"> |
12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial
og.html"> | 12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dial
og.html"> |
13 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 13 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
14 | 14 |
15 <!-- | 15 <!-- |
16 Offline UI for the New Gaia flow. | 16 Offline UI for the New Gaia flow. |
17 Contains two cards with a slide transition between them: | 17 Contains two cards with a slide transition between them: |
18 1. Email input form. | 18 1. Email input form. |
19 2. Password input form. | 19 2. Password input form. |
20 | 20 |
21 Example: | 21 Example: |
22 <offline-gaia></offline-gaia> | 22 <offline-gaia></offline-gaia> |
23 | 23 |
24 Attributes: | 24 Attributes: |
25 'enterpriseInfo' - Information about device management. | 25 'showEnterpriseMessage' - If the "manged by" message should be shown. |
26 'emailDomain' - autocomplete domain for the email input. | 26 'emailDomain' - autocomplete domain for the email input. |
27 | 27 |
28 Events: | 28 Events: |
29 'authCompleted' - fired when user enters login and password. Fires with an | 29 'authCompleted' - fired when user enters login and password. Fires with an |
30 argument |credentials| which contains. | 30 argument |credentials| which contains. |
31 |credentials| = { 'useOffline': true, | 31 |credentials| = { 'useOffline': true, |
32 'email': <email>, | 32 'email': <email>, |
33 'password': <typed password> } | 33 'password': <typed password> } |
34 If user did not type domain |email| will be added by | 34 If user did not type domain |email| will be added by |
35 "@gmail.com" or by 'emailDomain' if it is set. | 35 "@gmail.com" or by 'emailDomain' if it is set. |
36 Methods: | 36 Methods: |
37 'focus' - focuses current screen (email input or password input); | 37 'focus' - focuses current screen (email input or password input); |
38 'setEmail' - accepts an argument |email|. If |email| is empty it sets | 38 'setEmail' - accepts an argument |email|. If |email| is empty it sets |
39 current screen to the email input, otherwise it sets current | 39 current screen to the email input, otherwise it sets current |
40 screen to password input and shows error that previously | 40 screen to password input and shows error that previously |
41 entered password is incorrect. | 41 entered password is incorrect. |
42 --> | 42 --> |
43 <dom-module name="offline-gaia"> | 43 <dom-module name="offline-gaia"> |
44 <link rel="stylesheet" href="offline_gaia.css"> | 44 <link rel="stylesheet" href="offline_gaia.css"> |
45 | 45 |
46 <template> | 46 <template> |
47 <neon-animated-pages id="animatedPages" class="fit" attr-for-selected="id" | 47 <neon-animated-pages id="animatedPages" class="fit" attr-for-selected="id" |
48 entry-animation="slide-from-right-animation" | 48 entry-animation="slide-from-right-animation" |
49 exit-animation="slide-to-left-animation" | 49 exit-animation="slide-to-left-animation" |
50 on-neon-animation-finish="onAnimationFinish_" selected="emailSection"> | 50 on-neon-animation-finish="onAnimationFinish_" selected="emailSection"> |
51 | 51 |
52 <neon-animatable id="emailSection" class="fit"> | 52 <neon-animatable id="emailSection" class="fit"> |
53 <gaia-card class="fit"> | 53 <gaia-card class="fit"> |
54 <div class="header flex vertical layout end-justified start"> | 54 <div class="header flex vertical layout end-justified start"> |
55 <h1 class="welcome-message" i18n-content="offlineLoginWelcome"></h1> | 55 <h1 class="welcome-message" i18n-content="loginWelcomeMessage"></h1> |
56 <p class="enterprise-info" hidden$="[[!enterpriseInfo]]"> | 56 <p class="enterprise-info" hidden$="[[!showEnterpriseMessage]]" |
57 <span>[[enterpriseInfo]]</span> | 57 i18n-content="enterpriseInfoMessage"> |
58 </p> | 58 </p> |
59 </div> | 59 </div> |
60 <div class="footer flex vertical layout justified"> | 60 <div class="footer flex vertical layout justified"> |
61 <gaia-input-form on-submit="onEmailSubmitted_" | 61 <gaia-input-form on-submit="onEmailSubmitted_" |
62 disabled="[[disabled]]" | 62 disabled="[[disabled]]" |
63 i18n-values="button-text:offlineLoginNextBtn"> | 63 i18n-values="button-text:offlineLoginNextBtn"> |
64 <gaia-input id="emailInput" type="email" required | 64 <gaia-input id="emailInput" type="email" required |
65 domain="[[emailDomain]]" | 65 domain="[[emailDomain]]" |
66 i18n-values="error:offlineLoginInvalidEmail; | 66 i18n-values="error:offlineLoginInvalidEmail; |
67 label:offlineLoginEmail"> | 67 label:offlineLoginEmail"> |
(...skipping 29 matching lines...) Expand all Loading... |
97 <p i18n-content="offlineLoginForgotPasswordDlg"></p> | 97 <p i18n-content="offlineLoginForgotPasswordDlg"></p> |
98 <div class="buttons"> | 98 <div class="buttons"> |
99 <gaia-button type="dialog" dialog-confirm autofocus | 99 <gaia-button type="dialog" dialog-confirm autofocus |
100 i18n-content="offlineLoginCloseBtn"> | 100 i18n-content="offlineLoginCloseBtn"> |
101 </gaia-button> | 101 </gaia-button> |
102 </div> | 102 </div> |
103 </paper-dialog> | 103 </paper-dialog> |
104 </template> | 104 </template> |
105 </dom-module> | 105 </dom-module> |
106 | 106 |
OLD | NEW |