blob: 07c922a6be59fe9e770cbec53874174a634167b0 [file] [log] [blame]
Andrew Bonventre69fe7932015-11-24 17:24:53 -05001<!--
2Copyright (C) 2015 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16
Andrew Bonventre78792e82016-03-04 17:48:22 -050017<link rel="import" href="../../../bower_components/polymer/polymer.html">
Andrew Bonventre369ed382016-03-09 00:46:39 -050018<link rel="import" href="../../shared/gr-button/gr-button.html">
Becky Siegelf8fb4c92016-11-28 13:46:58 -080019<link rel="import" href="../../shared/gr-dropdown/gr-dropdown.html">
Urs Wolferf98ec4a2016-03-09 22:48:16 +010020<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
Andrew Bonventre69fe7932015-11-24 17:24:53 -050021
22<dom-module id="gr-account-dropdown">
23 <template>
Urs Wolfer90620d02016-03-20 17:43:07 +010024 <style>
Urs Wolfer90620d02016-03-20 17:43:07 +010025 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 Wolfer90620d02016-03-20 17:43:07 +010036 </style>
Wyatt Allenbda46832017-01-24 10:49:28 -080037 <gr-dropdown
38 link
39 items=[[links]]
40 top-content=[[topContent]]
Andrew Bonventreb07c0d22015-12-01 13:48:12 -050041 horizontal-align="right">
Becky Siegelf8fb4c92016-11-28 13:46:58 -080042 <span hidden$="[[_hasAvatars]]" hidden>[[account.name]]</span>
43 <gr-avatar account="[[account]]" hidden$="[[!_hasAvatars]]" hidden
44 image-size="56"></gr-avatar>
Becky Siegelf8fb4c92016-11-28 13:46:58 -080045 </gr-dropdown>
Urs Wolferf98ec4a2016-03-09 22:48:16 +010046 <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
Andrew Bonventre69fe7932015-11-24 17:24:53 -050047 </template>
Andrew Bonventre78792e82016-03-04 17:48:22 -050048 <script src="gr-account-dropdown.js"></script>
Andrew Bonventre69fe7932015-11-24 17:24:53 -050049</dom-module>