2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

UX: skip the modal and refresh the app when selecting an avatar

This commit is contained in:
Régis Hanol 2018-07-20 00:37:57 +02:00
parent dbcf4e2474
commit f83a687551
2 changed files with 2 additions and 11 deletions

View file

@ -51,11 +51,7 @@ export default RestrictedUserRoute.extend({
user user
.selectAvatar(url) .selectAvatar(url)
.then(() => { .then(() => window.location.reload())
bootbox.alert(I18n.t("user.change_avatar.cache_notice"), () =>
window.location.reload()
);
})
.catch(popupAjaxError); .catch(popupAjaxError);
}, },
@ -70,11 +66,7 @@ export default RestrictedUserRoute.extend({
user user
.pickAvatar(selectedUploadId, type, selectedAvatarTemplate) .pickAvatar(selectedUploadId, type, selectedAvatarTemplate)
.then(() => { .then(() => window.location.reload())
bootbox.alert(I18n.t("user.change_avatar.cache_notice"), () =>
window.location.reload()
);
})
.catch(popupAjaxError); .catch(popupAjaxError);
} }
} }

View file

@ -797,7 +797,6 @@ en:
upload_title: "Upload your picture" upload_title: "Upload your picture"
upload_picture: "Upload Picture" upload_picture: "Upload Picture"
image_is_not_a_square: "Warning: we've cropped your image; width and height were not equal." image_is_not_a_square: "Warning: we've cropped your image; width and height were not equal."
cache_notice: "You've successfully changed your profile picture but it might take some time to appear due to browser caching."
change_profile_background: change_profile_background:
title: "Profile Background" title: "Profile Background"