OLD | NEW |
1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
2 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm
l"> | 3 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm
l"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/network/network_icons.ht
ml"> |
3 | 5 |
4 <dom-module id="cr-network-icon"> | 6 <dom-module id="cr-network-icon"> |
5 <template> | 7 <template> |
6 <style> | 8 <style> |
7 /* Note: we use display: block here to avoid positioning issues related to | |
8 the use of overflow: hidden. */ | |
9 :host { | 9 :host { |
10 display: block; | |
11 height: 50px; | |
12 overflow: hidden; | 10 overflow: hidden; |
| 11 padding: 2px; |
13 position: relative; | 12 position: relative; |
14 width: 50px; | 13 } |
| 14 |
| 15 /* Included for options UI. TODO(stevenjb): Remove. */ |
| 16 [hidden] { |
| 17 display: none !important; |
15 } | 18 } |
16 | 19 |
17 #icon { | 20 #icon { |
18 height: 100%; | 21 height: 20px; |
19 position: absolute; | 22 width: 20px; |
20 width: 100%; | |
21 } | 23 } |
22 | 24 |
23 #icon.multi-level { | |
24 height: 500%; | |
25 } | |
26 | |
27 #icon.level0 { | |
28 top: 0px; | |
29 } | |
30 | |
31 #icon.level1 { | |
32 top: -100%; | |
33 } | |
34 | |
35 #icon.level2 { | |
36 top: -200%; | |
37 } | |
38 | |
39 #icon.level3 { | |
40 top: -300%; | |
41 } | |
42 | |
43 #icon.level4 { | |
44 top: -400%; | |
45 } | |
46 | |
47 /* Connecting animation */ | |
48 | |
49 #icon.connecting { | |
50 -webkit-animation: levels 1s infinite; | |
51 -webkit-animation-timing-function: steps(4, start); | |
52 } | |
53 | |
54 @-webkit-keyframes levels { | |
55 from { | |
56 top: 0%; | |
57 } | |
58 to { | |
59 top: -400%; | |
60 } | |
61 } | |
62 | |
63 /* Badges. */ | |
64 /* Note: These use left/right because we do not reverse the badges for | |
65 * RTL. */ | |
66 | |
67 /* Upper-left corner */ | 25 /* Upper-left corner */ |
68 #technology { | 26 #technology { |
69 height: 40%; | 27 height: 20px; |
70 left: 0px; | 28 left: 0; |
71 position: absolute; | 29 position: absolute; |
72 top: 0px; | 30 top: 1px; |
| 31 width: 20px; |
73 } | 32 } |
74 | 33 |
75 /* Lower-right corner */ | 34 /* Lower-right corner */ |
76 #roaming, | |
77 #secure { | 35 #secure { |
78 height: 40%; | 36 height: 20px; |
79 left: 60%; | 37 left: 16px; |
80 position: absolute; | 38 position: absolute; |
81 top: 60%; | 39 top: 16px; |
82 width: 40%; | 40 width: 20px; |
83 } | 41 } |
84 </style> | 42 </style> |
85 <img id="icon" src$="[[toImageSrc_(iconType_)]]" alt=""> | 43 <iron-icon id="icon" icon="[[getIcon_(networkState, isListItem)]]"> |
86 <img id="technology" alt="" src$="[[toBadgeImageSrc_(technology_)]]" | 44 </iron-icon> |
87 hidden$="[[!technology_]]"> | 45 <iron-icon id="technology" hidden ="[[!showTechnology_(networkState)]]" |
88 <img id="roaming" alt="" | 46 icon="[[getTechnology_(networkState)]]"> |
89 src="chrome://resources/cr_elements/network/badge_roaming.png" | 47 </iron-icon> |
90 hidden$="[[!roaming_]]"> | 48 <iron-icon id="secure" hidden ="[[!showSecure_(networkState)]]" |
91 <img id="secure" alt="" | 49 icon="network:badge-secure"> |
92 src="chrome://resources/cr_elements/network/badge_secure.png" | 50 </iron-icon> |
93 hidden$="[[!secure_]]"> | |
94 </template> | 51 </template> |
95 <script src="cr_network_icon.js"></script> | 52 <script src="cr_network_icon.js"></script> |
96 </dom-module> | 53 </dom-module> |
OLD | NEW |