diff --git a/src/plugins/holynotes/components/icons/NoteButton.tsx b/src/plugins/holynotes/components/icons/NoteButton.tsx new file mode 100644 index 000000000..3683c4bf5 --- /dev/null +++ b/src/plugins/holynotes/components/icons/NoteButton.tsx @@ -0,0 +1,17 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +const component = (props: React.SVGProps): JSX.Element => ( + )}> + + +); + +export default component; +export const Popover = component as unknown as (props: unknown) => JSX.Element; diff --git a/src/plugins/holynotes/index.tsx b/src/plugins/holynotes/index.tsx new file mode 100644 index 000000000..015c7b218 --- /dev/null +++ b/src/plugins/holynotes/index.tsx @@ -0,0 +1,55 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2024 Vendicated and contributors + * + * 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 . +*/ + +import { addButton, removeButton } from "@api/MessagePopover"; +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; + +import { Popover as NoteButtonPopover } from "./components/icons/NoteButton"; + +export default definePlugin({ + name: "HolyNotes", + description: "Holy Notes allows you to save messages", + authors: [Devs.Wolfie], + dependencies: ["MessagePopoverAPI", "ChatInputButtonAPI"], + + + toolboxActions: { + async "Open Notes"() { + + } + }, + + async start() { + addButton("HolyNotes", message => { + console.log("HolyNotes", message); + + return { + label: "Save Note", + icon: NoteButtonPopover, + onClick: () => { + console.log("Clicked on Save Note"); + } + }; + }); + }, + + async stop() { + removeButton("HolyNotes"); + } +}); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index d213ce272..fd63fe55f 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -422,7 +422,12 @@ export const Devs = /* #__PURE__*/ Object.freeze({ Kyuuhachi: { name: "Kyuuhachi", id: 236588665420251137n, - } + }, + Wolfie: { + name: "Wolfie", + id: 347096063569559553n + }, + } satisfies Record); // iife so #__PURE__ works correctly