Fixed loading error and icon error

canary
WolverinDEV 2019-02-13 18:28:55 +01:00
parent 69d2702081
commit 0178694808
6 changed files with 24 additions and 9 deletions

View File

@ -94,4 +94,15 @@
} }
} }
} }
.client-avatar {
> div {
flex-grow: 1;
flex-shrink: 1;
> img {
max-width: 100%;
max-height: 100%;
}
}
}
} }

View File

@ -355,7 +355,7 @@ body {
width: 32px; width: 32px;
height: 32px; height: 32px;
background: url('%%base_path%%/img/music/playlist.svg') no-repeat; background: url('../../img/music/playlist.svg') no-repeat;
background-position: -11px -9px; background-position: -11px -9px;
background-size: 50px; background-size: 50px;
} }

View File

@ -137,7 +137,7 @@
background: #005cbf; background: #005cbf;
} }
.clicon {width:16px;height:16px;background:url('%%base_path%%/img/ts/basic_icons.png') no-repeat;background-size: 16px 608px;} .clicon {width:16px;height:16px;background:url('../../../img/ts/basic_icons.png') no-repeat;background-size: 16px 608px;}
.host {background-position: 0 -448px} .host {background-position: 0 -448px}
.server_open {background-position: 0 -352px} .server_open {background-position: 0 -352px}

View File

@ -8,7 +8,7 @@
width: 16px; width: 16px;
height: 16px; height: 16px;
background: url('%%base_path%%/img/client_icon_sprite.svg') no-repeat; background: url('../../../img/client_icon_sprite.svg') no-repeat;
} }
/* Icons x16 */ /* Icons x16 */
@ -612,7 +612,7 @@
.icon_x32 { .icon_x32 {
display: inline-block; display: inline-block;
background: url('%%base_path%%/img/client_icon_sprite.svg') no-repeat; background: url('../../../img/client_icon_sprite.svg') no-repeat;
background-size: calc(496px * 2) calc(400px * 2); background-size: calc(496px * 2) calc(400px * 2);
height: 32px; height: 32px;
width: 32px; width: 32px;

View File

@ -175,7 +175,7 @@ namespace loader {
let error = false; let error = false;
const error_handler = (event: ErrorEvent) => { const error_handler = (event: ErrorEvent) => {
if(event.filename == tag.src && event.message.indexOf("Illegal constructor") == -1) { //Our tag throw an uncaught error if(event.filename == tag.src && event.message.indexOf("Illegal constructor") == -1) { //Our tag throw an uncaught error
//console.log("msg: %o, url: %o, line: %o, col: %o, error: %o", event.message, event.filename, event.lineno, event.colno, event.error); console.log("msg: %o, url: %o, line: %o, col: %o, error: %o", event.message, event.filename, event.lineno, event.colno, event.error);
window.removeEventListener('error', error_handler as any); window.removeEventListener('error', error_handler as any);
reject(new SyntaxError(event.error)); reject(new SyntaxError(event.error));
@ -298,10 +298,14 @@ namespace loader {
} }
} }
for(const index of rules_remove.sort((a, b) => b > a ? 1 : 0)) for(const index of rules_remove.sort((a, b) => b > a ? 1 : 0)) {
css.deleteRule(index); if(css.removeRule)
css.removeRule(index);
else
css.deleteRule(index);
}
for(const rule of rules_add) for(const rule of rules_add)
css.insertRule(rule); css.insertRule(rule, rules_remove[0]);
} }
clearTimeout(timeout_handle); clearTimeout(timeout_handle);

View File

@ -105,7 +105,7 @@ class ChannelEntry {
}); });
} }
parent_channel?() { return this.parent; } parent_channel() { return this.parent; }
hasParent(){ return this.parent != null; } hasParent(){ return this.parent != null; }
getChannelId(){ return this.channelId; } getChannelId(){ return this.channelId; }
channelClass() { return "channel_full"; } channelClass() { return "channel_full"; }