mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-26 17:26:22 +00:00
Holy Notes
This commit is contained in:
parent
b0d37c981e
commit
75f9d2ca05
3 changed files with 78 additions and 1 deletions
17
src/plugins/holynotes/components/icons/NoteButton.tsx
Normal file
17
src/plugins/holynotes/components/icons/NoteButton.tsx
Normal file
|
@ -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<SVGSVGElement>): JSX.Element => (
|
||||||
|
<svg viewBox="6 3.7 16 16" width={24} height={24} {...(props as React.SVGProps<SVGSVGElement>)}>
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M15.44,5H12.88v6.42L11.12,9.67,9.38,11.42V5H7a.58.58,0,0,0-.58.58V16.5a.56.56,0,0,0,.09.31l1.18,1.91a.55.55,0,0,0,.49.28H17a.58.58,0,0,0,.58-.58V8.48a.52.52,0,0,0-.07-.27L16,5.31A.6.6,0,0,0,15.44,5Zm.94,12.83H8.52l-.71-1.16h7.4a.58.58,0,0,0,.58-.59V7.41l.59,1.25Z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default component;
|
||||||
|
export const Popover = component as unknown as (props: unknown) => JSX.Element;
|
55
src/plugins/holynotes/index.tsx
Normal file
55
src/plugins/holynotes/index.tsx
Normal file
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
});
|
|
@ -422,7 +422,12 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
||||||
Kyuuhachi: {
|
Kyuuhachi: {
|
||||||
name: "Kyuuhachi",
|
name: "Kyuuhachi",
|
||||||
id: 236588665420251137n,
|
id: 236588665420251137n,
|
||||||
}
|
},
|
||||||
|
Wolfie: {
|
||||||
|
name: "Wolfie",
|
||||||
|
id: 347096063569559553n
|
||||||
|
},
|
||||||
|
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
// iife so #__PURE__ works correctly
|
// iife so #__PURE__ works correctly
|
||||||
|
|
Loading…
Reference in a new issue