Fix Multiple Popups VCSupport

This commit is contained in:
thororen1234 2024-07-28 21:29:36 -04:00
parent ac4a461bcf
commit c975439e9a

View file

@ -141,6 +141,8 @@ const settings = definePluginSettings({}).withPrivateSettings<{
dismissedDevBuildWarning?: boolean; dismissedDevBuildWarning?: boolean;
}>(); }>();
let clicked = false;
export default definePlugin({ export default definePlugin({
name: "SupportHelper", name: "SupportHelper",
required: true, required: true,
@ -177,18 +179,21 @@ export default definePlugin({
async CHANNEL_SELECT({ channelId }) { async CHANNEL_SELECT({ channelId }) {
if (!SUPPORT_CHANNEL_IDS.includes(channelId)) return; if (!SUPPORT_CHANNEL_IDS.includes(channelId)) return;
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport")) return Alerts.show({ if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport") && !clicked) {
title: "You are entering the support channel!", clicked = true;
body: <div> return Alerts.show({
<style> title: "You are entering the support channel!",
{'[class*="backdrop_"][style*="backdrop-filter"]{backdrop-filter:blur(16px) brightness(0.25) !important;}'} body: <div>
</style> <style>
<img src="https://media.tenor.com/QtGqjwBpRzwAAAAi/wumpus-dancing.gif" /> {'[class*="backdrop_"][style*="backdrop-filter"]{backdrop-filter:blur(16px) brightness(0.25) !important;}'}
<Forms.FormText>Before you ask for help,</Forms.FormText> </style>
<Forms.FormText>Check for updates and if this</Forms.FormText> <img src="https://media.tenor.com/QtGqjwBpRzwAAAAi/wumpus-dancing.gif" />
<Forms.FormText>issue could be caused by Equicord!</Forms.FormText> <Forms.FormText>Before you ask for help,</Forms.FormText>
</div> <Forms.FormText>Check for updates and if this</Forms.FormText>
}); <Forms.FormText>issue could be caused by Equicord!</Forms.FormText>
</div>
});
}
const selfId = UserStore.getCurrentUser()?.id; const selfId = UserStore.getCurrentUser()?.id;
if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return; if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return;