Regex settings #3
This commit is contained in:
@@ -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})$/
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user