mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
added app.uid
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
var socket,
|
var socket,
|
||||||
config,
|
config,
|
||||||
app = {};
|
app = {
|
||||||
|
'username': null,
|
||||||
|
'uid': null
|
||||||
|
};
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var showWelcomeMessage = false;
|
var showWelcomeMessage = false;
|
||||||
|
|
||||||
|
|
||||||
app.loadConfig = function() {
|
app.loadConfig = function() {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -24,6 +28,8 @@ var socket,
|
|||||||
|
|
||||||
socket.on('event:connect', function (data) {
|
socket.on('event:connect', function (data) {
|
||||||
app.username = data.username;
|
app.username = data.username;
|
||||||
|
app.uid = data.uid;
|
||||||
|
|
||||||
app.showLoginMessage();
|
app.showLoginMessage();
|
||||||
socket.emit('api:updateHeader', {
|
socket.emit('api:updateHeader', {
|
||||||
fields: ['username', 'picture', 'userslug']
|
fields: ['username', 'picture', 'userslug']
|
||||||
|
|||||||
Reference in New Issue
Block a user