summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-07-16 08:55:37 -0700
committernickago <ngonella@calpoly.edu>2015-07-16 08:55:37 -0700
commit139f6611d6162158ea88c679aee710f7a6c76c49 (patch)
tree3ac9a0413a86773f4217b540f006d3f4053aa582 /web
parent463e89c280d50c017d8ca5baef5edf90ff9299a7 (diff)
downloadchat-139f6611d6162158ea88c679aee710f7a6c76c49.tar.gz
chat-139f6611d6162158ea88c679aee710f7a6c76c49.tar.bz2
chat-139f6611d6162158ea88c679aee710f7a6c76c49.zip
Added last updated for pictures
Diffstat (limited to 'web')
-rw-r--r--web/react/components/user_settings.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx
index 06d8d0208..b1ccd125a 100644
--- a/web/react/components/user_settings.jsx
+++ b/web/react/components/user_settings.jsx
@@ -820,6 +820,7 @@ var GeneralTab = React.createClass({
client.uploadProfileImage(formData,
function(data) {
this.submitActive = false;
+ AsyncClient.getMe();
window.location.reload();
}.bind(this),
function(err) {
@@ -989,7 +990,7 @@ var GeneralTab = React.createClass({
<SettingPicture
title="Profile Picture"
submit={this.submitPicture}
- src={"/api/v1/users/" + user.id + "/image"}
+ src={"/api/v1/users/" + user.id + "/image?time=" + user.last_picture_update}
server_error={server_error}
client_error={client_error}
updateSection={function(e){self.updateSection("");e.preventDefault();}}
@@ -1000,10 +1001,14 @@ var GeneralTab = React.createClass({
);
} else {
+ var minMessage = "Click Edit to upload an image.";
+ if (user.last_picture_update) {
+ minMessage = "Image last updated " + utils.displayDate(user.last_picture_update)
+ }
pictureSection = (
<SettingItemMin
title="Profile Picture"
- describe="Picture inside."
+ describe={minMessage}
updateSection={function(){self.updateSection("picture");}}
/>
);