mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 09:56:24 +00:00
small fixes
This commit is contained in:
parent
f5cfa6285f
commit
75646d7fd5
1 changed files with 10 additions and 4 deletions
|
@ -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 { OptionType } from "@utils/types";
|
||||
import definePlugin from "@utils/types";
|
||||
|
@ -9,18 +15,18 @@ const settings = definePluginSettings({
|
|||
type: OptionType.NUMBER,
|
||||
description: "Day Theme Start Time (Hour)",
|
||||
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: {
|
||||
type: OptionType.NUMBER,
|
||||
description: "Night Theme Start Time (Hour)",
|
||||
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") {
|
||||
const body = document.body;
|
||||
const { body } = document;
|
||||
if (theme === "light") {
|
||||
body.classList.remove("theme-dark");
|
||||
body.classList.add("theme-light");
|
||||
|
|
Loading…
Reference in a new issue