blob: c5d4e0ed6f8c87b48adda5d54ecb1eacd465aa56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
<link rel="import" href="chrome://resources/cr_elements/network/cr_network_icon.html">
<link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<dom-module id="cr-network-list-item">
<template>
<style include="cr-shared-style">
:host {
display: inline-block;
outline: none;
}
#divButtons {
align-items: center;
display: flex;
flex-direction: row;
}
#divDetail {
display: flex;
flex: 1 0 auto;
flex-direction: row;
}
#divIcon {
display: flex;
flex-direction: column;
flex: 0 0 auto;
justify-content: center;
width: 32px;
}
#divOuter {
border-style: none;
display: flex;
flex-direction: row;
margin: 0;
height: 32px;
padding: 4px;
}
#divOuter[first-custom-item] {
border-top: var(--cr-separator-line);
}
#divText {
display: flex;
flex: 1 0 auto;
flex-direction: column;
justify-content: center;
}
#itemName {
-webkit-margin-start: 8px;
font-size: inherit;
}
#itemName[connected] {
font-weight: bold;
}
#networkStateText {
-webkit-margin-start: 8px;
color: var(--paper-grey-600);
font-size: inherit;
font-weight: 400;
}
#networkStateText[connected] {
color: var(--google-green-500);
}
cr-network-icon,
iron-icon {
height: 24px;
width: 24px;
}
</style>
<div id="divOuter" actionable$="[[isListItem]]"
first-custom-item$="[[item.isFirstCustomItem]]">
<div id="divIcon">
<template is="dom-if" if="[[networkState]]">
<cr-network-icon is-list-item="[[isListItem]]"
network-state="[[networkState]]">
</cr-network-icon>
</template>
<template is="dom-if" if="[[item.polymerIcon]]">
<iron-icon icon="[[item.polymerIcon]]"></iron-icon>
</template>
</div>
<div id="divText" class="layout horizontal flex">
<div id="itemName" connected$="[[isConnected_(networkState)]]">
[[getItemName_(item, isListItem)]]
</div>
<div id="networkStateText"
hidden$="[[!isStateTextVisible_(networkState, isListItem)]]"
connected$="[[isStateTextConnected_(networkState, isListItem)]]">
[[getNetworkStateText_(networkState, isListItem)]]
</div>
</div>
<template is="dom-if"
if="[[isSettingsButtonVisible_(networkState, showButtons)]]">
<div id="divButtons">
<paper-icon-button icon="cr:settings" on-tap="fireShowDetails_"
tabindex$="[[tabindex]]">
</paper-icon-button>
</div>
</template>
</div>
</template>
<script src="cr_network_list_item.js"></script>
</dom-module>
|