| <!-- | 
 | @license | 
 | Copyright (C) 2019 The Android Open Source Project | 
 |  | 
 | Licensed under the Apache License, Version 2.0 (the "License"); | 
 | you may not use this file except in compliance with the License. | 
 | You may obtain a copy of the License at | 
 |  | 
 | http://www.apache.org/licenses/LICENSE-2.0 | 
 |  | 
 | Unless required by applicable law or agreed to in writing, software | 
 | distributed under the License is distributed on an "AS IS" BASIS, | 
 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
 | See the License for the specific language governing permissions and | 
 | limitations under the License. | 
 | --> | 
 |  | 
 | <dom-module id="gr-serviceuser-http-password"> | 
 |   <template> | 
 |     <style include="shared-styles"> | 
 |       .password { | 
 |         font-family: var(--monospace-font-family); | 
 |       } | 
 |  | 
 |       #generatedPasswordOverlay { | 
 |         padding: 2em; | 
 |         width: 50em; | 
 |       } | 
 |  | 
 |       #generatedPasswordDisplay { | 
 |         margin: 1em 0; | 
 |       } | 
 |  | 
 |       #generatedPasswordDisplay .value { | 
 |         font-family: var(--monospace-font-family); | 
 |       } | 
 |  | 
 |       #passwordWarning { | 
 |         font-style: italic; | 
 |         text-align: center; | 
 |       } | 
 |  | 
 |       .closeButton { | 
 |         bottom: 2em; | 
 |         position: absolute; | 
 |         right: 2em; | 
 |       } | 
 |     </style> | 
 |     <style include="gr-form-styles"></style> | 
 |     <div class="gr-form-styles"> | 
 |       <div> | 
 |         <section> | 
 |           <span class="title">Username</span> | 
 |           <span class="value">[[_serviceUser.username]]</span> | 
 |         </section> | 
 |         <gr-button id="generateButton" | 
 |                    on-click="_handleGenerateTap">Generate new password</gr-button> | 
 |         <gr-button id="deleteButton" | 
 |                    on-click="_handleDelete">Delete password</gr-button> | 
 |       </div> | 
 |     </div> | 
 |     <gr-overlay id="generatedPasswordOverlay" | 
 |                 on-iron-overlay-closed="_generatedPasswordOverlayClosed" | 
 |                 with-backdrop> | 
 |       <div class="gr-form-styles"> | 
 |         <section id="generatedPasswordDisplay"> | 
 |           <span class="title">New Password:</span> | 
 |           <span class="value">[[_generatedPassword]]</span> | 
 |         </section> | 
 |         <section id="passwordWarning"> | 
 |           This password will not be displayed again.<br> | 
 |           If you lose it, you will need to generate a new one. | 
 |         </section> | 
 |         <gr-button link | 
 |                    class="closeButton" | 
 |                    on-click="_closeOverlay">Close</gr-button> | 
 |       </div> | 
 |     </gr-overlay> | 
 |   </template> | 
 |   <script src="gr-serviceuser-http-password.js"></script> | 
 | </dom-module> |