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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
<style include="device-emulator-shared-styles cr-shared-style iron-flex
iron-flex-alignment iron-positioning">
</style>
<cr-dialog id="editDialog">
<div slot="title">[[currentEditableObject.alias]]</div>
<div slot="body">
<form>
<div class="form-field-section">
<cr-input value="{{currentEditableObject.alias}}"
label="Alias"></cr-input>
<cr-input on-input="validatePath"
id="devicePathInput"
value="{{currentEditableObject.path}}"
label="Path"></cr-input>
<cr-input value="{{currentEditableObject.name}}"
label="Name"></cr-input>
<cr-input id="deviceAddressInput" on-input="handleAddressInput"
value="{{currentEditableObject.address}}"
label="Address (xx:xx:xx:xx:xx:xx)"
maxlength="17"></cr-input>
</div>
<div class="form-field-section">
<span class="toggle-button-label">Trusted</span>
<cr-checkbox
checked="{{currentEditableObject.isTrusted}}"></cr-checkbox>
</div>
<div class="form-field-section">
<span class="toggle-button-label">Incoming Connnection</span>
<cr-checkbox
checked="{{currentEditableObject.incoming}}"></cr-checkbox>
</div>
<div class="form-field-section">
<div class="form-label">Class</div>
<cr-radio-group class="device-class-group"
selected="{{currentEditableObject.class}}">
<template is="dom-repeat"
items="[[deviceClassOptions]]" as="option">
<cr-radio-button name="[[option.text]]"
>[[option.text]]</cr-radio-button>
</template>
</cr-radio-group>
</div>
<div class="form-field-section">
<label>
<span class="form-label">Pair Authentication</span>
<cr-radio-group
selected="{{currentEditableObject.pairingMethod}}">
<template is="dom-repeat"
items="[[deviceAuthenticationMethods]]" as="method">
<cr-radio-button name="[[method]]"
>[[method]]</cr-radio-button>
</template>
</cr-radio-group>
</label>
</div>
<div>
<div class="form-field-section"
hidden$=
"[[!showAuthToken(currentEditableObject.pairingMethod)]]"
>
<cr-input value="{{currentEditableObject.pairingAuthToken}}"
label="Code"></cr-input>
</div>
<div class="form-field-section">
<label>
<span class="form-label">Pairing Action</span>
<cr-radio-group
selected="{{currentEditableObject.pairingAction}}">
<template is="dom-repeat"
items="[[deviceAuthenticationActions]]">
<cr-radio-button name="[[item]]"
>[[item]]</cr-radio-button>
</template>
</cr-radio-group>
</label>
</div>
</div>
</form>
</div>
<div slot="button-container">
<cr-button class="action-button" on-click="onCloseClick_">
Close
</cr-button>
</div>
</cr-dialog>
<div class="layout vertical">
<div class="element-label">
<cr-icon-button iron-icon="device-emulator:bluetooth"></cr-icon-button>
Bluetooth
</div>
<table class="devices-table">
<tbody>
<tr class="table-section-header">
<td colspan="2">Presets</td>
<td class="centered-cell-label">Discoverable</td>
<td class="centered-cell-label">Paired</td>
</tr>
<template is="dom-repeat" items="[[predefinedDevices]]">
<tr>
<td class="alias-cell">[[item.alias]]</td>
<td class="icon-cell">
<cr-icon-button iron-icon="device-emulator:content-copy"
on-click="copyDevice" data-predefined="true">
</cr-icon-button>
<cr-icon-button disabled iron-icon="device-emulator:settings">
</cr-icon-button>
<cr-icon-button disabled iron-icon="device-emulator:delete">
</cr-icon-button>
</td>
<td class="control-cell">
<cr-checkbox checked="{{item.discoverable}}"
data-predefined="true"
on-change="discoverDevice"></cr-checkbox>
</td>
<td class="control-cell">
<cr-checkbox on-change="pairDevice" data-predefined="true"
checked="{{item.paired}}"></cr-checkbox>
</td>
</tr>
</template>
</tbody>
<tbody>
<tr class="table-section-header">
<td colspan="4">Custom</td>
</tr>
<template is="dom-repeat" items="[[devices]]">
<tr>
<td class="alias-cell">[[item.alias]]</td>
<td class="icon-cell">
<cr-icon-button iron-icon="device-emulator:content-copy"
data-predefined="false" on-click="copyDevice">
</cr-icon-button>
<cr-icon-button iron-icon="device-emulator:settings"
on-click="showEditDialog"></cr-icon-button>
<cr-icon-button iron-icon="device-emulator:delete"
on-click="deleteDevice"></cr-icon-button>
</td>
<td class="control-cell">
<cr-checkbox checked="{{item.discoverable}}"
data-predefined="false"
on-change="discoverDevice"></cr-checkbox>
</td>
<td class="control-cell">
<cr-checkbox checked="{{item.paired}}"
data-predefined="false"
on-change="pairDevice"></cr-checkbox>
</td>
</tr>
</template>
</tbody>
</table>
<div class="add-device-container">
<cr-button on-click="appendNewDevice">
Add Device
</cr-button>
</div>
</div>
|