fix entity placeholder, pulse animate autodetected target, remove completed todo

This commit is contained in:
2024-05-11 05:27:21 -05:00
parent 88e822e286
commit c6a31f341c
3 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ const LookupInput: FunctionComponent<LookupInputProps> = ({
{selected == "auto" ? ( {selected == "auto" ? (
// If the detected type was provided, then notate which in parentheses. Compact object naming might be better in the future. // If the detected type was provided, then notate which in parentheses. Compact object naming might be better in the future.
detectedType.isJust ? ( detectedType.isJust ? (
`Auto (${targetShortNames[detectedType.value]})` <>Auto (<span className="animate-pulse">{targetShortNames[detectedType.value]}</span>)</>
) : ( ) : (
objectNames["auto"] objectNames["auto"]
) )
+1 -1
View File
@@ -83,7 +83,7 @@ export const placeholders: Record<SimplifiedTargetType | "auto", string> = {
auto: "A domain, an IP address, a TLD, an RDAP URL...", auto: "A domain, an IP address, a TLD, an RDAP URL...",
ip: "192.168.0.1/16 or 2001:db8::/32", ip: "192.168.0.1/16 or 2001:db8::/32",
autnum: "AS27594", autnum: "AS27594",
entity: "ABC123-EXAMPLE", entity: "OPS4-RIPE",
url: "https://rdap.org/domain/example.com", url: "https://rdap.org/domain/example.com",
tld: ".dev", tld: ".dev",
registrar: "9999", registrar: "9999",
-1
View File
@@ -757,7 +757,6 @@ export function createRDAPLink(url, title) {
} }
*/ */
// TODO: Provide full domain, TLD, Ipv4 & Ipv6 validators
const TypeValidators: Record<TargetType, (value: string) => boolean> = { const TypeValidators: Record<TargetType, (value: string) => boolean> = {
autnum: (value) => /^AS\d+$/.test(value), autnum: (value) => /^AS\d+$/.test(value),
ip4: (value) => /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/?\d*$/.test(value), ip4: (value) => /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/?\d*$/.test(value),