fix: beauty Browse uses /api/domains (DuckDB) like main DomGod
- loadDomains() now calls /api/domains (72M domain index) instead of /api/enriched - keyword and TLD filters are server-side (DuckDB); prescreen_status, niche, site_type, country are client-side — same pattern as main DomGod _fetch() - "Not checked" now correctly finds domains that exist in DuckDB but have never been pre-screened (no row in enriched_domains, so no prescreen_status) - results info shows "X shown · Y matching · page N" to reflect DuckDB total vs client-side-filtered visible count Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,7 +153,7 @@ textarea{width:100%;resize:vertical;font-family:monospace;font-size:12px}
|
||||
</select>
|
||||
<button class="btn-primary" @click="goSearch()">Search</button>
|
||||
<button class="btn-secondary" @click="resetFilters()">Reset</button>
|
||||
<span class="page-info" style="margin-left:auto" x-text="domainsTotal.toLocaleString()+' results · page '+f.page"></span>
|
||||
<span class="page-info" style="margin-left:auto" x-text="domains.length+' shown · '+domainsTotal.toLocaleString()+' matching · page '+f.page"></span>
|
||||
</div>
|
||||
|
||||
<!-- Bulk bar (visible when items selected) -->
|
||||
@@ -478,15 +478,18 @@ function app() {
|
||||
this.loading = true;
|
||||
try {
|
||||
const p = new URLSearchParams({page: this.f.page, limit: this.f.limit});
|
||||
if (this.f.keyword) p.set('keyword', this.f.keyword.trim());
|
||||
if (this.f.tld) p.set('tld', this.f.tld.trim());
|
||||
if (this.f.prescreen_status) p.set('prescreen_status', this.f.prescreen_status);
|
||||
if (this.f.niche) p.set('niche', this.f.niche);
|
||||
if (this.f.site_type) p.set('site_type', this.f.site_type);
|
||||
if (this.f.country) p.set('country', this.f.country.trim().toUpperCase());
|
||||
const d = await fetch('/api/enriched?' + p).then(r=>r.json());
|
||||
this.domains = d.results || [];
|
||||
this.domainsTotal = d.total || 0;
|
||||
if (this.f.keyword) p.set('keyword', this.f.keyword.trim());
|
||||
if (this.f.tld) p.set('tld', this.f.tld.trim());
|
||||
const d = await fetch('/api/domains?' + p).then(r=>r.json());
|
||||
this.domainsTotal = d.total || 0;
|
||||
let rows = d.results || [];
|
||||
// Client-side filters (same pattern as main DomGod)
|
||||
if (this.f.prescreen_status === 'none') rows = rows.filter(r => !r.prescreen_status);
|
||||
else if (this.f.prescreen_status) rows = rows.filter(r => r.prescreen_status === this.f.prescreen_status);
|
||||
if (this.f.niche) rows = rows.filter(r => r.niche === this.f.niche);
|
||||
if (this.f.site_type) rows = rows.filter(r => r.site_type === this.f.site_type);
|
||||
if (this.f.country) rows = rows.filter(r => r.ip_country === this.f.country.trim().toUpperCase());
|
||||
this.domains = rows;
|
||||
} catch(e) { this.notify('Failed to load: '+e.message, 'error'); }
|
||||
finally { this.loading = false; }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user