aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/richerCider.desktop.tsx67
-rw-r--r--src/plugins/viewIcons.tsx20
2 files changed, 10 insertions, 77 deletions
diff --git a/src/plugins/richerCider.desktop.tsx b/src/plugins/richerCider.desktop.tsx
deleted file mode 100644
index 8b6fb5e..0000000
--- a/src/plugins/richerCider.desktop.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Vencord, a modification for Discord's desktop app
- * Copyright (c) 2022 OpenAsar
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
-
-import { Link } from "@components/Link";
-import definePlugin from "@utils/types";
-import { Forms } from "@webpack/common";
-const appIds = [
- "911790844204437504",
- "886578863147192350",
- "1020414178047041627",
- "1032800329332445255"
-];
-export default definePlugin({
- name: "richerCider",
- description: "Enhances Cider (More details in info button) by adding the \"Listening to\" type prefix to the user's rich presence when an applicable ID is found.",
- authors: [{
- id: 191621342473224192n,
- name: "cryptofyre",
- }],
- patches: [
- {
- find: '.displayName="LocalActivityStore"',
- replacement: {
- match: /LOCAL_ACTIVITY_UPDATE:function\((\i)\)\{/,
- replace: "$&$self.patchActivity($1.activity);",
- }
- }
- ],
- settingsAboutComponent: () => (
- <>
- <Forms.FormTitle tag="h3">Install Cider to use this Plugin</Forms.FormTitle>
- <Forms.FormText>
- <Link href="https://cider.sh">Follow the link to our website</Link> to get Cider up and running, and then enable the plugin.
- </Forms.FormText>
- <br></br>
- <Forms.FormTitle tag="h3">What is Cider?</Forms.FormTitle>
- <Forms.FormText>
- Cider is an open-source and community oriented Apple Music client for Windows, macOS, and Linux.
- </Forms.FormText>
- <br></br>
- <Forms.FormTitle tag="h3">Recommended Optional Plugins</Forms.FormTitle>
- <Forms.FormText>
- I'd recommend using TimeBarAllActivities alongside this plugin to give off a much better visual to the eye (Keep in mind this only affects your client and will not show for other users)
- </Forms.FormText>
- </>
- ),
- patchActivity(activity: any) {
- if (appIds.includes(activity.application_id)) {
- activity.type = 2; /* LISTENING type */
- }
- },
-});
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx
index 26f2902..7d56538 100644
--- a/src/plugins/viewIcons.tsx
+++ b/src/plugins/viewIcons.tsx
@@ -19,7 +19,7 @@
import { Devs } from "@utils/constants";
import { LazyComponent } from "@utils/misc";
import { ModalRoot, ModalSize, openModal } from "@utils/modal";
-import { PluginDef } from "@utils/types";
+import definePlugin from "@utils/types";
import { find, findByCode, findByPropsLazy } from "@webpack";
import { Menu } from "@webpack/common";
import type { Guild } from "discord-types/general";
@@ -30,12 +30,12 @@ const MaskedLink = LazyComponent(() => find(m => m.type?.toString().includes("MA
const GuildBannerStore = findByPropsLazy("getGuildBannerURL");
const OPEN_URL = "Vencord.Plugins.plugins.ViewIcons.openImage(";
-export default new class ViewIcons implements PluginDef {
- name = "ViewIcons";
- authors = [Devs.Ven];
- description = "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.";
+export default definePlugin({
+ name: "ViewIcons",
+ authors: [Devs.Ven],
+ description: "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.",
- dependencies = ["MenuItemDeobfuscatorAPI"];
+ dependencies: ["MenuItemDeobfuscatorAPI"],
openImage(url: string) {
const u = new URL(url);
@@ -52,9 +52,9 @@ export default new class ViewIcons implements PluginDef {
/>
</ModalRoot>
));
- }
+ },
- patches = [
+ patches: [
{
find: "onAddFriend:",
replacement: {
@@ -83,7 +83,7 @@ export default new class ViewIcons implements PluginDef {
}
]
}
- ];
+ ],
buildGuildContextMenuEntries(guild: Guild) {
return (
@@ -107,4 +107,4 @@ export default new class ViewIcons implements PluginDef {
</Menu.MenuGroup>
);
}
-};
+});