| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> | 1 <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html
"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.h
tml"> | 2 <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.h
tml"> |
| 3 <link rel="import" href="chrome://resources/html/cr.html"> | 3 <link rel="import" href="chrome://resources/html/cr.html"> |
| 4 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 8 <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-input/paper-input
.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> | |
| 10 <link rel="import" href="../bluetooth_page/bluetooth_device_list_item.html"> | 9 <link rel="import" href="../bluetooth_page/bluetooth_device_list_item.html"> |
| 11 <link rel="import" href="../settings_shared_css.html"> | 10 <link rel="import" href="../settings_shared_css.html"> |
| 12 | 11 |
| 13 <dom-module id="bluetooth-device-dialog"> | 12 <dom-module id="bluetooth-device-dialog"> |
| 14 <template> | 13 <template> |
| 15 <style include="settings-shared"> | 14 <style include="settings-shared"> |
| 16 #pairing { | 15 #pairing { |
| 17 margin-bottom: 10px; | 16 margin-bottom: 10px; |
| 18 } | 17 } |
| 19 | 18 |
| 20 #pairing paper-input { | 19 #pairing paper-input { |
| 21 text-align: center; | 20 text-align: center; |
| 22 } | 21 } |
| 23 | 22 |
| 24 #pinDiv { | 23 #pinDiv { |
| 25 margin-top: 10px; | 24 margin-top: 10px; |
| 26 } | 25 } |
| 27 | 26 |
| 28 paper-spinner { | |
| 29 @apply(--cr-icon-height-width); | |
| 30 margin: 0 10px; | |
| 31 } | |
| 32 | |
| 33 .dialog-message { | 27 .dialog-message { |
| 34 margin-bottom: 10px; | 28 margin-bottom: 10px; |
| 35 } | 29 } |
| 36 | 30 |
| 37 div.contents { | 31 div.contents { |
| 38 height: 250px; | 32 height: 250px; |
| 39 } | 33 } |
| 40 | 34 |
| 41 /* .display indicates a displayed pin code or passkey. */ | 35 /* .display indicates a displayed pin code or passkey. */ |
| 42 span.display { | 36 span.display { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 72 font-size: 153.85%; /* 20px / 13px */ | 66 font-size: 153.85%; /* 20px / 13px */ |
| 73 font-weight: 600; /* semibold */ | 67 font-weight: 600; /* semibold */ |
| 74 margin: 0 20px; | 68 margin: 0 20px; |
| 75 } | 69 } |
| 76 </style> | 70 </style> |
| 77 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_" | 71 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_" |
| 78 on-closed="onDialogCanceled_"> | 72 on-closed="onDialogCanceled_"> |
| 79 <div class="title">$i18n{bluetoothPairDevicePageTitle}</div> | 73 <div class="title">$i18n{bluetoothPairDevicePageTitle}</div> |
| 80 <div class="body"> | 74 <div class="body"> |
| 81 <div class="contents layout vertical center center-justified"> | 75 <div class="contents layout vertical center center-justified"> |
| 82 <!-- Note: dialog + dom-if + iron-list makes sizing complicated so use | |
| 83 hidden here; this is almost always the first dialog shown. --> | |
| 84 <div id="dialogDeviceList" | |
| 85 hidden$="[[!isDialogType_(dialogId, 'addDevice')]]" | |
| 86 class="layout vertical flex start self-stretch"> | |
| 87 <span class="no-devices" | |
| 88 hidden$="[[haveUnpaired_(unpairedDeviceList_)]]"> | |
| 89 $i18n{bluetoothNoDevices} | |
| 90 </span> | |
| 91 <div id="container" class="layout vertical flex self-stretch" | |
| 92 scrollable> | |
| 93 <iron-list id="devices" items="[[unpairedDeviceList_]]" | |
| 94 selection-enabled selected-item="{{selectedItem_}}" | |
| 95 scroll-target="container"> | |
| 96 <template> | |
| 97 <bluetooth-device-list-item device="[[item]]" | |
| 98 tabindex$="[[tabIndex]]"> | |
| 99 </bluetooth-device-list-item> | |
| 100 </template> | |
| 101 </iron-list> | |
| 102 </div> | |
| 103 </div> | |
| 104 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> | 76 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> |
| 105 <div id="pairing" class="settings-box first layout vertical center | 77 <div id="pairing" class="settings-box first layout vertical center |
| 106 center-justified"> | 78 center-justified"> |
| 107 <div class="dialog-message"> | 79 <div class="dialog-message"> |
| 108 [[getMessage_(pairingDevice, pairingEvent_)]] | 80 [[getMessage_(pairingDevice, pairingEvent_)]] |
| 109 </div> | 81 </div> |
| 110 <div hidden$="[[!showEnterPincode_(pairingEvent_)]]"> | 82 <div hidden$="[[!showEnterPincode_(pairingEvent_)]]"> |
| 111 <paper-input id="pincode" minlength="1" maxlength="16" | 83 <paper-input id="pincode" minlength="1" maxlength="16" |
| 112 type="text" auto-validate value="{{pinOrPass}}"> | 84 type="text" auto-validate value="{{pinOrPass}}"> |
| 113 </paper-input> | 85 </paper-input> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 134 <template is="dom-if" | 106 <template is="dom-if" |
| 135 if="[[isDialogType_('connectError', dialogId)]]"> | 107 if="[[isDialogType_('connectError', dialogId)]]"> |
| 136 <div class="settings-box first layout vertical center | 108 <div class="settings-box first layout vertical center |
| 137 center-justified"> | 109 center-justified"> |
| 138 <div class="dialog-message">[[errorMessage]]</div> | 110 <div class="dialog-message">[[errorMessage]]</div> |
| 139 </div> | 111 </div> |
| 140 </template> | 112 </template> |
| 141 </div> | 113 </div> |
| 142 </div> | 114 </div> |
| 143 <div class="button-container"> | 115 <div class="button-container"> |
| 144 <template is="dom-if" if="[[isDialogType_('addDevice', dialogId)]]"> | |
| 145 <div id="scanning" class="layout horizontal center flex" | |
| 146 hidden$="[[!adapterState.discovering]]"> | |
| 147 <paper-spinner active="[[adapterState.discovering]]"> | |
| 148 </paper-spinner> | |
| 149 <span>$i18n{bluetoothScanning}</span> | |
| 150 </div> | |
| 151 <paper-button class="end-justified" on-tap="onCancelTap_"> | |
| 152 $i18n{cancel} | |
| 153 </paper-button> | |
| 154 </template> | |
| 155 <template is="dom-if" if="[[isDialogType_('pairDevice', dialogId)]]"> | 116 <template is="dom-if" if="[[isDialogType_('pairDevice', dialogId)]]"> |
| 156 <paper-button hidden$="[[!showAcceptReject_(pairingEvent_)]]" | 117 <paper-button hidden$="[[!showAcceptReject_(pairingEvent_)]]" |
| 157 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> | 118 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> |
| 158 <paper-button hidden$="[[!showAcceptReject_(pairingEvent_)]]" | 119 <paper-button hidden$="[[!showAcceptReject_(pairingEvent_)]]" |
| 159 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> | 120 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> |
| 160 <paper-button hidden$="[[!showConnect_(pairingEvent_)]]" | 121 <paper-button hidden$="[[!showConnect_(pairingEvent_)]]" |
| 161 disabled="[[!enableConnect_(pairingEvent_, pinOrPass)]]" | 122 disabled="[[!enableConnect_(pairingEvent_, pinOrPass)]]" |
| 162 on-tap="onConnectTap_">$i18n{bluetoothPair}</paper-button> | 123 on-tap="onConnectTap_">$i18n{bluetoothPair}</paper-button> |
| 163 <paper-button | 124 <paper-button |
| 164 hidden$="[[!showDismiss_(pairingDevice, pairingEvent_)]]" | 125 hidden$="[[!showDismiss_(pairingDevice, pairingEvent_)]]" |
| 165 on-tap="close">$i18n{bluetoothDismiss}</paper-button> | 126 on-tap="close">$i18n{bluetoothDismiss}</paper-button> |
| 166 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent_)]]" | 127 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent_)]]" |
| 167 on-tap="onCancelTap_"> | 128 on-tap="onCancelTap_"> |
| 168 $i18n{cancel} | 129 $i18n{cancel} |
| 169 </paper-button> | 130 </paper-button> |
| 170 </template> | 131 </template> |
| 171 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]"> | 132 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]"> |
| 172 <paper-button on-tap="close">$i18n{bluetoothDismiss} | 133 <paper-button on-tap="close">$i18n{bluetoothDismiss} |
| 173 </paper-button> | 134 </paper-button> |
| 174 </template> | 135 </template> |
| 175 </div> | 136 </div> |
| 176 </dialog> | 137 </dialog> |
| 177 </template> | 138 </template> |
| 178 <script src="bluetooth_device_dialog.js"></script> | 139 <script src="bluetooth_device_dialog.js"></script> |
| 179 </dom-module> | 140 </dom-module> |
| OLD | NEW |