Regex settings #3

This commit is contained in:
2025-10-02 12:39:43 +02:00
parent 99a1b3b264
commit 0734dde01e
4 changed files with 97 additions and 25 deletions
+8 -3
View File
@@ -1,15 +1,20 @@
import { SettingsSchema } from "@/app/settings/settings";
import { RegexSetting, SettingsSchema } from "@/app/settings/settings";
export interface ClientSettings {
theme: "light" | "dark";
}
export interface AccountSettings {}
export interface AccountSettings {
node_ip: string;
}
export const CLIENT_SCHEMA: SettingsSchema = {
theme: ["light", "dark"],
};
export const ACCOUNT_SCHEMA: SettingsSchema = {
node_ip: "string",
node_ip: new RegexSetting(
"node2.voxa.org",
/^(?:(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}|(?:\d{1,3}\.){3}\d{1,3})$/
),
};