mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-21 06:52:59 +01:00
committed by
Julian Lam
parent
6e0a36909d
commit
0be557b846
@@ -1,23 +1,26 @@
|
||||
'use strict';
|
||||
/* globals define, app, config, ajaxify, socket, bootbox, translator */
|
||||
/* globals define, app, config, ajaxify, socket, bootbox, templates */
|
||||
|
||||
define('forum/account/header', [
|
||||
'coverPhoto',
|
||||
'uploader',
|
||||
'components'
|
||||
], function(coverPhoto, uploader, components) {
|
||||
var AccountHeader = {},
|
||||
yourid,
|
||||
theirid;
|
||||
'components',
|
||||
'translator'
|
||||
], function(coverPhoto, uploader, components, translator) {
|
||||
var AccountHeader = {};
|
||||
var yourid;
|
||||
var theirid;
|
||||
var isAdminOrSelfOrGlobalMod;
|
||||
|
||||
AccountHeader.init = function() {
|
||||
yourid = ajaxify.data.yourid;
|
||||
theirid = ajaxify.data.theirid;
|
||||
isAdminOrSelfOrGlobalMod = ajaxify.data.isAdmin || ajaxify.data.isSelf || ajaxify.data.isGlobalModerator;
|
||||
|
||||
hidePrivateLinks();
|
||||
selectActivePill();
|
||||
|
||||
if (parseInt(yourid, 10) === parseInt(theirid, 10)) {
|
||||
if (isAdminOrSelfOrGlobalMod) {
|
||||
setupCoverPhoto();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user