Fixed URL connect parameters
This commit is contained in:
parent
ab43c97e1b
commit
63a5974390
6 changed files with 27 additions and 37 deletions
|
@ -1,4 +1,7 @@
|
||||||
# Changelog:
|
# Changelog:
|
||||||
|
* **3.12.18**
|
||||||
|
- Fixed url connect parameters
|
||||||
|
|
||||||
* **2.12.18**
|
* **2.12.18**
|
||||||
- Fixed `[spacerX]` detection
|
- Fixed `[spacerX]` detection
|
||||||
- Added a hint if the channel encryption has been overridden by the server settings
|
- Added a hint if the channel encryption has been overridden by the server settings
|
||||||
|
|
|
@ -1061,7 +1061,8 @@ class ConnectionCommandHandler {
|
||||||
json = json[0];
|
json = json[0];
|
||||||
|
|
||||||
const self = this.connection._client.getClient();
|
const self = this.connection._client.getClient();
|
||||||
if(json["clid"] == self.clientId())
|
if(json["clid"] == self.clientId()) {
|
||||||
sound.play(Sound.GROUP_CHANNEL_CHANGED_SELF);
|
sound.play(Sound.GROUP_CHANNEL_CHANGED_SELF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -115,22 +115,31 @@ function main() {
|
||||||
if(settings.static("default_connect_url")) {
|
if(settings.static("default_connect_url")) {
|
||||||
switch (settings.static("default_connect_type")) {
|
switch (settings.static("default_connect_type")) {
|
||||||
case "teaforo":
|
case "teaforo":
|
||||||
if(forumIdentity.valid())
|
if(forumIdentity && forumIdentity.valid())
|
||||||
globalClient.startConnection(settings.static("default_connect_url"), forumIdentity);
|
globalClient.startConnection(settings.static("default_connect_url"), forumIdentity);
|
||||||
else
|
else
|
||||||
Modals.spawnConnectModal(settings.static("default_connect_url"), IdentitifyType.TEAFORO);
|
Modals.spawnConnectModal({
|
||||||
|
url: settings.static<string>("default_connect_url"),
|
||||||
|
enforce: true
|
||||||
|
}, { identity: IdentitifyType.TEAFORO, enforce: true});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "teamspeak":
|
case "teamspeak":
|
||||||
let connectIdentity = TSIdentityHelper.loadIdentity(settings.global("connect_identity_teamspeak_identity", ""));
|
let connectIdentity = TSIdentityHelper.loadIdentity(settings.global("connect_identity_teamspeak_identity", ""));
|
||||||
if(!connectIdentity || !connectIdentity.valid())
|
if(!connectIdentity || !connectIdentity.valid())
|
||||||
Modals.spawnConnectModal(settings.static("default_connect_url"), IdentitifyType.TEAMSPEAK);
|
Modals.spawnConnectModal({
|
||||||
|
url: settings.static<string>("default_connect_url"),
|
||||||
|
enforce: true
|
||||||
|
}, { identity: IdentitifyType.TEAMSPEAK, enforce: true});
|
||||||
else
|
else
|
||||||
globalClient.startConnection(settings.static("default_connect_url"), connectIdentity);
|
globalClient.startConnection(settings.static("default_connect_url"), connectIdentity);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Modals.spawnConnectModal(settings.static("default_connect_url"));
|
Modals.spawnConnectModal({
|
||||||
|
url: settings.static<string>("default_connect_url"),
|
||||||
|
enforce: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,10 @@ class ControlBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
private onConnect() {
|
private onConnect() {
|
||||||
Modals.spawnConnectModal(settings.static("connect_default_host", "ts.TeaSpeak.de"));
|
Modals.spawnConnectModal({
|
||||||
|
url: "ts.TeaSpeak.de",
|
||||||
|
enforce: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
update_connection_state() {
|
update_connection_state() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// <reference path="../../utils/modal.ts" />
|
/// <reference path="../../utils/modal.ts" />
|
||||||
|
|
||||||
namespace Modals {
|
namespace Modals {
|
||||||
export function spawnConnectModal(defaultHost: string = "ts.TeaSpeak.de", def_connect_type?: IdentitifyType) {
|
export function spawnConnectModal(defaultHost: { url: string, enforce: boolean} = { url: "ts.TeaSpeak.de", enforce: false}, def_connect_type?: { identity: IdentitifyType, enforce: boolean}) {
|
||||||
let connectIdentity: Identity;
|
let connectIdentity: Identity;
|
||||||
const connectModal = createModal({
|
const connectModal = createModal({
|
||||||
header: function() {
|
header: function() {
|
||||||
|
@ -56,7 +56,7 @@ namespace Modals {
|
||||||
};
|
};
|
||||||
|
|
||||||
tag.find(".connect_nickname").val(settings.static_global("connect_name", undefined));
|
tag.find(".connect_nickname").val(settings.static_global("connect_name", undefined));
|
||||||
tag.find(".connect_address").val(settings.static_global("connect_address", defaultHost));
|
tag.find(".connect_address").val(defaultHost.enforce ? defaultHost.url : settings.static_global("connect_address", defaultHost.url));
|
||||||
tag.find(".connect_address")
|
tag.find(".connect_address")
|
||||||
.on("keyup", () => updateFields())
|
.on("keyup", () => updateFields())
|
||||||
.on('keydown', event => {
|
.on('keydown', event => {
|
||||||
|
@ -71,7 +71,7 @@ namespace Modals {
|
||||||
tag.find(".identity_config:not(" + ".identity_config_" + this.value + ")").hide();
|
tag.find(".identity_config:not(" + ".identity_config_" + this.value + ")").hide();
|
||||||
tag.find(".identity_config_" + this.value).show().trigger('shown');
|
tag.find(".identity_config_" + this.value).show().trigger('shown');
|
||||||
});
|
});
|
||||||
tag.find(".identity_select").val(IdentitifyType[def_connect_type ? def_connect_type : settings.global("connect_identity_type", IdentitifyType.TEAFORO)]);
|
tag.find(".identity_select").val(IdentitifyType[def_connect_type && def_connect_type.enforce ? def_connect_type.identity : settings.global("connect_identity_type", (def_connect_type || { identity: undefined }).identity || IdentitifyType.TEAFORO)]);
|
||||||
setTimeout(() => tag.find(".identity_select").trigger('change'), 0); //For some reason could not be run instantly
|
setTimeout(() => tag.find(".identity_select").trigger('change'), 0); //For some reason could not be run instantly
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -211,28 +211,3 @@ namespace Modals {
|
||||||
IP: /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.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){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
<div style="display: flex; justify-content: space-between;">
|
|
||||||
<div style="text-align: right;">Identity Settings</div>
|
|
||||||
<select class="identity_select">
|
|
||||||
<option name="identity_type" value="identity_type_forum">Forum Account</option>
|
|
||||||
<option name="identity_type" value="identity_type_teamspeak">TeamSpeak</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class="identity_config_teamspeak">
|
|
||||||
Please enter your exported TS3 Identity string bellow or select your exported Identity<br>
|
|
||||||
<div style="width: 100%; display: flex; flex-direction: row">
|
|
||||||
<input placeholder="Identity string" style="width: 70%; margin: 5px;" class="identity_string">
|
|
||||||
<div style="width: 30%; margin: 5px"><input name="identity_file" type="file"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="identity_config_forum">
|
|
||||||
You're using your forum account as verification
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="background-color: red; border-radius: 1px; display: none" class="error_message">
|
|
||||||
Identity isnt valid!
|
|
||||||
</div>
|
|
||||||
*/
|
|
3
todo.md
3
todo.md
|
@ -1,2 +1 @@
|
||||||
- channel encrypted within status bar (ref for override via server: encrypted: false (overridden by server: true))
|
nan
|
||||||
- arrow channel select move
|
|
Loading…
Add table
Reference in a new issue