diff --git a/src/app/components/kit/showKit/showKit.html b/src/app/components/kit/showKit/showKit.html index 58c2555b..668870fd 100644 --- a/src/app/components/kit/showKit/showKit.html +++ b/src/app/components/kit/showKit/showKit.html @@ -1,10 +1,10 @@
- +

Device not found, or it has been set to private. Contact us for more information.

- +
@@ -13,7 +13,7 @@
Visit user profile - + {{ vm.kit.owner.username}}
@@ -187,7 +187,7 @@
{{ vm.sensorNames[vm.selectedSensor] }}
- +
@@ -248,7 +248,7 @@

We empower communities to better understand their environment

- +
diff --git a/src/app/components/layout/layout.html b/src/app/components/layout/layout.html index 076b9fb1..127d89a9 100644 --- a/src/app/components/layout/layout.html +++ b/src/app/components/layout/layout.html @@ -42,7 +42,7 @@ Your profile - + @@ -67,7 +67,7 @@ - + diff --git a/src/app/components/myProfile/Users.html b/src/app/components/myProfile/Users.html index 03031656..f35d1210 100644 --- a/src/app/components/myProfile/Users.html +++ b/src/app/components/myProfile/Users.html @@ -2,7 +2,7 @@
- + CHANGE AVATAR
diff --git a/src/app/components/myProfile/myProfile.controller.js b/src/app/components/myProfile/myProfile.controller.js index 84bf519e..5cc6918f 100644 --- a/src/app/components/myProfile/myProfile.controller.js +++ b/src/app/components/myProfile/myProfile.controller.js @@ -238,15 +238,6 @@ function uploadAvatar(fileData) { if(fileData && fileData.length) { - /* - file.getCredentials(fileData[0].name) - .then(function(res) { - file.uploadFile(fileData[0], res.key, res.policy, res.signature) - .success(function() { - vm.user.avatar = file.getImageURL(res.key); - }); - }); - */ // TODO: Is there a simpler way to patch the image to the API and use the response? // Something like: diff --git a/src/app/components/myProfile/myProfile.html b/src/app/components/myProfile/myProfile.html index cc229648..496c964b 100644 --- a/src/app/components/myProfile/myProfile.html +++ b/src/app/components/myProfile/myProfile.html @@ -1,7 +1,7 @@
- +

{{ vm.user.username || 'No data' }}

diff --git a/src/app/components/userProfile/userProfile.html b/src/app/components/userProfile/userProfile.html index ae50cad5..fb4aa740 100644 --- a/src/app/components/userProfile/userProfile.html +++ b/src/app/components/userProfile/userProfile.html @@ -1,7 +1,7 @@
- +

{{ vm.user.username || 'No data' }}

diff --git a/src/app/core/constructors/user/user.constructor.js b/src/app/core/constructors/user/user.constructor.js index 971ad11e..01fd3625 100644 --- a/src/app/core/constructors/user/user.constructor.js +++ b/src/app/core/constructors/user/user.constructor.js @@ -9,7 +9,7 @@ * @param {Object} userData - User data sent from API * @property {number} id - User ID * @property {string} username - Username - * @property {string} avatar - Avatar URL of user + * @property {string} profile_picture - Avatar URL of user * @property {Array} kits - Kits that belongs to this user * @property {string} url - URL * @property {string} city - User city @@ -19,7 +19,6 @@ function User(userData) { this.id = userData.id; this.username = userData.username; - this.avatar = userData.avatar; this.profile_picture = userData.profile_picture; this.kits = userData.devices; this.url = userData.url; diff --git a/src/app/core/utils/kitUtils.service.js b/src/app/core/utils/kitUtils.service.js index eb3ef683..1f84124b 100644 --- a/src/app/core/utils/kitUtils.service.js +++ b/src/app/core/utils/kitUtils.service.js @@ -139,7 +139,7 @@ city: object.owner.location.city, country: COUNTRY_CODES[object.owner.location.country_code], url: object.owner.url, - avatar: object.owner.avatar + profile_picture: object.owner.profile_picture }; } diff --git a/src/app/core/utils/searchUtils.service.js b/src/app/core/utils/searchUtils.service.js index 356ec8bb..cb88a3fa 100644 --- a/src/app/core/utils/searchUtils.service.js +++ b/src/app/core/utils/searchUtils.service.js @@ -41,7 +41,7 @@ function parseIcon(object, type) { switch(type) { case 'User': - return object.avatar; + return object.profile_picture; case 'Device': return 'assets/images/kit.svg'; case 'Country':