mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
header/userpicture, header/profilelink, header/username components
This commit is contained in:
@@ -87,18 +87,20 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateHeader(picture, username, userslug) {
|
function updateHeader(picture, username, userslug) {
|
||||||
if (parseInt(ajaxify.data.theirid, 10) !== parseInt(ajaxify.data.yourid, 10)) {
|
require(['components'], function(components) {
|
||||||
return;
|
if (parseInt(ajaxify.data.theirid, 10) !== parseInt(ajaxify.data.yourid, 10)) {
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (picture) {
|
if (picture) {
|
||||||
$('#user-header-picture').attr('src', picture);
|
components.get('header/userpicture').attr('src', picture);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (username && userslug) {
|
if (username && userslug) {
|
||||||
$('#user-profile-link').attr('href', config.relative_path + '/user/' + userslug);
|
components.get('header/profilelink').attr('href', config.relative_path + '/user/' + userslug);
|
||||||
$('#user-header-name').text(username);
|
components.get('header/username').text(username);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleImageChange() {
|
function handleImageChange() {
|
||||||
|
|||||||
Reference in New Issue
Block a user