From a73858d131ac8f05fa06f67fe5858f8f4959b13a Mon Sep 17 00:00:00 2001 From: LordElias <55048695+LordEliasTM@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:29:45 +0200 Subject: [PATCH] UserVoiceShow: Fix lack of bottom padding for popout on current user and broken modal patch (#873) --- .../components/VoiceChannelSection.css | 10 ++++++- src/plugins/userVoiceShow/index.tsx | 30 +++++++++++-------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/plugins/userVoiceShow/components/VoiceChannelSection.css b/src/plugins/userVoiceShow/components/VoiceChannelSection.css index c0bc49d06..0cf8701fc 100644 --- a/src/plugins/userVoiceShow/components/VoiceChannelSection.css +++ b/src/plugins/userVoiceShow/components/VoiceChannelSection.css @@ -13,6 +13,14 @@ margin-bottom: 6px; } -.vc-uvs-modal-margin > [class^="section"] { +.vc-uvs-modal-margin { margin: 0 12px; } + +.vc-uvs-modal-margin div { + margin-bottom: 0 !important; +} + +.vc-uvs-popout-margin > [class^="section"] { + margin-top: -12px; +} diff --git a/src/plugins/userVoiceShow/index.tsx b/src/plugins/userVoiceShow/index.tsx index 3a1f6fe41..3379672ce 100644 --- a/src/plugins/userVoiceShow/index.tsx +++ b/src/plugins/userVoiceShow/index.tsx @@ -20,13 +20,14 @@ import { definePluginSettings } from "@api/settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findStoreLazy } from "@webpack"; -import { ChannelStore, GuildStore } from "@webpack/common"; +import { findByPropsLazy, findStoreLazy } from "@webpack"; +import { ChannelStore, GuildStore, UserStore } from "@webpack/common"; import { User } from "discord-types/general"; import { VoiceChannelSection } from "./components/VoiceChannelSection"; const VoiceStateStore = findStoreLazy("VoiceStateStore"); +const UserPopoutSectionCssClasses = findByPropsLazy("section", "lastSection"); const settings = definePluginSettings({ showInUserProfileModal: { @@ -57,13 +58,11 @@ const VoiceChannelField = ErrorBoundary.wrap(({ user }: UserProps) => { const result = `${guild.name} | ${channel.name}`; return ( -