From db93401a81ea0b32ed980451ab995e131d4aeee1 Mon Sep 17 00:00:00 2001 From: Malin Date: Mon, 4 May 2026 20:00:50 +0200 Subject: [PATCH] fix: remove prescreen tab, use bulk bar select+prescreen only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - drop standalone Pre-screen tab (textarea upload) — confusing duplicate - bulk bar Pre-screen Selected button is the only entry point now - add prescreening flag with loading state on button + double-click guard - remove dead prescreenInput/prescreenRunning/prescreenResult state vars and runPrescreen() Co-Authored-By: Claude Sonnet 4.6 --- app/static/beauty/index.html | 44 +++++++----------------------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/app/static/beauty/index.html b/app/static/beauty/index.html index 196ef5a..1c520c9 100644 --- a/app/static/beauty/index.html +++ b/app/static/beauty/index.html @@ -102,7 +102,6 @@ textarea{width:100%;resize:vertical;font-family:monospace;font-size:12px} - @@ -160,7 +159,10 @@ textarea{width:100%;resize:vertical;font-family:monospace;font-size:12px}
- +
@@ -381,22 +383,6 @@ textarea{width:100%;resize:vertical;font-family:monospace;font-size:12px} -
-

- Phase 1 — HTTP check: marks domains live / dead / parked / redirect / error.
- Phase 2 — DeepSeek classifies niche (beauty_cosmetics, fashion_retail…) and site type (ecommerce, corporate…).
- Paste up to 200 domains, one per line. Results saved automatically — then use Browse to filter by beauty + ecommerce. -

- -
- - -
-
-
@@ -444,7 +430,7 @@ function app() { valSt: {running:false,processed:0,live:0,dead:0,error:0,parked:0,redirect:0,skipped:0,offset:0,rate:0}, valTld: '', valRescan: false, toasts: [], - prescreenInput: '', prescreenRunning: false, prescreenResult: '', + prescreening: false, exportQuality: '', exportCountry: '', f: {keyword:'', tld:'', prescreen_status:'live', niche:'beauty_cosmetics', site_type:'ecommerce', country:'', limit:'100', page:1}, @@ -530,7 +516,8 @@ function app() { }, async prescreenSelected() { - if (!this.selected.length) return; + if (!this.selected.length || this.prescreening) return; + this.prescreening = true; this.notify(`Pre-screening ${this.selected.length} domains…`, 'info'); try { const chunks = []; @@ -549,6 +536,7 @@ function app() { this.selected = []; await this.loadDomains(); } catch(e) { this.notify('Pre-screen failed: '+e.message, 'error'); } + finally { this.prescreening = false; } }, async assessSelected() { @@ -601,22 +589,6 @@ function app() { .catch(()=> this.notify('Copy failed', 'error')); }, - async runPrescreen() { - const lines = this.prescreenInput.split('\n').map(l=>l.trim()).filter(Boolean); - if (!lines.length) { this.notify('No domains entered', 'error'); return; } - if (lines.length > 200) { this.notify('Max 200 per batch', 'error'); return; } - this.prescreenRunning = true; this.prescreenResult = ''; - try { - const d = await fetch('/api/prescreen/batch', { - method:'POST', headers:{'Content-Type':'application/json'}, - body: JSON.stringify({domains: lines}), - }).then(r=>r.json()); - this.prescreenResult = `✅ ${d.live} live · ☠ ${d.dead} dead · 🅿 ${d.parked} parked · ↗ ${d.redirect} redirect · 🏷 ${d.classified} classified`; - this.notify(this.prescreenResult, 'success'); - } catch(e) { this.notify('Failed: '+e.message, 'error'); } - finally { this.prescreenRunning = false; } - }, - async startValidator() { const p = new URLSearchParams(); if (this.valTld) p.set('tld', this.valTld);