blob: 85db3a15510a0d384d57cf268c34bb2c5a58165c [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
Paladox nonef2bbd7c2017-07-03 13:45:27 +000017<link rel="import" href="../../../behaviors/gr-anonymous-name-behavior/gr-anonymous-name-behavior.html">
Andrew Bonventre78792e82016-03-04 17:48:22 -050018<link rel="import" href="../../../bower_components/polymer/polymer.html">
Andrew Bonventre369ed382016-03-09 00:46:39 -050019<link rel="import" href="../../shared/gr-button/gr-button.html">
Becky Siegelf8fb4c92016-11-28 13:46:58 -080020<link rel="import" href="../../shared/gr-dropdown/gr-dropdown.html">
Urs Wolferf98ec4a2016-03-09 22:48:16 +010021<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
Becky Siegelb159a7f2017-06-01 15:31:55 -070022<link rel="import" href="../../../styles/shared-styles.html">
Andrew Bonventre69fe7932015-11-24 17:24:53 -050023
24<dom-module id="gr-account-dropdown">
25 <template>
Becky Siegelb159a7f2017-06-01 15:31:55 -070026 <style include="shared-styles">
Urs Wolfer90620d02016-03-20 17:43:07 +010027 button {
28 background: none;
29 border: none;
30 font: inherit;
31 padding: .3em 0;
32 }
33 gr-avatar {
34 height: 2em;
35 width: 2em;
36 vertical-align: middle;
37 }
Urs Wolfer90620d02016-03-20 17:43:07 +010038 </style>
Wyatt Allenbda46832017-01-24 10:49:28 -080039 <gr-dropdown
40 link
41 items=[[links]]
42 top-content=[[topContent]]
Andrew Bonventreb07c0d22015-12-01 13:48:12 -050043 horizontal-align="right">
Paladox nonef2bbd7c2017-07-03 13:45:27 +000044 <span hidden$="[[_hasAvatars]]" hidden>[[_accountName(account)]]</span>
Becky Siegelf8fb4c92016-11-28 13:46:58 -080045 <gr-avatar account="[[account]]" hidden$="[[!_hasAvatars]]" hidden
Kasper Nilsson76067cd2017-01-23 14:36:18 -080046 image-size="56" aria-label="Account avatar"></gr-avatar>
Becky Siegelf8fb4c92016-11-28 13:46:58 -080047 </gr-dropdown>
Urs Wolferf98ec4a2016-03-09 22:48:16 +010048 <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
Andrew Bonventre69fe7932015-11-24 17:24:53 -050049 </template>
Andrew Bonventre78792e82016-03-04 17:48:22 -050050 <script src="gr-account-dropdown.js"></script>
Andrew Bonventre69fe7932015-11-24 17:24:53 -050051</dom-module>