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

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

Issue 2218713002: MD Settings: Bluetooth polish (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clang fixes + cleanup Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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">
(...skipping 22 matching lines...) Expand all
33 paper-spinner { 33 paper-spinner {
34 height: 20px; 34 height: 20px;
35 margin: 0 10px; 35 margin: 0 10px;
36 width: 20px; 36 width: 20px;
37 } 37 }
38 38
39 .dialog-message { 39 .dialog-message {
40 margin-bottom: 10px; 40 margin-bottom: 10px;
41 } 41 }
42 42
43 div.contents {
44 max-height: 250px;
45 min-height: 250px;
46 }
47
43 /* .display indicates a displayed pin code or passkey. */ 48 /* .display indicates a displayed pin code or passkey. */
44 span.display { 49 span.display {
45 border: 1px solid #ccc; 50 border: 1px solid #ccc;
46 border-radius: 4px; 51 border-radius: 4px;
47 box-shadow: 0 0 0 1px #222; 52 box-shadow: 0 0 0 1px #222;
48 color: #222; 53 color: #222;
49 font-size: 16px; 54 font-size: 16px;
50 height: 38px; 55 height: 38px;
51 line-height: 38px; 56 line-height: 38px;
52 margin: 0 5px; 57 margin: 0 5px;
(...skipping 19 matching lines...) Expand all
72 span.confirm { 77 span.confirm {
73 color: #999; 78 color: #999;
74 font-size: 20px; 79 font-size: 20px;
75 font-weight: 600; /* semibold */ 80 font-weight: 600; /* semibold */
76 margin: 0 20px; 81 margin: 0 20px;
77 } 82 }
78 </style> 83 </style>
79 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_"> 84 <dialog is="cr-dialog" id="dialog" on-cancel="onDialogCanceled_">
80 <div class="title">[[getTitle_(dialogId)]]</div> 85 <div class="title">[[getTitle_(dialogId)]]</div>
81 <div class="body"> 86 <div class="body">
82 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]"> 87 <div class="contents layout vertical center center-justified">
83 <div id="dialogDeviceList" class="layout vertical" 88 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]">
84 on-device-event="onDeviceEvent_"> 89 <div id="dialogDeviceList"
85 <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]"> 90 class="layout vertical flex start self-stretch"
86 $i18n{bluetoothNoDevices} 91 on-device-event="onDeviceEvent_">
87 </span> 92 <span class="no-devices" hidden$="[[haveDevices_(deviceList)]]">
88 <iron-selector class="flex"> 93 $i18n{bluetoothNoDevices}
89 <template is="dom-repeat" items="[[deviceList]]" 94 </span>
90 filter="deviceNotPaired_" observe="paired"> 95 <iron-selector class="flex">
91 <bluetooth-device-list-item device="[[item]]"> 96 <template is="dom-repeat" items="[[deviceList]]"
92 </bluetooth-device-list-item> 97 filter="deviceNotPaired_" observe="paired">
93 </template> 98 <bluetooth-device-list-item device="[[item]]">
94 </iron-selector> 99 </bluetooth-device-list-item>
95 </div> 100 </template>
96 </template> 101 </iron-selector>
97 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]">
98 <div id="pairing" class="settings-box first layout vertical center
99 center-justified">
100 <div class="dialog-message">
101 [[getMessage_(pairingDevice, pairingEvent)]]
102 </div> 102 </div>
103 <div hidden$="[[!showEnterPincode_(pairingEvent)]]"> 103 </template>
104 <paper-input id="pincode" minlength="1" maxlength="16" 104 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]">
105 type="text" auto-validate value="{{pinOrPass}}"> 105 <div id="pairing" class="settings-box first layout vertical center
106 </paper-input> 106 center-justified">
107 <div class="dialog-message">
108 [[getMessage_(pairingDevice, pairingEvent)]]
109 </div>
110 <div hidden$="[[!showEnterPincode_(pairingEvent)]]">
111 <paper-input id="pincode" minlength="1" maxlength="16"
112 type="text" auto-validate value="{{pinOrPass}}">
113 </paper-input>
114 </div>
115 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]">
116 <paper-input id="passkey" minlength="6" maxlength="6"
117 type="text" auto-validate value="{{pinOrPass}}">
118 </paper-input>
119 </div>
120 <div id="pinDiv" class="layout horizontal center center-justified"
121 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]">
122 <template is="dom-repeat" items="[[digits]]">
123 <span class$="[[getPinClass_(index, pairingEvent)]]">
124 [[getPinDigit_(index, pairingEvent)]]
125 </span>
126 </template>
127 <span class$="[[getPinClass_(-1, pairingEvent)]]"
128 hidden="[[showAcceptReject_(pairingEvent)]]">
129 $i18n{bluetoothEnterKey}
130 </span>
131 </div>
107 </div> 132 </div>
108 <div hidden$="[[!showEnterPasskey_(pairingEvent)]]"> 133 </template>
109 <paper-input id="passkey" minlength="6" maxlength="6" type="text" 134 <template is="dom-if"
110 auto-validate value="{{pinOrPass}}"></paper-input> 135 if="[[isDialogType_('connectError', dialogId)]]">
136 <div class="settings-box first layout vertical center
137 center-justified">
138 <div class="dialog-message">[[errorMessage]]</div>
111 </div> 139 </div>
112 <div id="pinDiv" class="layout horizontal center center-justified" 140 </template>
113 hidden="[[!showDisplayPassOrPin_(pairingEvent)]]"> 141 </div>
114 <template is="dom-repeat" items="[[digits]]">
115 <span class$="[[getPinClass_(pairingEvent, index)]]">
116 [[getPinDigit_(pairingEvent, index)]]
117 </span>
118 </template>
119 <span class$="[[getPinClass_(pairingEvent, -1)]]"
120 hidden="[[showAcceptReject_(pairingEvent)]]">
121 $i18n{bluetoothEnterKey}
122 </span>
123 </div>
124 </div>
125 </template>
126 <template is="dom-if" if="[[isDialogType_(dialogId, 'connectError')]]">
127 <div class="settings-box first layout vertical center
128 center-justified">
129 <div class="dialog-message">[[errorMessage]]</div>
130 </div>
131 </template>
132 </div> 142 </div>
133 <div class="button-container"> 143 <div class="button-container">
134 <template is="dom-if" if="[[isDialogType_(dialogId, 'addDevice')]]"> 144 <template is="dom-if" if="[[isDialogType_('addDevice', dialogId)]]">
135 <div id="scanning" class="layout horizontal center flex" 145 <div id="scanning" class="layout horizontal center flex"
136 hidden$="[[!adapterState.discovering]]"> 146 hidden$="[[!adapterState.discovering]]">
137 <paper-spinner active="[[adapterState.discovering]]"> 147 <paper-spinner active="[[adapterState.discovering]]">
138 </paper-spinner> 148 </paper-spinner>
139 <span>$i18n{bluetoothScanning}</span> 149 <span>$i18n{bluetoothScanning}</span>
140 </div> 150 </div>
141 <paper-button class="end-justified" on-tap="onCancelTap_"> 151 <paper-button class="end-justified" on-tap="onCancelTap_">
142 $i18n{cancel} 152 $i18n{cancel}
143 </paper-button> 153 </paper-button>
144 </template> 154 </template>
145 <template is="dom-if" if="[[isDialogType_(dialogId, 'pairDevice')]]"> 155 <template is="dom-if" if="[[isDialogType_('pairDevice', dialogId)]]">
146 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" 156 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]"
147 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button> 157 on-tap="onAcceptTap_">$i18n{bluetoothAccept}</paper-button>
148 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]" 158 <paper-button hidden$="[[!showAcceptReject_(pairingEvent)]]"
149 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button> 159 on-tap="onRejectTap_">$i18n{bluetoothReject}</paper-button>
150 <paper-button hidden$="[[!showConnect_(pairingEvent)]]" 160 <paper-button hidden$="[[!showConnect_(pairingEvent)]]"
151 disabled="[[!enableConnect_(pairingEvent, pinOrPass)]]" 161 disabled="[[!enableConnect_(pairingEvent, pinOrPass)]]"
152 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button> 162 on-tap="onConnectTap_">$i18n{bluetoothConnect}</paper-button>
153 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]" 163 <paper-button hidden$="[[!showDismiss_(pairingDevice, pairingEvent)]]"
154 on-tap="close">$i18n{bluetoothDismiss}</paper-button> 164 on-tap="close">$i18n{bluetoothDismiss}</paper-button>
155 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]" 165 <paper-button hidden$="[[showDismiss_(pairingDevice, pairingEvent)]]"
156 on-tap="onCancelTap_"> 166 on-tap="onCancelTap_">
157 $i18n{cancel} 167 $i18n{cancel}
158 </paper-button> 168 </paper-button>
159 </template> 169 </template>
160 <template is="dom-if" if="[[isDialogType_(dialogId, 'connectError')]]"> 170 <template is="dom-if" if="[[isDialogType_('connectError', dialogId)]]">
161 <paper-button on-tap="close">$i18n{bluetoothDismiss} 171 <paper-button on-tap="close">$i18n{bluetoothDismiss}
162 </paper-button> 172 </paper-button>
163 </template> 173 </template>
164 </div> 174 </div>
165 </dialog> 175 </dialog>
166 </template> 176 </template>
167 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script> 177 <script src="/bluetooth_page/bluetooth_device_dialog.js"></script>
168 </dom-module> 178 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698