Equicord/src/plugins/clientTheme/index.tsx

39 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-11-21 12:30:29 -07:00
/*
* Vencord, a Discord client mod
* Copyright (c) 2023 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import "./clientTheme.css";
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType, StartAt } from "@utils/types";
2023-11-21 12:30:29 -07:00
import { ResetThemeColorComponent, ThemeSettingsComponent } from "./components/Settings";
import { disableClientTheme, startClientTheme } from "./utils/styleUtils";
export const settings = definePluginSettings({
2023-11-21 12:30:29 -07:00
color: {
type: OptionType.COMPONENT,
default: "313338",
component: ThemeSettingsComponent
2023-11-21 12:30:29 -07:00
},
resetColor: {
type: OptionType.COMPONENT,
component: ResetThemeColorComponent
2023-11-21 12:30:29 -07:00
}
});
export default definePlugin({
name: "ClientTheme",
authors: [Devs.Nuckyz],
2023-11-21 12:30:29 -07:00
description: "Recreation of the old client theme experiment. Add a color to your Discord client theme",
2026-04-16 13:45:58 -04:00
tags: ["Appearance", "Customisation"],
2023-11-21 12:30:29 -07:00
settings,
startAt: StartAt.DOMContentLoaded,
start: () => startClientTheme(settings.store.color),
stop: disableClientTheme
2023-11-21 12:30:29 -07:00
});