OLD | NEW |
1 <link rel="import" href="chrome://md-user-manager/import_supervised_user.html"> | 1 <link rel="import" href="chrome://md-user-manager/import_supervised_user.html"> |
2 <link rel="import" href="chrome://md-user-manager/profile_browser_proxy.html"> | 2 <link rel="import" href="chrome://md-user-manager/profile_browser_proxy.html"> |
3 <link rel="import" href="chrome://md-user-manager/shared_styles.html"> | 3 <link rel="import" href="chrome://md-user-manager/shared_styles.html"> |
4 <link rel="import" href="chrome://resources/html/action_link.html"> | 4 <link rel="import" href="chrome://resources/html/action_link.html"> |
5 <link rel="import" href="chrome://resources/html/cr.html"> | 5 <link rel="import" href="chrome://resources/html/cr.html"> |
6 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 6 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
7 <link rel="import" href="chrome://resources/html/polymer.html"> | 7 <link rel="import" href="chrome://resources/html/polymer.html"> |
8 <link rel="import" href="chrome://resources/html/util.html"> | 8 <link rel="import" href="chrome://resources/html/util.html"> |
9 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> | 9 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> |
10 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h
tml"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h
tml"> |
11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> | 12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch
eckbox.html"> |
13 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap
er-dropdown-menu.html"> | 13 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap
er-dropdown-menu.html"> |
14 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> | 14 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
15 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> | 15 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> |
16 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> | 16 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> |
17 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> | 17 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> |
18 | 18 |
19 <dom-module id="create-profile"> | 19 <dom-module id="create-profile"> |
20 <link rel="import" type="css" href="chrome://resources/css/action_link.css"> | |
21 <template> | 20 <template> |
22 <style include="shared-styles"> | 21 <style include="shared-styles"> |
23 .container { | 22 .container { |
24 color: var(--paper-grey-800); | 23 color: var(--main-text-color); |
25 margin: 0 auto; | 24 margin: 0 auto; |
26 width: 624px; | 25 width: 624px; |
27 } | 26 } |
28 | 27 |
29 #message-container { | 28 #message-container { |
30 background-color: var(--google-red-700); | 29 background-color: var(--google-red-700); |
31 color: white; | 30 color: white; |
32 left: 0; | 31 left: 0; |
33 overflow: hidden; | 32 overflow: hidden; |
34 padding: 10px 16px; | 33 padding: 10px 16px; |
(...skipping 18 matching lines...) Expand all Loading... |
53 | 52 |
54 #title-bar { | 53 #title-bar { |
55 border-bottom: 1px solid rgba(0, 0, 0, .12); | 54 border-bottom: 1px solid rgba(0, 0, 0, .12); |
56 font-size: 16px; | 55 font-size: 16px; |
57 font-weight: 500; | 56 font-weight: 500; |
58 padding: 104px 0 16px; | 57 padding: 104px 0 16px; |
59 } | 58 } |
60 | 59 |
61 #nameInput, | 60 #nameInput, |
62 paper-dropdown-menu { | 61 paper-dropdown-menu { |
63 --paper-input-container: { | |
64 padding: 0; | |
65 }; | |
66 --paper-input-container-input: { | 62 --paper-input-container-input: { |
67 color: inherit; | 63 color: inherit; |
68 font-size: inherit; | 64 font-size: inherit; |
69 }; | 65 }; |
70 } | 66 } |
71 | 67 |
72 #nameInput { | 68 #nameInput { |
73 margin-bottom: 24px; | 69 margin-bottom: 24px; |
74 margin-top: 32px; | 70 margin-top: 32px; |
75 width: 300px; | 71 width: 300px; |
76 } | 72 } |
77 | 73 |
78 paper-dropdown-menu { | |
79 margin-top: 12px; | |
80 width: 200px; | |
81 } | |
82 | |
83 paper-menu { | |
84 --paper-menu: { | |
85 color: inherit; | |
86 padding: 0; | |
87 }; | |
88 --paper-menu-selected-item: { | |
89 font-weight: normal; | |
90 } | |
91 } | |
92 | |
93 paper-menu paper-item { | |
94 font-size: inherit; | |
95 min-height: 40px; | |
96 } | |
97 | |
98 #icons #wrapper { | 74 #icons #wrapper { |
99 display: flex; | 75 display: flex; |
100 flex-wrap: wrap; | 76 flex-wrap: wrap; |
101 margin: -12px; | 77 margin: -12px; |
102 } | 78 } |
103 | 79 |
104 #icons paper-button { | 80 #icons paper-button { |
105 background: var(--paper-grey-300); | 81 background: var(--paper-grey-300); |
106 border: 1px solid rgba(0, 0, 0, .12); | 82 border: 1px solid rgba(0, 0, 0, .12); |
107 margin: 12px; | 83 margin: 12px; |
108 min-width: 0; | 84 min-width: 0; |
109 padding: 6px 4px; | 85 padding: 6px 4px; |
| 86 --paper-button-flat-keyboard-focus: { |
| 87 outline: auto; |
| 88 }; |
110 } | 89 } |
111 | 90 |
112 #icons paper-button[active] { | 91 #icons paper-button[active] { |
113 border-color: var(--google-blue-500); | 92 border-color: var(--google-blue-500); |
114 } | 93 } |
115 | 94 |
116 #icons paper-button:focus:not([active]) { | |
117 outline: 1px dotted #666; | |
118 } | |
119 | |
120 #supervised-user-container { | 95 #supervised-user-container { |
121 margin-top: 24px; | 96 margin-top: 24px; |
122 } | 97 } |
123 | 98 |
124 #supervised-user-container paper-checkbox { | 99 #supervised-user-container paper-checkbox { |
| 100 --primary-text-color: var(--main-text-color); |
125 --paper-checkbox-label-spacing: 16px; | 101 --paper-checkbox-label-spacing: 16px; |
126 --paper-checkbox-size: 20px; | 102 --paper-checkbox-size: 20px; |
127 } | 103 } |
128 | 104 |
129 #supervised-user-container #learn-more-accounts { | 105 #supervised-user-container #learn-more-custodians { |
130 -webkit-margin-start: 36px; | 106 -webkit-margin-start: 36px; |
131 } | 107 } |
132 | 108 |
133 #supervised-user-container #learn-more { | 109 #supervised-user-container #learn-more { |
134 display: block; | |
135 line-height: 20px; | 110 line-height: 20px; |
136 } | 111 } |
137 | 112 |
138 #supervised-user-container #import-user { | 113 #supervised-user-container paper-dropdown-menu { |
| 114 margin-top: 4px; |
| 115 width: 200px; |
| 116 } |
| 117 |
| 118 #supervised-user-container paper-menu { |
| 119 --paper-menu: { |
| 120 color: inherit; |
| 121 padding: 0; |
| 122 }; |
| 123 --paper-menu-selected-item: { |
| 124 font-weight: normal; |
| 125 }; |
| 126 } |
| 127 |
| 128 #supervised-user-container paper-menu paper-item { |
| 129 font-size: inherit; |
| 130 min-height: 40px; |
| 131 } |
| 132 |
| 133 #supervised-user-container #import-user-link { |
139 -webkit-margin-start: 16px; | 134 -webkit-margin-start: 16px; |
140 } | 135 } |
141 | 136 |
| 137 #supervised-user-container #sign-in-howto-message { |
| 138 margin-top: 12px; |
| 139 } |
| 140 |
142 #actions { | 141 #actions { |
143 bottom: 16px; | 142 bottom: 16px; |
144 display: flex; | 143 display: flex; |
145 position: absolute; | 144 position: absolute; |
146 right: 16px; | 145 right: 16px; |
147 } | 146 } |
148 | 147 |
149 :host-context([dir='rtl']) #actions { | 148 :host-context([dir='rtl']) #actions { |
150 left: 16px; | 149 left: 16px; |
151 right: auto; | 150 right: auto; |
152 } | 151 } |
153 | 152 |
154 #actions paper-button { | |
155 border-radius: 2px; | |
156 font-weight: 500; | |
157 line-height: 32px; | |
158 margin: 0; | |
159 min-width: 52px; | |
160 padding: 0 16px; | |
161 } | |
162 | |
163 #actions paper-spinner { | 153 #actions paper-spinner { |
164 align-self: center; | 154 align-self: center; |
165 height: 20px; | 155 height: 20px; |
166 width: 20px; | 156 width: 20px; |
167 } | 157 } |
168 | |
169 #actions #cancel { | |
170 color: var(--paper-grey-600); | |
171 } | |
172 | |
173 #actions #save { | |
174 -webkit-margin-start: 8px; | |
175 background: var(--google-blue-500); | |
176 color: white; | |
177 } | |
178 | |
179 #actions #save[disabled] { | |
180 background: rgba(66, 133, 244, .5); | |
181 } | |
182 </style> | 158 </style> |
183 <div id="message-container" hidden="[[!message_]]"> | 159 <div id="message-container" hidden="[[!message_]]"> |
184 <iron-icon icon="warning"></iron-icon> | 160 <iron-icon icon="warning"></iron-icon> |
185 <span id="message" inner-h-t-m-l="[[message_]]"></span> | 161 <span id="message" inner-h-t-m-l="[[message_]]"></span> |
186 </div> | 162 </div> |
187 <div class="container"> | 163 <div class="container"> |
188 <div id="title-bar" i18n-content="createProfileTitle"></div> | 164 <div id="title-bar">$i18n{createProfileTitle}</div> |
189 <paper-input id="nameInput" value="{{profileName_}}" pattern=".*\S.*" | 165 <paper-input id="nameInput" value="{{profileName_}}" pattern=".*\S.*" |
190 no-label-float auto-validate> | 166 no-label-float auto-validate> |
191 </paper-input> | 167 </paper-input> |
192 <div id="icons"> | 168 <div id="icons"> |
193 <div id="wrapper"> | 169 <div id="wrapper"> |
194 <template is="dom-repeat" items="[[availableIconUrls_]]"> | 170 <template is="dom-repeat" items="[[availableIconUrls_]]"> |
195 <paper-button toggles on-tap="onIconTap_" data-icon-url$="[[item]]" | 171 <paper-button toggles on-tap="onIconTap_" data-icon-url$="[[item]]" |
196 active="[[isActiveIcon_(item, profileIconUrl_)]]"> | 172 active="[[isActiveIcon_(item, profileIconUrl_)]]"> |
197 <img src="[[item]]"> | 173 <img src="[[item]]"> |
198 </paper-button> | 174 </paper-button> |
199 </template> | 175 </template> |
200 </div> | 176 </div> |
201 </div> | 177 </div> |
202 <template is="dom-if" if="[[isSignedIn_(signedInUsers_)]]"> | 178 <div id="supervised-user-container"> |
203 <div id="supervised-user-container"> | 179 <paper-checkbox checked="{{isSupervised_}}"> |
204 <paper-checkbox checked="{{isSupervised_}}"> | 180 $i18n{manageProfilesSupervisedSignedInLabel} |
205 [[i18n('manageProfilesSupervisedSignedInLabel')]] | 181 </paper-checkbox> |
206 </paper-checkbox> | 182 <div id="learn-more-custodians"> |
207 <div id="learn-more-accounts"> | 183 <a id="learn-more" is="action-link" on-tap="onLearnMoreTap_"> |
208 <a id="learn-more" is="action-link" on-tap="onLearnMoreTap_"> | 184 $i18n{learnMore} |
209 [[i18n('learnMore')]] | 185 </a> |
210 </a> | 186 <div id="custodians"> |
211 <template is="dom-if" if="[[isSupervised_]]"> | 187 <template is="dom-if" if="[[isSupervised_]]"> |
212 <paper-dropdown-menu no-label-float> | 188 <template is="dom-if" if="[[isSignedIn_(signedInUsers_)]]"> |
213 <paper-menu class="dropdown-content" | 189 <paper-dropdown-menu no-label-float> |
214 selected="{{signedInUserIndex_}}" | 190 <paper-menu class="dropdown-content" |
215 attr-for-selected="data-user-index"> | 191 selected="{{signedInUserIndex_}}" |
216 <paper-item data-user-index$="[[NO_USER_SELECTED]]"> | 192 attr-for-selected="data-user-index"> |
217 [[i18n('selectAnAccount')]] | 193 <paper-item data-user-index$="[[NO_USER_SELECTED]]"> |
218 </paper-item> | 194 $i18n{selectAnAccount} |
219 <template is="dom-repeat" items="[[signedInUsers_]]"> | |
220 <paper-item data-user-index$="[[index]]"> | |
221 [[item.username]] | |
222 </paper-item> | 195 </paper-item> |
223 </template> | 196 <template is="dom-repeat" items="[[signedInUsers_]]"> |
224 </paper-menu> | 197 <paper-item data-user-index$="[[index]]"> |
225 </paper-dropdown-menu> | 198 [[item.username]] |
226 <a id="import-user" is="action-link" on-tap="onImportUserTap_" | 199 </paper-item> |
227 hidden="[[isImportUserLinkHidden_(createInProgress_, | 200 </template> |
228 signedInUserIndex_)]]"> | 201 </paper-menu> |
229 [[i18n('importExistingSupervisedUserLink')]] | 202 </paper-dropdown-menu> |
230 </a> | 203 <a id="import-user-link" is="action-link" |
| 204 on-tap="onImportUserLinkTap_" |
| 205 hidden="[[isImportUserLinkHidden_(createInProgress_, |
| 206 signedInUserIndex_)]]"> |
| 207 $i18n{importExistingSupervisedUserLink} |
| 208 </a> |
| 209 </template> |
| 210 <div id="sign-in-howto-message" |
| 211 hidden="[[isSignedIn_(signedInUsers_)]]" |
| 212 inner-h-t-m-l="[[i18n('noSignedInUserMessage')]]"> |
| 213 </div> |
231 </template> | 214 </template> |
232 </div> | 215 </div> |
233 </div> | 216 </div> |
234 </template> | 217 </div> |
235 <div id="actions"> | 218 <div id="actions"> |
236 <paper-spinner active="[[createInProgress_]]"></paper-spinner> | 219 <paper-spinner active="[[createInProgress_]]"></paper-spinner> |
237 <paper-button id="cancel" on-tap="onCancelTap_" i18n-content="cancel"> | 220 <paper-button id="cancel" class="action secondary" |
| 221 on-tap="onCancelTap_"> |
| 222 $i18n{cancel} |
238 </paper-button> | 223 </paper-button> |
239 <paper-button id="save" on-tap="onSaveTap_" | 224 <paper-button id="save" class="action primary" on-tap="onSaveTap_" |
240 i18n-content="createProfileConfirm" | |
241 disabled="[[isSaveDisabled_(createInProgress_, profileName_)]]"> | 225 disabled="[[isSaveDisabled_(createInProgress_, profileName_)]]"> |
| 226 $i18n{createProfileConfirm} |
242 </paper-button> | 227 </paper-button> |
243 </div> | 228 </div> |
244 <import-supervised-user id="importUserPopup"></import-supervised-user> | 229 <import-supervised-user id="importUserPopup"></import-supervised-user> |
245 </div> | 230 </div> |
246 </template> | 231 </template> |
247 <script src="chrome://md-user-manager/create_profile.js"></script> | 232 <script src="chrome://md-user-manager/create_profile.js"></script> |
248 </dom-module> | 233 </dom-module> |
OLD | NEW |