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";
|
2023-11-22 06:14:16 +01:00
|
|
|
import definePlugin, { OptionType, StartAt } from "@utils/types";
|
2023-11-21 12:30:29 -07:00
|
|
|
|
2025-05-04 13:55:52 -03:00
|
|
|
import { ResetThemeColorComponent, ThemeSettingsComponent } from "./components/Settings";
|
|
|
|
|
import { disableClientTheme, startClientTheme } from "./utils/styleUtils";
|
2025-02-02 01:37:54 +01:00
|
|
|
|
2025-05-04 13:55:52 -03:00
|
|
|
export const settings = definePluginSettings({
|
2023-11-21 12:30:29 -07:00
|
|
|
color: {
|
|
|
|
|
type: OptionType.COMPONENT,
|
|
|
|
|
default: "313338",
|
2025-05-04 13:55:52 -03:00
|
|
|
component: ThemeSettingsComponent
|
2023-11-21 12:30:29 -07:00
|
|
|
},
|
|
|
|
|
resetColor: {
|
|
|
|
|
type: OptionType.COMPONENT,
|
2025-05-04 13:55:52 -03:00
|
|
|
component: ResetThemeColorComponent
|
2023-11-21 12:30:29 -07:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default definePlugin({
|
|
|
|
|
name: "ClientTheme",
|
2024-11-23 19:08:53 -07:00
|
|
|
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,
|
|
|
|
|
|
2023-11-22 06:14:16 +01:00
|
|
|
startAt: StartAt.DOMContentLoaded,
|
2025-05-04 13:55:52 -03:00
|
|
|
start: () => startClientTheme(settings.store.color),
|
|
|
|
|
stop: disableClientTheme
|
2023-11-21 12:30:29 -07:00
|
|
|
});
|