| OLD | NEW |
| 1 <!-- TODO(crbug.com/603217): Use i18n instead of string literals. Figure out | 1 <!-- TODO(crbug.com/603217): Use i18n instead of string literals. Figure out |
| 2 what i18n to use for keypad, ie, does 1 ABC make | 2 what i18n to use for keypad, ie, does 1 ABC make |
| 3 sense in every scenario? --> | 3 sense in every scenario? --> |
| 4 | 4 |
| 5 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 5 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 6 <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> |
| 7 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 7 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| 8 <link rel="import" href="chrome://resources/html/polymer.html"> | 8 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 .row { | 52 .row { |
| 53 display: flex; | 53 display: flex; |
| 54 } | 54 } |
| 55 | 55 |
| 56 .digit-button { | 56 .digit-button { |
| 57 align-items: center; | 57 align-items: center; |
| 58 background: none; | 58 background: none; |
| 59 border-radius: 0; | 59 border-radius: 0; |
| 60 box-sizing: border-box; | 60 box-sizing: border-box; |
| 61 color: #000; | |
| 62 display: flex; | 61 display: flex; |
| 63 flex-direction: column; | 62 flex-direction: column; |
| 64 font-size: 18px; | |
| 65 height: 48px; | 63 height: 48px; |
| 66 justify-content: center; | 64 justify-content: center; |
| 67 margin: 0; | 65 margin: 15px; |
| 68 min-height: 48px; | 66 min-height: 48px; |
| 69 min-width: 48px; | 67 min-width: 48px; |
| 70 opacity: 0.87; | 68 opacity: 1; |
| 71 padding: 15px 21px; | 69 width: 48px; |
| 72 width: 60px; | |
| 73 } | 70 } |
| 74 | 71 |
| 75 [hidden=true] { | 72 [hidden=true] { |
| 76 display: none; | 73 display: none; |
| 77 } | 74 } |
| 78 | 75 |
| 79 .first-row { | 76 .first-row { |
| 80 height: 43px; | 77 display: none; |
| 81 } | 78 } |
| 82 | 79 |
| 83 .bottom-row { | 80 .bottom-row { |
| 84 margin-bottom: 6px; | 81 margin-bottom: 6px; |
| 85 } | 82 } |
| 86 | 83 |
| 87 .top-row { | 84 .top-row { |
| 88 margin-top: 6px; | 85 margin-top: 6px; |
| 89 } | 86 } |
| 90 | 87 |
| 91 .backspace-button-container { | 88 .backspace-button-container { |
| 92 position: relative; | 89 position: relative; |
| 93 } | 90 } |
| 94 | 91 |
| 95 .backspace-button-container paper-ripple { | 92 .backspace-button-container paper-ripple { |
| 96 position: absolute; | 93 position: absolute; |
| 97 top: 0; | 94 top: 0; |
| 98 } | 95 } |
| 99 | 96 |
| 100 paper-ripple { | 97 paper-ripple { |
| 101 border-radius: 100px; | 98 border-radius: 100px; |
| 102 color: #000; | 99 color: #000; |
| 103 height: 48px; | 100 height: 48px; |
| 104 left: 6px; | |
| 105 width: 48px; | 101 width: 48px; |
| 106 } | 102 } |
| 107 | 103 |
| 108 .digit-button.backspace-button { | 104 .digit-button.backspace-button { |
| 105 color: #FFF; |
| 109 left: 0; | 106 left: 0; |
| 110 opacity: var(--dark-primary-opacity); | |
| 111 padding: 14px; | 107 padding: 14px; |
| 112 position: absolute; | 108 position: absolute; |
| 113 top: 0; | 109 top: 0; |
| 114 } | 110 } |
| 115 | 111 |
| 116 .digit-button.backspace-button:not([has-content]) { | 112 .digit-button.backspace-button:not([has-content]) { |
| 117 color: #000; | 113 color: #000; |
| 118 opacity: 0.26; | 114 opacity: 0.26; |
| 119 } | 115 } |
| 120 | 116 |
| 121 .digit-button inner-text { | 117 .digit-button inner-text { |
| 122 color: var(--paper-blue-grey-700); | |
| 123 display: flex; | 118 display: flex; |
| 124 flex-direction: column; | 119 flex-direction: column; |
| 120 font-family: 'Roboto'; |
| 121 } |
| 122 |
| 123 .number { |
| 124 color: #FFF; |
| 125 font-size: 20px; |
| 125 height: 52px; | 126 height: 52px; |
| 126 } | 127 } |
| 127 | 128 |
| 129 .letter { |
| 130 color: rgba(255, 255, 255, .34); |
| 131 font-size: 9px; |
| 132 margin-top: 4px; |
| 133 } |
| 134 |
| 128 #pinInput { | 135 #pinInput { |
| 129 background-color: white; | 136 background-color: white; |
| 130 border: 0; | 137 border: 0; |
| 131 box-sizing: border-box; | 138 box-sizing: border-box; |
| 132 font-face: Roboto-Regular; | 139 font-face: Roboto-Regular; |
| 133 font-size: 13px; | 140 font-size: 13px; |
| 134 height: 43px; | 141 height: 43px; |
| 135 left: 10px; | 142 left: 10px; |
| 136 opacity: var(--dark-secondary-opacity); | 143 opacity: var(--dark-secondary-opacity); |
| 137 outline: 0; | 144 outline: 0; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 <div class="row first-row"> | 182 <div class="row first-row"> |
| 176 <paper-input id="pinInput" type="password" no-label-float | 183 <paper-input id="pinInput" type="password" no-label-float |
| 177 value="[[value]]" | 184 value="[[value]]" |
| 178 is-input-rtl$="[[isInputRtl_(value)]]" | 185 is-input-rtl$="[[isInputRtl_(value)]]" |
| 179 has-content$="[[hasInput_(value)]]" | 186 has-content$="[[hasInput_(value)]]" |
| 180 label="[[getInputPlaceholder_(enablePassword)]]" | 187 label="[[getInputPlaceholder_(enablePassword)]]" |
| 181 on-keydown="onInputKeyDown_" | 188 on-keydown="onInputKeyDown_" |
| 182 hidden="[[!showPinInput_]]"> | 189 hidden="[[!showPinInput_]]"> |
| 183 </paper-input> | 190 </paper-input> |
| 184 </div> | 191 </div> |
| 185 <div class="separator" hidden="[[showPinInput_]]"></div> | |
| 186 <div class="row keyboard"> | 192 <div class="row keyboard"> |
| 187 <paper-button class="digit-button" on-tap="onNumberTap_" value="1" | 193 <paper-button class="digit-button" on-tap="onNumberTap_" value="1" |
| 188 noink> | 194 noink> |
| 189 <inner-text>$i18n{pinKeyboard1}</inner-text> | 195 <inner-text class="number">$i18n{pinKeyboard1}</inner-text> |
| 190 <paper-ripple> | 196 <paper-ripple> |
| 191 </paper-button> | 197 </paper-button> |
| 192 <paper-button class="digit-button" on-tap="onNumberTap_" value="2" | 198 <paper-button class="digit-button" on-tap="onNumberTap_" value="2" |
| 193 noink> | 199 noink> |
| 194 <inner-text>$i18n{pinKeyboard2}</inner-text> | 200 <inner-text class="number">$i18n{pinKeyboard2}</inner-text> |
| 201 <inner-text class="letter">ABC</inner-text> |
| 195 <paper-ripple> | 202 <paper-ripple> |
| 196 </paper-button> | 203 </paper-button> |
| 197 <paper-button class="digit-button" on-tap="onNumberTap_" value="3" | 204 <paper-button class="digit-button" on-tap="onNumberTap_" value="3" |
| 198 noink> | 205 noink> |
| 199 <inner-text>$i18n{pinKeyboard3}</inner-text> | 206 <inner-text class="number">$i18n{pinKeyboard3}</inner-text> |
| 207 <inner-text class="letter">DEF</inner-text> |
| 200 <paper-ripple> | 208 <paper-ripple> |
| 201 </paper-button> | 209 </paper-button> |
| 202 </div> | 210 </div> |
| 203 <div class="row keyboard"> | 211 <div class="row keyboard"> |
| 204 <paper-button class="digit-button" on-tap="onNumberTap_" value="4" | 212 <paper-button class="digit-button" on-tap="onNumberTap_" value="4" |
| 205 noink> | 213 noink> |
| 206 <inner-text>$i18n{pinKeyboard4}</inner-text> | 214 <inner-text class="number">$i18n{pinKeyboard4}</inner-text> |
| 215 <inner-text class="letter">GHI</inner-text> |
| 207 <paper-ripple> | 216 <paper-ripple> |
| 208 </paper-button> | 217 </paper-button> |
| 209 <paper-button class="digit-button" on-tap="onNumberTap_" value="5" | 218 <paper-button class="digit-button" on-tap="onNumberTap_" value="5" |
| 210 noink> | 219 noink> |
| 211 <inner-text>$i18n{pinKeyboard5}</inner-text> | 220 <inner-text class="number">$i18n{pinKeyboard5}</inner-text> |
| 221 <inner-text class="letter">JKL</inner-text> |
| 212 <paper-ripple> | 222 <paper-ripple> |
| 213 </paper-button> | 223 </paper-button> |
| 214 <paper-button class="digit-button" on-tap="onNumberTap_" value="6" | 224 <paper-button class="digit-button" on-tap="onNumberTap_" value="6" |
| 215 noink> | 225 noink> |
| 216 <inner-text>$i18n{pinKeyboard6}</inner-text> | 226 <inner-text class="number">$i18n{pinKeyboard6}</inner-text> |
| 227 <inner-text class="letter">MNO</inner-text> |
| 217 <paper-ripple> | 228 <paper-ripple> |
| 218 </paper-button> | 229 </paper-button> |
| 219 </div> | 230 </div> |
| 220 <div class="row keyboard"> | 231 <div class="row keyboard"> |
| 221 <paper-button class="digit-button" on-tap="onNumberTap_" value="7" | 232 <paper-button class="digit-button" on-tap="onNumberTap_" value="7" |
| 222 noink> | 233 noink> |
| 223 <inner-text>$i18n{pinKeyboard7}</inner-text> | 234 <inner-text class="number">$i18n{pinKeyboard7}</inner-text> |
| 235 <inner-text class="letter">PQRS</inner-text> |
| 224 <paper-ripple> | 236 <paper-ripple> |
| 225 </paper-button> | 237 </paper-button> |
| 226 <paper-button class="digit-button" on-tap="onNumberTap_" value="8" | 238 <paper-button class="digit-button" on-tap="onNumberTap_" value="8" |
| 227 noink> | 239 noink> |
| 228 <inner-text>$i18n{pinKeyboard8}</inner-text> | 240 <inner-text class="number">$i18n{pinKeyboard8}</inner-text> |
| 241 <inner-text class="letter">TUV</inner-text> |
| 229 <paper-ripple> | 242 <paper-ripple> |
| 230 </paper-button> | 243 </paper-button> |
| 231 <paper-button class="digit-button" on-tap="onNumberTap_" value="9" | 244 <paper-button class="digit-button" on-tap="onNumberTap_" value="9" |
| 232 noink> | 245 noink> |
| 233 <inner-text>$i18n{pinKeyboard9}</inner-text> | 246 <inner-text class="number">$i18n{pinKeyboard9}</inner-text> |
| 247 <inner-text class="letter">WXYZ</inner-text> |
| 234 <paper-ripple> | 248 <paper-ripple> |
| 235 </paper-button> | 249 </paper-button> |
| 236 </div> | 250 </div> |
| 237 <div class="row keyboard bottom-row"> | 251 <div class="row keyboard bottom-row"> |
| 238 <div class="digit-button"></div> | 252 <div class="digit-button"></div> |
| 239 <paper-button class="digit-button" on-tap="onNumberTap_" value="0" | 253 <paper-button class="digit-button" on-tap="onNumberTap_" value="0" |
| 240 noink> | 254 noink> |
| 241 <inner-text>$i18n{pinKeyboard0}</inner-text> | 255 <inner-text class="number">$i18n{pinKeyboard0}</inner-text> |
| 256 <inner-text class="letter">+</inner-text> |
| 242 <paper-ripple> | 257 <paper-ripple> |
| 243 </paper-button> | 258 </paper-button> |
| 244 <div class="backspace-button-container"> | 259 <div class="backspace-button-container"> |
| 245 <paper-icon-button class="digit-button backspace-button" | 260 <paper-icon-button class="digit-button backspace-button" |
| 246 has-content$="[[hasInput_(value)]]" | 261 has-content$="[[hasInput_(value)]]" |
| 247 icon="pin-keyboard:backspace" | 262 icon="pin-keyboard:backspace" |
| 248 on-pointerdown="onBackspacePointerDown_" | 263 on-pointerdown="onBackspacePointerDown_" |
| 249 on-pointerout="onBackspacePointerOut_" | 264 on-pointerout="onBackspacePointerOut_" |
| 250 on-pointerup="onBackspacePointerUp_" | 265 on-pointerup="onBackspacePointerUp_" |
| 251 aria-label="$i18n{pinKeyboardDeleteAccessibleName}" | 266 aria-label="$i18n{pinKeyboardDeleteAccessibleName}" |
| 252 noink> | 267 noink> |
| 253 </paper-icon-button> | 268 </paper-icon-button> |
| 254 <paper-ripple> | 269 <paper-ripple> |
| 255 </div> | 270 </div> |
| 256 </div> | 271 </div> |
| 257 </div> | 272 </div> |
| 258 </div> | 273 </div> |
| 259 </template> | 274 </template> |
| 260 <script src="pin_keyboard.js"></script> | 275 <script src="pin_keyboard.js"></script> |
| 261 </dom-module> | 276 </dom-module> |
| OLD | NEW |