Equicord/src/equicordplugins/themeLibrary/index.tsx

43 lines
1.3 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";
2026-02-10 18:14:25 -05:00
import SettingsPlugin from "@plugins/_core/settings";
2024-10-10 20:05:41 -04:00
import { EquicordDevs } from "@utils/constants";
2026-02-10 18:14:25 -05:00
import { removeFromArray } from "@utils/misc";
2024-10-10 20:02:24 -04:00
import definePlugin from "@utils/types";
import { SettingsRouter } from "@webpack/common";
2024-10-10 20:02:24 -04:00
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.openUserSettings("equicord_theme_library_panel");
2024-10-10 20:02:24 -04:00
},
},
start() {
2026-02-10 18:14:25 -05:00
SettingsPlugin.customEntries.push({
2026-01-29 15:03:23 -05:00
key: "theme_library",
2025-12-06 00:01:38 -05:00
title: "Theme Library",
Component: require("./components/ThemeTab").default,
Icon: ColorPaletteIcon
});
2025-12-06 19:34:36 -05:00
2026-02-10 18:14:25 -05:00
SettingsPlugin.settingsSectionMap.push(["EquicordThemeLibrary", "equicord_theme_library"]);
2024-10-10 20:02:24 -04:00
},
stop() {
2026-02-10 18:14:25 -05:00
removeFromArray(SettingsPlugin.customEntries, e => e.key === "equicord_theme_library");
removeFromArray(SettingsPlugin.settingsSectionMap, entry => entry[1] === "equicord_theme_library");
2024-10-10 20:02:24 -04:00
},
});