diff --git a/src/equicordplugins/discordColorways/index.tsx b/src/equicordplugins/discordColorways/index.tsx index ea243e9f..25bda89d 100644 --- a/src/equicordplugins/discordColorways/index.tsx +++ b/src/equicordplugins/discordColorways/index.tsx @@ -250,7 +250,7 @@ export default definePlugin({ customSettingsSections.push(ColorwaysSelector, ColorwaysSettings, ColorwaysSourceManager, ColorwaysOnDemand, ColorwaysStore); - addServerListElement(ServerListRenderPosition.In, this.ColorwaysButton); + addServerListElement(ServerListRenderPosition.Above, this.ColorwaysButton); enableStyle(style); ColorwayCSS.set((await DataStore.get("activeColorwayObject") as ColorwayObject).css || ""); diff --git a/src/plugins/serverListIndicators/index.tsx b/src/plugins/serverListIndicators/index.tsx index 50125e69..de16f944 100644 --- a/src/plugins/serverListIndicators/index.tsx +++ b/src/plugins/serverListIndicators/index.tsx @@ -16,17 +16,16 @@ * along with this program. If not, see . */ +import "./styles.css"; + import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList"; import { Settings } from "@api/Settings"; -import { enableStyle } from "@api/Styles"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs, EquicordDevs } from "@utils/constants"; import { useForceUpdater } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; import { GuildStore, PresenceStore, RelationshipStore, Tooltip } from "@webpack/common"; -import style from "./styles.css?managed"; - const enum IndicatorType { SERVER = 1 << 0, FRIEND = 1 << 1, @@ -128,15 +127,19 @@ export default definePlugin({ renderIndicator: () => { const { mode } = Settings.plugins.ServerListIndicators; - let text; - - if (!!(mode & IndicatorType.FRIEND) && !!(mode & IndicatorType.SERVER)) { - text = `${onlineFriends} Friends, ${guildCount} Servers`; - } else if (!!(mode & IndicatorType.FRIEND)) { - text = `${onlineFriends} Friends`; - } else if (!!(mode & IndicatorType.SERVER)) { - text = `${guildCount} Servers`; + let text: string = `${onlineFriends} Friends, ${guildCount} Servers`; + switch (mode) { + case (!!(mode & IndicatorType.FRIEND)): + text = `${onlineFriends} Friends`; + break; + case (!!(mode & IndicatorType.SERVER)): + text = `${guildCount} Servers`; + break; + case (!!(mode & IndicatorType.FRIEND)) && (!!(mode & IndicatorType.SERVER)): + text = `${onlineFriends} Friends, ${guildCount} Servers`; + break; } + return
@@ -163,7 +166,6 @@ export default definePlugin({ start() { addServerListElement(ServerListRenderPosition.Above, this.renderIndicator); - enableStyle(style); handlePresenceUpdate(); handleGuildUpdate(); }, diff --git a/src/plugins/serverListIndicators/styles.css b/src/plugins/serverListIndicators/styles.css index 1fb95a0b..5327524b 100644 --- a/src/plugins/serverListIndicators/styles.css +++ b/src/plugins/serverListIndicators/styles.css @@ -20,7 +20,7 @@ #vc-serverlist-indicators:hover { border-radius: 34%; - background-color: var(--brand-500); + background-color: var(--brand-experiment); } #vc-serverlist-indicators::before {