Fixed hostbanner position when its invisible

This commit is contained in:
WolverinDEV 2018-12-02 19:08:34 +01:00
parent 86eb36b1e4
commit 2ef764d34b
4 changed files with 12 additions and 8 deletions

View file

@ -3,6 +3,8 @@
- 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
- Enabled log grouping - Enabled log grouping
- Improved permission popup performance
- Showing a better client version on client info
* **1.12.18** * **1.12.18**
- Added the possibility to navigate via arrow keys within the channel tree - Added the possibility to navigate via arrow keys within the channel tree

View file

@ -64,7 +64,9 @@
overflow: hidden; overflow: hidden;
&:not(:disabled) {
&.disabled {
display: none;
margin-bottom: 5px; margin-bottom: 5px;
} }

View file

@ -343,11 +343,13 @@ class HandshakeHandler {
}); });
return; return;
} }
const browser_name = (navigator.browserSpecs || {})["name"];
let data = { let data = {
//TODO variables! //TODO variables!
client_nickname: this.name ? this.name : this.identity.name(), client_nickname: this.name ? this.name : this.identity.name(),
client_platform: navigator.platform, client_platform: navigator.platform,
client_version: navigator.userAgent, client_version: browser_name ? browser_name + " (" + navigator.userAgent + ")" : navigator.userAgent,
client_server_password: this.server_password, client_server_password: this.server_password,
client_browser_engine: navigator.product client_browser_engine: navigator.product

View file

@ -133,16 +133,14 @@ class Hostbanner {
if(tag) { if(tag) {
tag.then(element => { tag.then(element => {
this.html_tag.empty(); this.html_tag.empty();
this.html_tag.append(element); this.html_tag.append(element).removeClass("disabled");
this.html_tag.prop("disabled", false);
}).catch(error => { }).catch(error => {
console.warn("Failed to load hostbanner: %o", error); console.warn("Failed to load hostbanner: %o", error);
this.html_tag.empty(); this.html_tag.empty().addClass("disabled");
this.html_tag.prop("disabled", true);
}) })
} else { } else {
this.html_tag.empty(); this.html_tag.empty().addClass("disabled");
this.html_tag.prop("disabled", true);
} }
} }