42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
/*
|
|
* Vencord, a Discord client mod
|
|
* Copyright (c) 2024 Vendicated and contributors
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
import { ColorPaletteIcon } from "@components/Icons";
|
|
import SettingsPlugin from "@plugins/_core/settings";
|
|
import { EquicordDevs } from "@utils/constants";
|
|
import { removeFromArray } from "@utils/misc";
|
|
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.",
|
|
authors: [EquicordDevs.Fafa],
|
|
settings,
|
|
toolboxActions: {
|
|
"Open Theme Library": () => {
|
|
SettingsRouter.openUserSettings("equicord_theme_library_panel");
|
|
},
|
|
},
|
|
|
|
start() {
|
|
SettingsPlugin.customEntries.push({
|
|
key: "theme_library",
|
|
title: "Theme Library",
|
|
Component: require("./components/ThemeTab").default,
|
|
Icon: ColorPaletteIcon
|
|
});
|
|
|
|
SettingsPlugin.settingsSectionMap.push(["EquicordThemeLibrary", "equicord_theme_library"]);
|
|
},
|
|
|
|
stop() {
|
|
removeFromArray(SettingsPlugin.customEntries, e => e.key === "equicord_theme_library");
|
|
removeFromArray(SettingsPlugin.settingsSectionMap, entry => entry[1] === "equicord_theme_library");
|
|
},
|
|
});
|