Andrew Bonventre | 69fe793 | 2015-11-24 17:24:53 -0500 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright (C) 2015 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | |
Andrew Bonventre | 78792e8 | 2016-03-04 17:48:22 -0500 | [diff] [blame] | 17 | <link rel="import" href="../../../bower_components/polymer/polymer.html"> |
Andrew Bonventre | 369ed38 | 2016-03-09 00:46:39 -0500 | [diff] [blame] | 18 | <link rel="import" href="../../shared/gr-button/gr-button.html"> |
Becky Siegel | f8fb4c9 | 2016-11-28 13:46:58 -0800 | [diff] [blame] | 19 | <link rel="import" href="../../shared/gr-dropdown/gr-dropdown.html"> |
Urs Wolfer | f98ec4a | 2016-03-09 22:48:16 +0100 | [diff] [blame] | 20 | <link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html"> |
Andrew Bonventre | 69fe793 | 2015-11-24 17:24:53 -0500 | [diff] [blame] | 21 | |
| 22 | <dom-module id="gr-account-dropdown"> |
| 23 | <template> |
Urs Wolfer | 90620d0 | 2016-03-20 17:43:07 +0100 | [diff] [blame] | 24 | <style> |
Urs Wolfer | 90620d0 | 2016-03-20 17:43:07 +0100 | [diff] [blame] | 25 | button { |
| 26 | background: none; |
| 27 | border: none; |
| 28 | font: inherit; |
| 29 | padding: .3em 0; |
| 30 | } |
| 31 | gr-avatar { |
| 32 | height: 2em; |
| 33 | width: 2em; |
| 34 | vertical-align: middle; |
| 35 | } |
Urs Wolfer | 90620d0 | 2016-03-20 17:43:07 +0100 | [diff] [blame] | 36 | </style> |
Wyatt Allen | bda4683 | 2017-01-24 10:49:28 -0800 | [diff] [blame^] | 37 | <gr-dropdown |
| 38 | link |
| 39 | items=[[links]] |
| 40 | top-content=[[topContent]] |
Andrew Bonventre | b07c0d2 | 2015-12-01 13:48:12 -0500 | [diff] [blame] | 41 | horizontal-align="right"> |
Becky Siegel | f8fb4c9 | 2016-11-28 13:46:58 -0800 | [diff] [blame] | 42 | <span hidden$="[[_hasAvatars]]" hidden>[[account.name]]</span> |
| 43 | <gr-avatar account="[[account]]" hidden$="[[!_hasAvatars]]" hidden |
| 44 | image-size="56"></gr-avatar> |
Becky Siegel | f8fb4c9 | 2016-11-28 13:46:58 -0800 | [diff] [blame] | 45 | </gr-dropdown> |
Urs Wolfer | f98ec4a | 2016-03-09 22:48:16 +0100 | [diff] [blame] | 46 | <gr-rest-api-interface id="restAPI"></gr-rest-api-interface> |
Andrew Bonventre | 69fe793 | 2015-11-24 17:24:53 -0500 | [diff] [blame] | 47 | </template> |
Andrew Bonventre | 78792e8 | 2016-03-04 17:48:22 -0500 | [diff] [blame] | 48 | <script src="gr-account-dropdown.js"></script> |
Andrew Bonventre | 69fe793 | 2015-11-24 17:24:53 -0500 | [diff] [blame] | 49 | </dom-module> |