| OLD | NEW |
| (Empty) | |
| 1 <link rel="import" href="chrome://resources/html/cr.html"> |
| 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele
ctor.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> |
| 9 <link rel="import" href="chrome://md-settings/bluetooth_page/bluetooth_device_li
st_item.html"> |
| 10 <link rel="import" href="chrome://md-settings/bluetooth_page/bluetooth_dialog_sh
ared_css.html"> |
| 11 <link rel="import" href="chrome://md-settings/icons.html"> |
| 12 <link rel="import" href="chrome://md-settings/settings_dialog.html"> |
| 13 <link rel="import" href="chrome://md-settings/settings_shared_css.html"> |
| 14 |
| 15 <dom-module id="bluetooth-device-dialog"> |
| 16 <template> |
| 17 <style include="settings-shared bluetooth-dialog-shared"></style> |
| 18 <settings-dialog id="dialog" class="layout vertical"> |
| 19 <!-- TODO(dbeam): use .title instead. --> |
| 20 <div class="body"> |
| 21 <template is="dom-if" if="[[isDialogType_(dialogType, 'addDevice')]]"> |
| 22 <div id="dialogHeaderDiv" class="settings-box layout horizontal"> |
| 23 <span id="dialogTitle" class="flex"> |
| 24 $i18n{bluetoothAddDevicePageTitle} |
| 25 </span> |
| 26 <paper-icon-button icon="close" on-tap="onAddCancelTap_" |
| 27 id="closeAdd"> |
| 28 </paper-icon-button> |
| 29 </div> |
| 30 <div class="settings-box flex"> |
| 31 <div id="dialogDeviceList" class="settings-box layout vertical" |
| 32 on-device-event="onDeviceEvent_"> |
| 33 <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]"> |
| 34 $i18n{bluetoothNoDevices} |
| 35 </span> |
| 36 <iron-selector class="flex"> |
| 37 <template is="dom-repeat" items="[[deviceList]]" |
| 38 filter="deviceNotPaired_" observe="paired"> |
| 39 <bluetooth-device-list-item device="[[item]]"> |
| 40 </bluetooth-device-list-item> |
| 41 </template> |
| 42 </iron-selector> |
| 43 </div> |
| 44 </div> |
| 45 </template> |
| 46 <template is="dom-if" if="[[isDialogType_(dialogType, 'pairDevice')]]"> |
| 47 <div id="dialogHeaderDiv" |
| 48 class="settings-box layout horizontal center"> |
| 49 <span id="dialogTitle" class="flex"> |
| 50 $i18n{bluetoothPairDevicePageTitle} |
| 51 </span> |
| 52 <paper-icon-button icon="close" on-tap="onPairCancelTap_" |
| 53 id="closePair"> |
| 54 </paper-icon-button> |
| 55 </div> |
| 56 <div id="pairing" class="settings-blox layout vertical center |
| 57 center-justified flex"> |
| 58 <div id="dialogMessage"> |
| 59 [[getMessage_(pairingDevice, pairingEvent)]] |
| 60 </div> |
| 61 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> |
| 62 <paper-input id="pincode" minlength="1" maxlength="16" |
| 63 type="text"> |
| 64 </div> |
| 65 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> |
| 66 <paper-input id="passkey" minlength="6" maxlength="6" type="text"> |
| 67 </div> |
| 68 <div id="pinDiv" class="layout horizontal center center-justified" |
| 69 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> |
| 70 <template is="dom-repeat" items="[[digits]]"> |
| 71 <span class$="[[getPinClass_(pairingEvent, index)]]"> |
| 72 [[getPinDigit_(pairingEvent, index)]] |
| 73 </span> |
| 74 </template> |
| 75 <span class$="[[getPinClass_(pairingEvent, -1)]]" |
| 76 hidden="[[showAcceptReject_(pairingEvent)]]"> |
| 77 $i18n{bluetoothEnterKey} |
| 78 </span> |
| 79 </div> |
| 80 </div> |
| 81 </template> |
| 82 </div> |
| 83 <div class="button-container"> |
| 84 <template is="dom-if" if="[[isDialogType_(dialogType, 'addDevice')]]"> |
| 85 <div id="scanning" class="layout horizontal center flex" |
| 86 hidden$="[[!adapterState.discovering]]"> |
| 87 <paper-spinner active="[[adapterState.discovering]]"> |
| 88 </paper-spinner> |
| 89 <span>$i18n{bluetoothScanning}</span> |
| 90 </div> |
| 91 <paper-button id="cancel" class="end-justified" |
| 92 on-tap="onAddCancelTap_"> |
| 93 $i18n{cancel} |
| 94 </paper-button> |
| 95 </template> |
| 96 <template is="dom-if" if="[[isDialogType_(dialogType, 'pairDevice')]]"> |
| 97 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" |
| 98 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> |
| 99 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" |
| 100 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> |
| 101 <paper-button hidden$="[[!showConnect_(pairingEvent)]]" |
| 102 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button> |
| 103 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" |
| 104 on-tap="onDismissTap_">$i18n{bluetoothDismiss}</paper-button> |
| 105 <paper-button on-tap="onPairCancelTap_" |
| 106 hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]"> |
| 107 $i18n{cancel} |
| 108 </paper-button> |
| 109 </template> |
| 110 </div> |
| 111 </settings-dialog> |
| 112 </template> |
| 113 <script src="chrome://md-settings/bluetooth_page/bluetooth_device_dialog.js"><
/script> |
| 114 </dom-module> |
| OLD | NEW |