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

View File

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

View File

@ -8,9 +8,9 @@ export type ConfigValueTypes = boolean | number | string | object;
export type ConfigValueTypeNames = "boolean" | "number" | "string" | "object"; export type ConfigValueTypeNames = "boolean" | "number" | "string" | "object";
export type ValueTypeMapping<T> = T extends boolean ? "boolean" : export type ValueTypeMapping<T> = T extends boolean ? "boolean" :
T extends number ? "number" : T extends number ? "number" :
T extends string ? "string" : T extends string ? "string" :
T extends object ? "object" : never; T extends object ? "object" : never;
export interface SettingsKey<ValueType extends ConfigValueTypes> { export interface SettingsKey<ValueType extends ConfigValueTypes> {
key: string; key: string;

View File

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

View File

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