| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2017 The LUCI Authors. All rights reserved. | 2 Copyright 2017 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. | 4 that can be found in the LICENSE file. |
| 5 | 5 |
| 6 The `auth-signin` element displays sign-in/sign-out button, user email and | 6 The `auth-signin` element displays sign-in/sign-out button, user email and |
| 7 avatar. | 7 avatar. |
| 8 It has a google-signin/google-signin-aware element under the hood that handles | 8 It has a google-signin/google-signin-aware element under the hood that handles |
| 9 the actual OAuth logic. | 9 the actual OAuth logic. |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 <link rel="import" href="../../bower_components/polymer/polymer.html"> | 31 <link rel="import" href="../../bower_components/polymer/polymer.html"> |
| 32 | 32 |
| 33 | 33 |
| 34 <dom-module id="auth-signin"> | 34 <dom-module id="auth-signin"> |
| 35 <template> | 35 <template> |
| 36 <style> | 36 <style> |
| 37 #avatar { border-radius: 5px; } | 37 #avatar { border-radius: 5px; } |
| 38 | 38 |
| 39 .center { vertical-align: middle; } | 39 .center { vertical-align: middle; } |
| 40 | 40 |
| 41 .typeface { font-size: 75%; } | 41 .typeface { |
| 42 font-size: 75%; |
| 43 color: white; |
| 44 } |
| 42 </style> | 45 </style> |
| 43 | 46 |
| 44 <google-signin-aware id="aware" | 47 <google-signin-aware id="aware" |
| 45 client-id="[[client_id]]" | 48 client-id="[[client_id]]" |
| 46 scopes="email" | 49 scopes="email" |
| 47 on-google-signin-aware-success="_onSignin" | 50 on-google-signin-aware-success="_onSignin" |
| 48 on-google-signin-aware-signed-out="_onSignout"> | 51 on-google-signin-aware-signed-out="_onSignout"> |
| 49 </google-signin-aware> | 52 </google-signin-aware> |
| 50 | 53 |
| 51 <template is="dom-if" if="[[!signed_in]]"> | 54 <template is="dom-if" if="[[!signed_in]]"> |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 this.$.aware.signIn(); | 164 this.$.aware.signIn(); |
| 162 }, | 165 }, |
| 163 | 166 |
| 164 signOut: function() { | 167 signOut: function() { |
| 165 this.$.aware.signOut(); | 168 this.$.aware.signOut(); |
| 166 window.location.reload(); | 169 window.location.reload(); |
| 167 } | 170 } |
| 168 }); | 171 }); |
| 169 </script> | 172 </script> |
| 170 </dom-module> | 173 </dom-module> |
| OLD | NEW |