summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-07-17 09:44:51 -0400
committerChristopher Speller <crspeller@gmail.com>2015-07-17 09:44:51 -0400
commitf49fccdee356d604a58ad0cddcc2fe5b7ebf5cc8 (patch)
treec4cd7d4be00788e68a7f7950945cf67fef7d2213 /web
parent3f328546f8af55f655290aefad245b0f3b049bcd (diff)
parent1fe86a004ef2a99c55a583b2b2b0bf1c40b6afe3 (diff)
downloadchat-f49fccdee356d604a58ad0cddcc2fe5b7ebf5cc8.tar.gz
chat-f49fccdee356d604a58ad0cddcc2fe5b7ebf5cc8.tar.bz2
chat-f49fccdee356d604a58ad0cddcc2fe5b7ebf5cc8.zip
Merge pull request #196 from nickago/MM-1058
MM-1058 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 17afadce2..38e4b1aea 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");}}
/>
);