From 1c9d4a7492f5850c2eb0c4d2b58dbad9ee10effb Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Thu, 4 Oct 2012 23:19:20 -0700 Subject: [PATCH] accounts-ui: support changing password, and some misc reorg - If you're using accounts-password, or you are using more than one oauth provider, show a dropdown instead of the logout button. (This means that loginButtons either always shows a dropdown or never) - If you have a username or email set, show "Change password" and "Logout" in the dropdown. - If you don't have a username or email set, just show "Logout" While at it, refactored some code I touched. --- .../accounts-password/passwords_common.js | 2 +- .../accounts-ui-unstyled/login_buttons.html | 69 +++- .../accounts-ui-unstyled/login_buttons.js | 299 ++++++++++++------ .../login_buttons_images.css | 8 +- packages/accounts-ui/login_buttons.less | 9 +- 5 files changed, 271 insertions(+), 116 deletions(-) diff --git a/packages/accounts-password/passwords_common.js b/packages/accounts-password/passwords_common.js index 69ae38975d..7ad0470e16 100644 --- a/packages/accounts-password/passwords_common.js +++ b/packages/accounts-password/passwords_common.js @@ -1 +1 @@ -Accounts.passwords = {}; +Accounts.password = {}; diff --git a/packages/accounts-ui-unstyled/login_buttons.html b/packages/accounts-ui-unstyled/login_buttons.html index 5538f45028..82f58fbdcd 100644 --- a/packages/accounts-ui-unstyled/login_buttons.html +++ b/packages/accounts-ui-unstyled/login_buttons.html @@ -1,14 +1,11 @@ + + + +