1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-10 09:56:24 +00:00

small fixes

This commit is contained in:
MiguVT 2024-09-16 16:02:28 +02:00
parent f5cfa6285f
commit 75646d7fd5

View file

@ -1,4 +1,10 @@
import { definePluginSettings, Settings } from "@api/Settings"; /*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { OptionType } from "@utils/types"; import { OptionType } from "@utils/types";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
@ -9,18 +15,18 @@ const settings = definePluginSettings({
type: OptionType.NUMBER, type: OptionType.NUMBER,
description: "Day Theme Start Time (Hour)", description: "Day Theme Start Time (Hour)",
default: 8, // Default: 8 AM default: 8, // Default: 8 AM
isValid: (value) => value >= 0 && value <= 23 || "Must be a valid hour (0-23)" isValid: value => value >= 0 && value <= 23 || "Must be a valid hour (0-23)"
}, },
nightTime: { nightTime: {
type: OptionType.NUMBER, type: OptionType.NUMBER,
description: "Night Theme Start Time (Hour)", description: "Night Theme Start Time (Hour)",
default: 20, // Default: 8 PM default: 20, // Default: 8 PM
isValid: (value) => value >= 0 && value <= 23 || "Must be a valid hour (0-23)" isValid: value => value >= 0 && value <= 23 || "Must be a valid hour (0-23)"
} }
}); });
function setTheme(theme: "light" | "dark") { function setTheme(theme: "light" | "dark") {
const body = document.body; const { body } = document;
if (theme === "light") { if (theme === "light") {
body.classList.remove("theme-dark"); body.classList.remove("theme-dark");
body.classList.add("theme-light"); body.classList.add("theme-light");