create bound components for text input and radio input

This commit is contained in:
Alex Holliday committed 2026-08-05 10:51:48 -07:00
1 parent 623db938f5
commit 6e1e5dd1a5
6 files changed
+1088 -1061

No files matched your search

+28
View File
@@ -20,6 +20,34 @@ export const MonitorTypes = [
] as const;
export type MonitorType = (typeof MonitorTypes)[number];
// The subset offered by the CreateMonitor type selector, in display order.
// pagespeed/hardware are set by their own pages; unknown is never selectable.
export const SelectableMonitorTypes = [
"http",
"ping",
"docker",
"port",
"game",
"grpc",
"websocket",
"dns",
] as const;
export type SelectableMonitorType = (typeof SelectableMonitorTypes)[number];
// Irregular i18n key fragments shared by the type selector's label
// (pages.common.monitors.monitorTypes.<fragment>) and description
// (pages.createMonitor.form.type.<fragment>Description) keys.
export const monitorTypeLabelKey: Record<SelectableMonitorType, string> = {
http: "optionHttp",
ping: "optionPing",
docker: "optionDocker",
port: "optionPort",
game: "optionGame",
grpc: "optionGrpc",
websocket: "optionWebSocket",
dns: "optionDns",
};
export const DnsRecordTypes = ["A", "AAAA", "CNAME", "MX", "TXT", "NS"] as const;
export type DnsRecordType = (typeof DnsRecordTypes)[number];