blob: 739b1b7b29baae89a82f1c7d516a1ea8c56424fa (
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
|
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="../chromeos/os_icons.html">
<link rel="import" href="../icons.html">
<link rel="import" href="../settings_shared_css.html">
<dom-module id="bluetooth-device-list-item">
<template>
<style include="settings-shared">
.name[connected] {
font-weight: 500;
}
.state[connected] {
color: var(--google-green-500);
}
</style>
<div class="list-item">
<iron-icon id="deviceIcon" icon="[[getDeviceIcon_(device)]]">
</iron-icon>
<div class="middle">
<div class="name" connected$="[[device.connected]]">
[[getDeviceName_(device)]]
</div>
<div class="state secondary" connected$="[[device.connected]]"
hidden$="[[!hasConnectionStatusText_(device)]]">
[[getConnectionStatusText_(device)]]
</div>
</div>
<div hidden$="[[!device.paired]]">
<cr-icon-button class="icon-more-vert" on-click="onMenuButtonTap_"
tabindex$="[[tabindex]]" title="$i18n{moreActions}"
on-keydown="ignoreEnterKey_"></cr-icon-button>
<cr-action-menu id="dotsMenu">
<button class="dropdown-item"
on-click="onConnectActionTap_">
[[getConnectActionText_(device.connected)]]
</button>
<button class="dropdown-item" on-click="onRemoveTap_">
$i18n{bluetoothRemove}
</button>
</cr-action-menu>
</div>
</div>
</template>
<script src="bluetooth_device_list_item.js"></script>
</dom-module>
|