Trends & Forge tabs: complete redesign - cleaner UI, mobile-first, progressive disclosure
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,8 @@ interface TldCheckResult {
|
||||
}
|
||||
|
||||
// Popular TLDs to check when user enters only a name without extension
|
||||
const POPULAR_TLDS = ['com', 'net', 'org', 'io', 'ch', 'de', 'app', 'dev', 'co', 'ai']
|
||||
// Ordered by popularity/importance - most common first for faster perceived loading
|
||||
const POPULAR_TLDS = ['com', 'ch', 'io', 'net', 'org', 'de', 'ai', 'co', 'app', 'dev']
|
||||
|
||||
// Known valid TLDs (subset for quick validation)
|
||||
const KNOWN_TLDS = new Set([
|
||||
@ -131,7 +132,7 @@ export function SearchTab({ showToast }: SearchTabProps) {
|
||||
}
|
||||
}, [])
|
||||
|
||||
// Check multiple TLDs for a name
|
||||
// Check multiple TLDs for a name - with progressive loading and quick mode
|
||||
const checkMultipleTlds = useCallback(async (name: string) => {
|
||||
// Initialize results with loading state
|
||||
const initialResults: TldCheckResult[] = POPULAR_TLDS.map(tld => ({
|
||||
@ -142,31 +143,36 @@ export function SearchTab({ showToast }: SearchTabProps) {
|
||||
}))
|
||||
setTldResults(initialResults)
|
||||
|
||||
// Check each TLD in parallel
|
||||
const results = await Promise.all(
|
||||
POPULAR_TLDS.map(async (tld): Promise<TldCheckResult> => {
|
||||
const domain = `${name}.${tld}`
|
||||
try {
|
||||
const result = await api.checkDomain(domain)
|
||||
return {
|
||||
// Check each TLD in parallel with progressive updates (using quick=true for speed)
|
||||
POPULAR_TLDS.forEach(async (tld, index) => {
|
||||
const domain = `${name}.${tld}`
|
||||
try {
|
||||
// Use quick=true for DNS-only check (much faster!)
|
||||
const result = await api.checkDomain(domain, true)
|
||||
setTldResults(prev => {
|
||||
const updated = [...prev]
|
||||
updated[index] = {
|
||||
tld,
|
||||
domain,
|
||||
is_available: result.is_available,
|
||||
loading: false,
|
||||
}
|
||||
} catch {
|
||||
return {
|
||||
return updated
|
||||
})
|
||||
} catch {
|
||||
setTldResults(prev => {
|
||||
const updated = [...prev]
|
||||
updated[index] = {
|
||||
tld,
|
||||
domain,
|
||||
is_available: null,
|
||||
loading: false,
|
||||
error: 'Check failed',
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
setTldResults(results)
|
||||
return updated
|
||||
})
|
||||
}
|
||||
})
|
||||
}, [])
|
||||
|
||||
// Search Handler
|
||||
@ -303,10 +309,10 @@ export function SearchTab({ showToast }: SearchTabProps) {
|
||||
|
||||
{/* Stats Bar */}
|
||||
<div className="flex items-center justify-between text-[10px] font-mono text-white/40">
|
||||
<span>Enter a domain to check availability via RDAP/WHOIS</span>
|
||||
<span>Enter a name (checks 10 TLDs) or full domain (e.g. example.com)</span>
|
||||
<span className="flex items-center gap-1">
|
||||
<Sparkles className="w-3 h-3" />
|
||||
Instant check
|
||||
RDAP/WHOIS
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user