From 9d0e254043d70590e83969b09535824f69088371 Mon Sep 17 00:00:00 2001 From: "wont.stream" Date: Mon, 23 Sep 2024 18:35:26 -0400 Subject: [PATCH] WOOOOOOOOOOO --- plugins/eurotilities/components/settings.tsx | 132 ++++++++++++------ plugins/eurotilities/helpers/modules.ts | 18 +++ plugins/eurotilities/index.ts | 43 ++---- plugins/eurotilities/modules/alwaysTrust.ts | 12 ++ plugins/eurotilities/modules/antiTrack.ts | 28 ++++ plugins/eurotilities/modules/colorSighted.ts | 87 +++--------- plugins/eurotilities/modules/muteNewGuild.ts | 30 ++++ plugins/eurotilities/modules/noCallIdle.ts | 22 +++ plugins/eurotilities/modules/noConsoleSpam.ts | 23 +++ .../modules/noDevtoolsDetection.ts | 21 +++ plugins/eurotilities/modules/noNitroUpsell.ts | 19 +-- .../eurotilities/modules/noReplyMention.ts | 19 +++ plugins/eurotilities/modules/noTyping.ts | 13 ++ .../eurotilities/modules/noTypingAnimation.ts | 2 - .../eurotilities/modules/steamStatusSync.ts | 5 - .../eurotilities/modules/timestampedFiles.ts | 32 +++++ plugins/eurotilities/plugin.json | 2 +- 17 files changed, 342 insertions(+), 166 deletions(-) create mode 100644 plugins/eurotilities/modules/alwaysTrust.ts create mode 100644 plugins/eurotilities/modules/antiTrack.ts create mode 100644 plugins/eurotilities/modules/muteNewGuild.ts create mode 100644 plugins/eurotilities/modules/noCallIdle.ts create mode 100644 plugins/eurotilities/modules/noConsoleSpam.ts create mode 100644 plugins/eurotilities/modules/noDevtoolsDetection.ts create mode 100644 plugins/eurotilities/modules/noReplyMention.ts create mode 100644 plugins/eurotilities/modules/noTyping.ts create mode 100644 plugins/eurotilities/modules/timestampedFiles.ts diff --git a/plugins/eurotilities/components/settings.tsx b/plugins/eurotilities/components/settings.tsx index 9685e6b..3e6d2e0 100644 --- a/plugins/eurotilities/components/settings.tsx +++ b/plugins/eurotilities/components/settings.tsx @@ -2,7 +2,22 @@ import modules from "../helpers/modules.ts"; const { plugin: { store }, - ui: { SwitchItem, tooltip }, + ui: { + Header, + HeaderTags, + Divider, + SwitchItem, + openModal, + ModalRoot, + ModalSizes, + ModalHeader, + ModalBody, + ModalConfirmFooter, + Button, + ButtonLooks, + ButtonColors, + ButtonSizes, + }, React, } = shelter; @@ -10,48 +25,81 @@ const handleSettingChange = (key, value) => { store[key] = value; }; -export const settings = () => { - return ( - <> -
- handleSettingChange("colorSighted", v)} - hideBorder - // biome-ignore lint/correctness/noChildrenProp: N/A - children="Color Sighted" - /> -
- -
- handleSettingChange("noNitroUpsell", v)} - hideBorder - // biome-ignore lint/correctness/noChildrenProp: N/A - children="No Nitro Upsell" - /> -
+const camelize = (str: string) => { + return str + .replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => + index === 0 ? word.toLowerCase() : word.toUpperCase(), + ) + .replace(/\s+/g, ""); +}; -
- handleSettingChange("noTypingAnimation", v)} - hideBorder - // biome-ignore lint/correctness/noChildrenProp: N/A - children="No Typing Animation" - /> -
+const makeModal = () => { + const remove = openModal(() => ( + + { + remove(); + }} + > + €tilities Settings + + + + {Object.keys(modules).map((module) => { + const mod = modules[module]; + return ( +
+ handleSettingChange(camelize(module), v)} + hideBorder + // biome-ignore lint/correctness/noChildrenProp: + children="" + > + {mod.title} +
+ {mod.content} +
+ +
+ ); + })} +
+ { + remove(); + }} + cancelText="Close" + confirmText="Apply" + onConfirm={() => { + location.reload(); + }} + /> +
+ )); +}; -
- handleSettingChange("steamStatusSync", v)} - hideBorder - // biome-ignore lint/correctness/noChildrenProp: N/A - children="Steam Status Sync" - /> -
- +export const settings = () => { + return ( +