Equicord/src/equicordplugins/themeLibrary/index.tsx

43 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-05-04 00:50:59 -04:00
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
2025-12-06 00:01:38 -05:00
import { ColorPaletteIcon } from "@components/Icons";
import SettingsPlugin from "@plugins/_core/settings";
2024-10-10 20:05:41 -04:00
import { EquicordDevs } from "@utils/constants";
2024-10-10 20:02:24 -04:00
import definePlugin from "@utils/types";
import { SettingsRouter } from "@webpack/common";
import { settings } from "./utils/settings";
export default definePlugin({
name: "ThemeLibrary",
description: "A library of themes for Vencord.",
2024-10-10 20:05:41 -04:00
authors: [EquicordDevs.Fafa],
2024-10-10 20:02:24 -04:00
settings,
toolboxActions: {
"Open Theme Library": () => {
SettingsRouter.open("ThemeLibrary");
},
},
start() {
2025-12-06 00:01:38 -05:00
const customEntriesSections = SettingsPlugin.customEntries;
2024-10-10 20:02:24 -04:00
2025-12-06 00:01:38 -05:00
customEntriesSections.push({
key: "theme_library",
title: "Theme Library",
Component: require("./components/ThemeTab").default,
Icon: ColorPaletteIcon
});
2024-10-10 20:02:24 -04:00
},
stop() {
2025-12-06 00:01:38 -05:00
const customEntriesSections = SettingsPlugin.customEntries;
const i = customEntriesSections.findIndex(entry => entry.key === "theme_library");
if (i !== -1) customEntriesSections.splice(i, 1);
2024-10-10 20:02:24 -04:00
},
});