mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	user settings: Display avatar source.
This makes it easier for users to tell how Zulip ended up with an avatar for them without them uploading one: through the Gravatar service used across many Wordpress blogs. Fixes #8225.
This commit is contained in:
		@@ -311,6 +311,8 @@ exports.set_up = function () {
 | 
			
		||||
            form_data.append('file-'+i, file);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $("#user-avatar-source").hide();
 | 
			
		||||
 | 
			
		||||
        var spinner = $("#upload_avatar_spinner").expectOne();
 | 
			
		||||
        loading.make_indicator(spinner, {text: 'Uploading avatar.'});
 | 
			
		||||
 | 
			
		||||
@@ -324,6 +326,12 @@ exports.set_up = function () {
 | 
			
		||||
                loading.destroy_indicator($("#upload_avatar_spinner"));
 | 
			
		||||
                $("#user-settings-avatar").expectOne().attr("src", data.avatar_url);
 | 
			
		||||
                $("#user_avatar_delete_button").show();
 | 
			
		||||
                $("#user-avatar-source").hide();
 | 
			
		||||
            },
 | 
			
		||||
            error: function () {
 | 
			
		||||
                if (page_params.avatar_source === 'G') {
 | 
			
		||||
                    $("#user-avatar-source").show();
 | 
			
		||||
                }
 | 
			
		||||
            },
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user