Fixed sprites for the native client

canary
WolverinDEV 2020-09-25 18:04:46 +02:00
parent b46c7d1b1e
commit 4dec91094b
5 changed files with 24 additions and 21 deletions

12
package-lock.json generated
View File

@ -14887,9 +14887,9 @@
}
},
"webpack-svg-sprite-generator": {
"version": "1.0.16",
"resolved": "https://registry.npmjs.org/webpack-svg-sprite-generator/-/webpack-svg-sprite-generator-1.0.16.tgz",
"integrity": "sha512-UvCAPA1UZb7zfqnf+QAte2L7iITfqFof5Oob1mFfriTAA9eiYrfrrtWTK5zeD9jFy5/cqCpTiw37KVa5lxugyA==",
"version": "1.0.17",
"resolved": "https://registry.npmjs.org/webpack-svg-sprite-generator/-/webpack-svg-sprite-generator-1.0.17.tgz",
"integrity": "sha512-yk9ANOyoE+w/M6L1KAcBVwMguBN3JRZyCCOmPTtBCGV2Y8yHKDp0NCTDh5iw3ueanOua39kcZQr8RHW5wtQQ6Q==",
"dev": true,
"requires": {
"fs-extra": "^9.0.1",
@ -15135,9 +15135,9 @@
}
},
"webpack": {
"version": "4.44.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.1.tgz",
"integrity": "sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ==",
"version": "4.44.2",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz",
"integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==",
"dev": true,
"requires": {
"@webassemblyjs/ast": "1.9.0",

View File

@ -78,7 +78,7 @@
"webpack": "^4.42.1",
"webpack-bundle-analyzer": "^3.6.1",
"webpack-cli": "^3.3.11",
"webpack-svg-sprite-generator": "^1.0.16",
"webpack-svg-sprite-generator": "^1.0.17",
"worker-plugin": "^4.0.3",
"xml-parser": "^1.2.1"
},

View File

@ -26,6 +26,8 @@
}
.channelType {
font-size: 16px;
flex-grow: 0;
flex-shrink: 0;

View File

@ -187,18 +187,19 @@ class ChannelEntryIcon extends ReactComponentBase<ChannelEntryIconProperties, {}
const channel_properties = this.props.channel.properties;
let type;
if (channel_properties.channel_flag_password === true && !this.props.channel.cached_password())
type = "yellow";
else if (!channel_properties.channel_flag_maxclients_unlimited && this.props.channel.clients().length >= channel_properties.channel_maxclients)
type = "red";
else if (!channel_properties.channel_flag_maxfamilyclients_unlimited && channel_properties.channel_maxfamilyclients >= 0 && this.props.channel.clients(true).length >= channel_properties.channel_maxfamilyclients)
type = "red";
else
type = "green";
const subscribed = this.props.channel.flag_subscribed;
let channelIcon: ClientIcon;
if (channel_properties.channel_flag_password === true && !this.props.channel.cached_password()) {
channelIcon = subscribed ? ClientIcon.ChannelYellowSubscribed : ClientIcon.ChannelYellow;
} else if (!channel_properties.channel_flag_maxclients_unlimited && this.props.channel.clients().length >= channel_properties.channel_maxclients) {
channelIcon = subscribed ? ClientIcon.ChannelRedSubscribed : ClientIcon.ChannelRed;
} else if (!channel_properties.channel_flag_maxfamilyclients_unlimited && channel_properties.channel_maxfamilyclients >= 0 && this.props.channel.clients(true).length >= channel_properties.channel_maxfamilyclients) {
channelIcon = subscribed ? ClientIcon.ChannelRedSubscribed : ClientIcon.ChannelRed;
} else {
channelIcon = ClientIcon.ChannelGreen;
}
return <div
className={"icon client-channel_" + type + (this.props.channel.flag_subscribed ? "_subscribed" : "") + " " + channelStyle.channelType}/>;
return <ClientIconRenderer icon={channelIcon} className={channelStyle.channelType} />;
}
@EventHandler<ChannelEvents>("notify_properties_updated")