From f9c12779c8c9176c829c1237bff0d86bfa6dd677 Mon Sep 17 00:00:00 2001 From: KrystalSkull <150982280+KrstlSkll69@users.noreply.github.com> Date: Thu, 31 Oct 2024 21:11:11 -0400 Subject: [PATCH] chore(pluginCards): warning to few plugins, change restart modal style & more (#88) * add warning to plugins * update wording and restart button * update warning gif --- src/components/PluginSettings/PluginModal.tsx | 6 +++--- src/components/PluginSettings/index.tsx | 9 ++++++--- src/components/PluginSettings/styles.css | 16 ++++++++++++---- src/components/VencordSettings/VencordTab.tsx | 4 ++-- .../platformSpoofer/{index.ts => index.tsx} | 8 ++++++++ src/equicordplugins/platformSpoofer/style.css | 12 ++++++++++++ .../purgeMessages/{index.ts => index.tsx} | 9 ++++++++- src/equicordplugins/purgeMessages/style.css | 12 ++++++++++++ .../questCompleter.discordDesktop/index.tsx | 9 ++++++++- .../questCompleter.discordDesktop/style.css | 12 ++++++++++++ src/equicordplugins/remixMe/index.tsx | 8 ++++++++ src/equicordplugins/remixMe/style.css | 12 ++++++++++++ 12 files changed, 103 insertions(+), 14 deletions(-) rename src/equicordplugins/platformSpoofer/{index.ts => index.tsx} (87%) create mode 100644 src/equicordplugins/platformSpoofer/style.css rename src/equicordplugins/purgeMessages/{index.ts => index.tsx} (93%) create mode 100644 src/equicordplugins/purgeMessages/style.css create mode 100644 src/equicordplugins/questCompleter.discordDesktop/style.css create mode 100644 src/equicordplugins/remixMe/style.css diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx index 63d5eaed..ea87b878 100644 --- a/src/components/PluginSettings/PluginModal.tsx +++ b/src/components/PluginSettings/PluginModal.tsx @@ -414,14 +414,14 @@ export function openWarningModal(plugin: Plugin, pluginModalProps: ModalProps, o Warning You are about to reset all settings for {plugin.name} to their default values. - - THIS ACTION IS IRREVERSIBLE + + THIS ACTION IS IRREVERSIBLE! If you are certain you want to proceed, click Confirm Reset. Otherwise, click Cancel. diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index a6b7ddfb..cfd2b1ba 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -70,7 +70,10 @@ function ReloadRequiredCard({ required, enabledPlugins, openDisablePluginsModal, Restart now to apply new plugins and their settings - @@ -400,14 +403,14 @@ export default function PluginSettings() { Warning WARNING: You are about to disable {enabledPlugins.length} plugins! - THIS ACTION IS IRREVERSIBLE + THIS ACTION IS IRREVERSIBLE! Are you absolutely sure you want to proceed? You can always enable them back later. diff --git a/src/components/PluginSettings/styles.css b/src/components/PluginSettings/styles.css index f6e00260..0fd7288d 100644 --- a/src/components/PluginSettings/styles.css +++ b/src/components/PluginSettings/styles.css @@ -75,19 +75,27 @@ .vc-plugins-restart-card { padding: 1em; background: var(--info-warning-background); - border: 1px solid var(--info-warning-foreground); + border: inherit !important; color: var(--info-warning-text); } .vc-plugins-restart-card button { margin-top: 0.5em; - background: var(--info-warning-foreground) !important; } .vc-plugins-info-button svg:not(:hover, :focus) { color: var(--text-muted); } +.vc-restart-button { + background-color: var(--background-color) !important; + border: 1px solid var(--info-warning-foreground); +} + +.vc-restart-button:hover { + background-color: var(--info-warning-foreground) !important; +} + .vc-plugin-stats { background-color: var(--background-secondary-alt); border-radius: 8px; @@ -221,8 +229,8 @@ /* Specific to disable all modal */ .warning-text { - color: var(--text-danger); - font-size: 1.2rem; + color: var(--text-danger) !important; + font-size: 1.2rem !important; } .warning-text span { diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx index 22343bec..8395d375 100644 --- a/src/components/VencordSettings/VencordTab.tsx +++ b/src/components/VencordSettings/VencordTab.tsx @@ -91,8 +91,8 @@ function EquicordSettings() { !IS_WEB && { key: "transparent", title: "Enable window transparency.", - note: "You need a theme that supports transparency or this will do nothing. Requires a full restart", - warning: { enabled: true, message: "This will stop the window from being resizable" } + note: "You need a theme that supports transparency or this will do nothing. Requires a full restart!", + warning: { enabled: true, message: "This will stop the window from being resizable." } }, !IS_WEB && isWindows && { key: "winCtrlQ", diff --git a/src/equicordplugins/platformSpoofer/index.ts b/src/equicordplugins/platformSpoofer/index.tsx similarity index 87% rename from src/equicordplugins/platformSpoofer/index.ts rename to src/equicordplugins/platformSpoofer/index.tsx index 551c2acc..7428702c 100644 --- a/src/equicordplugins/platformSpoofer/index.ts +++ b/src/equicordplugins/platformSpoofer/index.tsx @@ -4,9 +4,12 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import "./style.css"; + import { definePluginSettings } from "@api/Settings"; import { EquicordDevs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; +import { Forms } from "@webpack/common"; const settings = definePluginSettings({ platform: { @@ -39,6 +42,11 @@ export default definePlugin({ name: "PlatformSpoofer", description: "Spoof what platform or device you're on", authors: [EquicordDevs.Drag], + settingsAboutComponent: () => <> + + We can't guarantee this plugin won't get you warned or banned. + + , settings: settings, patches: [ { diff --git a/src/equicordplugins/platformSpoofer/style.css b/src/equicordplugins/platformSpoofer/style.css new file mode 100644 index 00000000..5b7ddf6b --- /dev/null +++ b/src/equicordplugins/platformSpoofer/style.css @@ -0,0 +1,12 @@ +.platform-warning { + font-size: 16px; + background-color: rgb(240 71 71 / 10%); + color: rgb(240 71 71); + border: 1px solid rgb(240 71 71 / 60%); + border-radius: 4px; + font-weight: 500; + padding: 6px 10px; + text-align: center; + margin-top: 10px; + font-style: bold; +} diff --git a/src/equicordplugins/purgeMessages/index.ts b/src/equicordplugins/purgeMessages/index.tsx similarity index 93% rename from src/equicordplugins/purgeMessages/index.ts rename to src/equicordplugins/purgeMessages/index.tsx index f6849472..7082b87c 100644 --- a/src/equicordplugins/purgeMessages/index.ts +++ b/src/equicordplugins/purgeMessages/index.tsx @@ -16,11 +16,13 @@ * along with this program. If not, see . */ +import "./style.css"; + import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands"; import { Devs, EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; import { findByPropsLazy } from "@webpack"; -import { MessageStore, UserStore } from "@webpack/common"; +import { Forms, MessageStore, UserStore } from "@webpack/common"; import { Channel, Message } from "discord-types/general"; import { loggedMessages } from "../messageLoggerEnhanced/LoggedMessageManager"; @@ -48,6 +50,11 @@ export default definePlugin({ name: "PurgeMessages", description: "Purges messages from a channel", authors: [EquicordDevs.bhop, Devs.nyx], + settingsAboutComponent: () => <> + + We can't guarantee this plugin won't get you warned or banned. + + , commands: [ { name: "purge", diff --git a/src/equicordplugins/purgeMessages/style.css b/src/equicordplugins/purgeMessages/style.css new file mode 100644 index 00000000..473c8aec --- /dev/null +++ b/src/equicordplugins/purgeMessages/style.css @@ -0,0 +1,12 @@ +.purge-warning { + font-size: 16px; + background-color: rgb(240 71 71 / 10%); + color: rgb(240 71 71); + border: 1px solid rgb(240 71 71 / 60%); + border-radius: 4px; + font-weight: 500; + padding: 6px 10px; + text-align: center; + margin-top: 10px; + font-style: bold; +} diff --git a/src/equicordplugins/questCompleter.discordDesktop/index.tsx b/src/equicordplugins/questCompleter.discordDesktop/index.tsx index fb4f68c4..5112fe1a 100644 --- a/src/equicordplugins/questCompleter.discordDesktop/index.tsx +++ b/src/equicordplugins/questCompleter.discordDesktop/index.tsx @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +import "./style.css"; + import { showNotification } from "@api/Notifications"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs, EquicordDevs } from "@utils/constants"; @@ -23,7 +25,7 @@ import { getTheme, Theme } from "@utils/discord"; import { classes } from "@utils/misc"; import definePlugin from "@utils/types"; import { findByProps, findExportedComponentLazy } from "@webpack"; -import { Button, FluxDispatcher, RestAPI, Tooltip, UserStore } from "@webpack/common"; +import { Button, FluxDispatcher, Forms, RestAPI, Tooltip, UserStore } from "@webpack/common"; const HeaderBarIcon = findExportedComponentLazy("Icon", "Divider"); const isApp = navigator.userAgent.includes("Electron/"); @@ -188,6 +190,11 @@ export default definePlugin({ name: "QuestCompleter", description: "A plugin to complete quests without having the game installed.", authors: [Devs.HappyEnderman, EquicordDevs.SerStars, EquicordDevs.thororen], + settingsAboutComponent: () => <> + + We can't guarantee this plugin won't get you warned or banned. + + , patches: [ { find: "\"invite-button\"", diff --git a/src/equicordplugins/questCompleter.discordDesktop/style.css b/src/equicordplugins/questCompleter.discordDesktop/style.css new file mode 100644 index 00000000..0b57a426 --- /dev/null +++ b/src/equicordplugins/questCompleter.discordDesktop/style.css @@ -0,0 +1,12 @@ +.quest-warning { + font-size: 16px; + background-color: rgb(240 71 71 / 10%); + color: rgb(240 71 71); + border: 1px solid rgb(240 71 71 / 60%); + border-radius: 4px; + font-weight: 500; + padding: 6px 10px; + text-align: center; + margin-top: 10px; + font-style: bold; +} diff --git a/src/equicordplugins/remixMe/index.tsx b/src/equicordplugins/remixMe/index.tsx index c22c5c56..7df5cf97 100644 --- a/src/equicordplugins/remixMe/index.tsx +++ b/src/equicordplugins/remixMe/index.tsx @@ -4,10 +4,13 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import "./style.css"; + import { MessageEvents } from "@api/index"; import { MessageExtra, MessageObject } from "@api/MessageEvents"; import { EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; +import { Forms } from "@webpack/common"; const handleMessage = (channelID: string, message: MessageObject, messageEx: MessageExtra) => messageEx.uploads && messageEx.uploads.forEach(att => (att as any).isRemix = true); @@ -15,6 +18,11 @@ export default definePlugin({ name: "RemixMe", description: "Turns every single message with attachment to have remix tag", authors: [EquicordDevs.kvba], + settingsAboutComponent: () => <> + + We can't guarantee this plugin won't get you warned or banned. + + , start: () => MessageEvents.addPreSendListener(handleMessage), stop: () => MessageEvents.removePreSendListener(handleMessage) }); diff --git a/src/equicordplugins/remixMe/style.css b/src/equicordplugins/remixMe/style.css new file mode 100644 index 00000000..b52ab4c3 --- /dev/null +++ b/src/equicordplugins/remixMe/style.css @@ -0,0 +1,12 @@ +.remixme-warning { + font-size: 16px; + background-color: rgb(240 71 71 / 10%); + color: rgb(240 71 71); + border: 1px solid rgb(240 71 71 / 60%); + border-radius: 4px; + font-weight: 500; + padding: 6px 10px; + text-align: center; + margin-top: 10px; + font-style: bold; +}