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

Unified Diff: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js

Issue 2100203003: Pin keyboard matches red lines (go/cros-quick-unlock-ux). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
index dfc111d4c5fcd7c32df8aa1e7a95762d0894bfbb..8827527fbb507e6b5ff9f4ea6313039e36937b5a 100644
--- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
+++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -51,6 +51,12 @@ Polymer({
this.fire('submit', { pin: this.value });
},
+ /** Changes the color of the submit button if PIN is ready. */
+ changeSubmitColor_: function(pinLength) {
+ var button = this.querySelectorAll('.submit-button .icon-container')[0];
+ button.classList.toggle('ready-background', pinLength > 0);
+ },
+
/**
* Fires an update event with the current PIN value. The event will only be
* fired if the PIN value has actually changed.
@@ -58,8 +64,10 @@ Polymer({
* @param {string} previous
*/
onPinValueChange_: function(value, previous) {
- if (value != previous)
+ if (value != previous) {
this.fire('pin-change', { pin: value });
+ this.changeSubmitColor_(value.length);
jdufault 2016/06/27 19:17:52 The color should only be blue if value.length > 0,
+ }
},
/** Called when the user wants to erase the last character of the entered

Powered by Google App Engine
This is Rietveld 408576698