parent
55d1625ab2
commit
711b5e1d91
@ -15,7 +15,6 @@ const templates = require("../views");
|
||||
const socket = require("./socket");
|
||||
require("./socket-events");
|
||||
const storage = require("./localStorage");
|
||||
require("./options");
|
||||
const utils = require("./utils");
|
||||
require("./autocompletion");
|
||||
require("./webpush");
|
||||
|
14
client/js/socket-events/configuration.js
Normal file
14
client/js/socket-events/configuration.js
Normal file
@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
const $ = require("jquery");
|
||||
const socket = require("../socket");
|
||||
const storage = require("../localStorage");
|
||||
const utils = require("../utils");
|
||||
const templates = require("../../views");
|
||||
|
||||
socket.on("configuration", function(data) {
|
||||
$("#settings").html(templates.windows.settings(data));
|
||||
$("#connect").html(templates.windows.connect(data));
|
||||
|
||||
require("../options");
|
||||
});
|
@ -18,3 +18,4 @@ require("./topic");
|
||||
require("./users");
|
||||
require("./sign_out");
|
||||
require("./sessions_list");
|
||||
require("./configuration");
|
||||
|
@ -145,7 +145,7 @@
|
||||
</div>
|
||||
|
||||
{{#unless public}}
|
||||
{{#unless ldap.enable}}
|
||||
{{#unless ldapEnabled}}
|
||||
<div id="change-password">
|
||||
<form action="" method="post">
|
||||
<div class="col-sm-12">
|
||||
|
@ -467,6 +467,22 @@ function initializeClient(socket, client, token, lastMessage) {
|
||||
}
|
||||
}
|
||||
|
||||
function getClientConfiguration() {
|
||||
const config = _.pick(Helper.config, [
|
||||
"public",
|
||||
"lockNetwork",
|
||||
"displayNetwork",
|
||||
"useHexIp",
|
||||
"defaults",
|
||||
"themes",
|
||||
"prefetch",
|
||||
]);
|
||||
|
||||
config.ldapEnabled = Helper.config.ldap.enable;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
function performAuthentication(data) {
|
||||
const socket = this;
|
||||
let client;
|
||||
@ -474,6 +490,8 @@ function performAuthentication(data) {
|
||||
const finalInit = () => initializeClient(socket, client, data.token || null, data.lastMessage || -1);
|
||||
|
||||
const initClient = () => {
|
||||
socket.emit("configuration", getClientConfiguration());
|
||||
|
||||
client.ip = getClientIp(socket);
|
||||
|
||||
// If webirc is enabled perform reverse dns lookup
|
||||
|
Loading…
Reference in New Issue
Block a user