Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html

Issue 2146553005: MD Settings: Bluetooth: Add error dialog and messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_602538_bluetooth_fixes_0
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/html/cr.html"> 2 <link rel="import" href="chrome://resources/html/cr.html">
3 <link rel="import" href="chrome://resources/html/polymer.html"> 3 <link rel="import" href="chrome://resources/html/polymer.html">
4 <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-flex-layout/classe s/iron-flex-layout.html">
5 <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/iron-selector/iron-sele ctor.html">
6 <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-button/paper-butt on.html">
7 <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-icon-button/paper -icon-button.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"> 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"> 10 <link rel="import" href="/bluetooth_page/bluetooth_device_list_item.html">
11 <link rel="import" href="/icons.html"> 11 <link rel="import" href="/icons.html">
12 <link rel="import" href="/settings_shared_css.html"> 12 <link rel="import" href="/settings_shared_css.html">
13 13
14 <dom-module id="bluetooth-device-dialog"> 14 <dom-module id="bluetooth-device-dialog">
15 <template> 15 <template>
16 <style include="settings-shared"> 16 <style include="settings-shared">
17 #dialogMessage {
18 margin-bottom: 10px;
19 }
20
21 #pairing { 17 #pairing {
22 margin-bottom: 10px; 18 margin-bottom: 10px;
23 } 19 }
24 20
25 #pairing paper-input { 21 #pairing paper-input {
26 text-align: center; 22 text-align: center;
27 } 23 }
28 24
29 #pinDiv { 25 #pinDiv {
30 margin-top: 10px; 26 margin-top: 10px;
31 } 27 }
32 28
33 iron-selector { 29 iron-selector {
34 width: 100%; 30 width: 100%;
35 } 31 }
36 32
37 paper-spinner { 33 paper-spinner {
38 height: 20px; 34 height: 20px;
39 margin: 0 10px; 35 margin: 0 10px;
40 width: 20px; 36 width: 20px;
41 } 37 }
42 38
39 .dialog-message {
40 margin-bottom: 10px;
41 }
42
43 /* .display indicates a displayed pin code or passkey. */ 43 /* .display indicates a displayed pin code or passkey. */
44 span.display { 44 span.display {
45 border: 1px solid #ccc; 45 border: 1px solid #ccc;
46 border-radius: 4px; 46 border-radius: 4px;
47 box-shadow: 0 0 0 1px #222; 47 box-shadow: 0 0 0 1px #222;
48 color: #222; 48 color: #222;
49 font-size: 16px; 49 font-size: 16px;
50 height: 38px; 50 height: 38px;
51 line-height: 38px; 51 line-height: 38px;
52 margin: 0 5px; 52 margin: 0 5px;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 filter="deviceNotPaired_" observe="paired"> 92 filter="deviceNotPaired_" observe="paired">
93 <bluetooth-device-list-item device="[[item]]"> 93 <bluetooth-device-list-item device="[[item]]">
94 </bluetooth-device-list-item> 94 </bluetooth-device-list-item>
95 </template> 95 </template>
96 </iron-selector> 96 </iron-selector>
97 </div> 97 </div>
98 </template> 98 </template>
99 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> 99 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]">
100 <div id="pairing" class="settings-box first layout vertical center 100 <div id="pairing" class="settings-box first layout vertical center
101 center-justified"> 101 center-justified">
102 <div id="dialogMessage"> 102 <div class="dialog-message">
103 [[getMessage_(pairingDevice, pairingEvent)]] 103 [[getMessage_(pairingDevice, pairingEvent)]]
104 </div> 104 </div>
105 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> 105 <div hidden$="[[!showEnterPincode_(pairingEvent)]]">
106 <paper-input id="pincode" minlength="1" maxlength="16" 106 <paper-input id="pincode" minlength="1" maxlength="16"
107 type="text" auto-validate value="{{pinorpass}}"> 107 type="text" auto-validate value="{{pinorpass}}">
108 </paper-input> 108 </paper-input>
109 </div> 109 </div>
110 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> 110 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]">
111 <paper-input id="passkey" minlength="6" maxlength="6" type="text" 111 <paper-input id="passkey" minlength="6" maxlength="6" type="text"
112 auto-validate value="{{pinorpass}}"></paper-input> 112 auto-validate value="{{pinorpass}}"></paper-input>
113 </div> 113 </div>
114 <div id="pinDiv" class="layout horizontal center center-justified" 114 <div id="pinDiv" class="layout horizontal center center-justified"
115 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> 115 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]">
116 <template is="dom-repeat" items="[[digits]]"> 116 <template is="dom-repeat" items="[[digits]]">
117 <span class$="[[getPinClass_(pairingEvent, index)]]"> 117 <span class$="[[getPinClass_(pairingEvent, index)]]">
118 [[getPinDigit_(pairingEvent, index)]] 118 [[getPinDigit_(pairingEvent, index)]]
119 </span> 119 </span>
120 </template> 120 </template>
121 <span class$="[[getPinClass_(pairingEvent, -1)]]" 121 <span class$="[[getPinClass_(pairingEvent, -1)]]"
122 hidden="[[showAcceptReject_(pairingEvent)]]"> 122 hidden="[[showAcceptReject_(pairingEvent)]]">
123 $i18n{bluetoothEnterKey} 123 $i18n{bluetoothEnterKey}
124 </span> 124 </span>
125 </div> 125 </div>
126 </div> 126 </div>
127 </template> 127 </template>
128 <template is="dom-if" if="[[isDialogType_(dialogId, 'connectError')]]">
129 <div class="settings-box first layout vertical center
130 center-justified">
131 <div class="dialog-message">[[errorMessage]]</div>
132 </div>
133 </template>
128 </div> 134 </div>
129 <div class="button-container"> 135 <div class="button-container">
130 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]"> 136 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]">
131 <div id="scanning" class="layout horizontal center flex" 137 <div id="scanning" class="layout horizontal center flex"
132 hidden$="[[!adapterState.discovering]]"> 138 hidden$="[[!adapterState.discovering]]">
133 <paper-spinner active="[[adapterState.discovering]]"> 139 <paper-spinner active="[[adapterState.discovering]]">
134 </paper-spinner> 140 </paper-spinner>
135 <span>$i18n{bluetoothScanning}</span> 141 <span>$i18n{bluetoothScanning}</span>
136 </div> 142 </div>
137 <paper-button class="end-justified" on-tap="onCancelTap_"> 143 <paper-button class="end-justified" on-tap="onCancelTap_">
138 $i18n{cancel} 144 $i18n{cancel}
139 </paper-button> 145 </paper-button>
140 </template> 146 </template>
141 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> 147 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]">
142 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" 148 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]"
143 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> 149 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button>
144 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" 150 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]"
145 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> 151 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button>
146 <paper-button hidden$="[[!showConnect_(pairingEvent)]]" 152 <paper-button hidden$="[[!showConnect_(pairingEvent)]]"
147 disabled="[[!enableConnect_(pairingEvent, pinorpass)]]" 153 disabled="[[!enableConnect_(pairingEvent, pinorpass)]]"
148 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button> 154 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button>
149 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" 155 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]"
150 on-tap="onDismissTap_">$i18n{bluetoothDismiss}</paper-button> 156 on-tap="onDismissTap_">$i18n{bluetoothDismiss}</paper-button>
151 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]" 157 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]"
152 on-tap="onCancelTap_"> 158 on-tap="onCancelTap_">
153 $i18n{cancel} 159 $i18n{cancel}
154 </paper-button> 160 </paper-button>
155 </template> 161 </template>
162 <template is="dom-if" if="[[isDialogType_(dialogId, 'connectError')]]">
163 <paper-button on-tap="onDismissTap_">$i18n{bluetoothDismiss}
164 </paper-button>
165 </template>
156 </div> 166 </div>
157 </cr-dialog> 167 </cr-dialog>
158 </template> 168 </template>
159 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script> 169 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script>
160 </dom-module> 170 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698