From 46cc69153482a6138e1057ece9cec836dd95451e Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Mon, 8 Jun 2015 11:47:06 +0200 Subject: [PATCH] Re-factor the avatar system and support avatar uploads The user is now able to upload an avatar, and pick one in a list. This functionality should eventually be abstracted in a community package but we still need to work on a great public API. We rely on collectionFS to manage uploaded avatars. We also removed bengott:avatar which was trying to solve the wrong problem (namely displaying the avatar, which is as simple as displaying an image), and not a avatar system as it should be. Gravatar support is coming (back) soon. We may also want to have a list of default fun avatars the user can choose instead of uploading its own one. --- .jshintrc | 1 + .meteor/packages | 1 - .meteor/versions | 5 -- client/components/activities/templates.html | 6 +- client/components/cards/details.jade | 4 +- client/components/cards/events.js | 4 +- client/components/cards/minicard.jade | 2 +- client/components/cards/templates.html | 6 +- client/components/forms/forms.styl | 3 + client/components/lists/main.js | 2 +- client/components/main/popup.styl | 74 +--------------- client/components/sidebar/sidebar.jade | 8 +- client/components/sidebar/sidebarFilters.jade | 2 +- client/components/users/userAvatar.jade | 38 +++++++-- client/components/users/userAvatar.js | 84 +++++++++++++++++-- client/components/users/userHeader.jade | 4 +- client/components/users/userProfile.html | 79 ----------------- client/components/users/userProfile.js | 31 ------- client/config/avatar.js | 3 - collections/avatars.js | 27 ++++++ collections/users.js | 1 + server/publications/avatars.js | 3 + 22 files changed, 161 insertions(+), 227 deletions(-) delete mode 100644 client/components/users/userProfile.html delete mode 100644 client/components/users/userProfile.js delete mode 100644 client/config/avatar.js create mode 100644 collections/avatars.js create mode 100644 server/publications/avatars.js diff --git a/.jshintrc b/.jshintrc index 0fba31969..23a246452 100644 --- a/.jshintrc +++ b/.jshintrc @@ -55,6 +55,7 @@ "SubsManager": false, "Mousetrap": false, "Avatar": true, + "Avatars": true, "Ps": true, "Presence": true, "Presences": true, diff --git a/.meteor/packages b/.meteor/packages index 8509d2ecd..87d21d6c0 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -46,7 +46,6 @@ tmeasday:presence underscore # UI components -bengott:avatar fortawesome:fontawesome linto:jquery-ui mousetrap:mousetrap diff --git a/.meteor/versions b/.meteor/versions index 46ab71d10..5fe0a8418 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -6,7 +6,6 @@ alethes:pages@1.8.4 audit-argument-checks@1.0.3 autoupdate@1.2.1 base64@1.0.3 -bengott:avatar@0.7.6 binary-heap@1.0.3 blaze@2.1.2 blaze-tools@1.0.3 @@ -52,9 +51,6 @@ iron:location@1.0.9 iron:middleware-stack@1.0.9 iron:router@1.0.9 iron:url@1.0.9 -jparker:crypto-core@0.1.0 -jparker:crypto-md5@0.1.1 -jparker:gravatar@0.3.1 jquery@1.11.3_2 json@1.0.3 kenton:accounts-sandstorm@0.1.3 @@ -107,7 +103,6 @@ softwarerero:accounts-t9n@1.0.9 spacebars@1.0.6 spacebars-compiler@1.0.6 srp@1.0.3 -stylus@1.0.7 tap:i18n@1.4.1 templating@1.1.1 tmeasday:presence@1.0.6 diff --git a/client/components/activities/templates.html b/client/components/activities/templates.html index 8d3ff7639..5a595a36d 100644 --- a/client/components/activities/templates.html +++ b/client/components/activities/templates.html @@ -1,7 +1,7 @@