q6 commited on
Commit
5514a58
·
1 Parent(s): 0401e0a

Remove progress tab

Browse files
Files changed (4) hide show
  1. backend/app.py +1 -1
  2. frontend/app.js +4 -25
  3. frontend/index.html +0 -9
  4. frontend/style.css +3 -31
backend/app.py CHANGED
@@ -697,7 +697,7 @@ async def bg_search_and_scan_task(search_id, url, pages, mode, phpsessid):
697
  class SearchRequest(BaseModel):
698
  url: str
699
  pages: int = 30
700
- mode: str = "all"
701
  action: str = "search"
702
 
703
 
 
697
  class SearchRequest(BaseModel):
698
  url: str
699
  pages: int = 30
700
+ mode: str = "ai"
701
  action: str = "search"
702
 
703
 
frontend/app.js CHANGED
@@ -63,9 +63,12 @@ function route() {
63
  const parts = path.split("/").filter(Boolean)
64
  const tab = parts[0] || "submit"
65
  const params = new URLSearchParams(qs)
 
 
 
 
66
  $$(".tab").forEach(t => t.classList.toggle("active", t.dataset.tab === tab))
67
  $$(".panel").forEach(p => p.classList.toggle("active", p.id === tab))
68
- if (tab === "progress") loadProgress()
69
  if (tab === "explorer") {
70
  if (parts[1]) {
71
  openSearch(decodeURIComponent(parts[1]), parseInt(params.get("page")) || 1, params.get("exif") !== "0")
@@ -335,30 +338,6 @@ async function renameSearch(id) {
335
  loadSearches()
336
  }
337
 
338
- async function loadProgress() {
339
- const el = $("#progress-list")
340
- try {
341
- const resp = await fetch("/api/progress")
342
- const tasks = await resp.json()
343
- if (!tasks.length) { el.innerHTML = '<div class="progress-empty">No active tasks</div>'; return }
344
- el.innerHTML = tasks.map(t => {
345
- const pct = t.total > 0 ? Math.round(t.done / t.total * 100) : 0
346
- const label = t.total > 0 ? `${t.done} / ${t.total}` : "..."
347
- return `<div class="progress-item">
348
- <div class="progress-info">
349
- <span class="progress-id">${t.id}</span>
350
- <span class="progress-type">${t.type}</span>
351
- <span class="progress-phase">${t.phase}</span>
352
- <span class="progress-label">${label}</span>
353
- </div>
354
- <div class="progress-bar-bg"><div class="progress-bar-fill" style="width:${pct}%"></div></div>
355
- </div>`
356
- }).join("")
357
- } catch (e) {
358
- el.innerHTML = `<div class="progress-empty">Error: ${e.message}</div>`
359
- }
360
- }
361
-
362
  window.addEventListener("hashchange", route)
363
  if (!location.hash) location.hash = "#/submit"
364
  route()
 
63
  const parts = path.split("/").filter(Boolean)
64
  const tab = parts[0] || "submit"
65
  const params = new URLSearchParams(qs)
66
+ if (tab === "progress") {
67
+ location.hash = "#/explorer"
68
+ return
69
+ }
70
  $$(".tab").forEach(t => t.classList.toggle("active", t.dataset.tab === tab))
71
  $$(".panel").forEach(p => p.classList.toggle("active", p.id === tab))
 
72
  if (tab === "explorer") {
73
  if (parts[1]) {
74
  openSearch(decodeURIComponent(parts[1]), parseInt(params.get("page")) || 1, params.get("exif") !== "0")
 
338
  loadSearches()
339
  }
340
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  window.addEventListener("hashchange", route)
342
  if (!location.hash) location.hash = "#/submit"
343
  route()
frontend/index.html CHANGED
@@ -12,7 +12,6 @@
12
  <div class="brand">Pixif2</div>
13
  <nav>
14
  <button class="tab active" data-tab="submit">Submit</button>
15
- <button class="tab" data-tab="progress">Progress</button>
16
  <button class="tab" data-tab="explorer">Explorer</button>
17
  </nav>
18
  </header>
@@ -45,14 +44,6 @@
45
  <div id="submit-status"></div>
46
  </section>
47
 
48
- <section id="progress" class="panel">
49
- <div class="section-head">
50
- <h1>Progress</h1>
51
- <span>Active tasks</span>
52
- </div>
53
- <div id="progress-list"></div>
54
- </section>
55
-
56
  <section id="explorer" class="panel">
57
  <div class="section-head">
58
  <h1>Explorer</h1>
 
12
  <div class="brand">Pixif2</div>
13
  <nav>
14
  <button class="tab active" data-tab="submit">Submit</button>
 
15
  <button class="tab" data-tab="explorer">Explorer</button>
16
  </nav>
17
  </header>
 
44
  <div id="submit-status"></div>
45
  </section>
46
 
 
 
 
 
 
 
 
 
47
  <section id="explorer" class="panel">
48
  <div class="section-head">
49
  <h1>Explorer</h1>
frontend/style.css CHANGED
@@ -170,7 +170,7 @@ input:focus, select:focus { outline: none; border-color: var(--accent); backgrou
170
  display: grid;
171
  gap: .5rem;
172
  }
173
- .search-item, .progress-item {
174
  display: grid;
175
  grid-template-columns: minmax(0, 1fr) auto auto;
176
  align-items: center;
@@ -182,8 +182,8 @@ input:focus, select:focus { outline: none; border-color: var(--accent); backgrou
182
  border-radius: 6px;
183
  transition: border-color .15s, transform .15s, background .15s;
184
  }
185
- .search-item:hover, .progress-item:hover { border-color: var(--accent); background: var(--panel-2); transform: translateY(-1px); }
186
- .search-item .id, .progress-id {
187
  color: var(--accent);
188
  font-family: Consolas, "SFMono-Regular", monospace;
189
  font-size: .88rem;
@@ -339,33 +339,6 @@ input:focus, select:focus { outline: none; border-color: var(--accent); backgrou
339
  .exif-5, .exif-6 { background: #232323; color: #aaa; }
340
  .exif-7 { background: #2a172a; color: #d9a; }
341
  .not-scanned, .no-exif { color: var(--dim); background: #181818; }
342
- .progress-empty {
343
- color: var(--muted);
344
- padding: 1rem 0;
345
- }
346
- .progress-info {
347
- display: grid;
348
- grid-template-columns: minmax(0, 1fr) auto auto auto;
349
- align-items: center;
350
- gap: .75rem;
351
- font-size: .86rem;
352
- }
353
- .progress-type { color: var(--text); }
354
- .progress-phase { color: var(--warn); }
355
- .progress-label { color: var(--muted); }
356
- .progress-bar-bg {
357
- grid-column: 1 / -1;
358
- height: 7px;
359
- margin-top: .5rem;
360
- background: #25282b;
361
- border-radius: 999px;
362
- overflow: hidden;
363
- }
364
- .progress-bar-fill {
365
- height: 100%;
366
- background: var(--accent);
367
- transition: width .25s ease;
368
- }
369
  #viewer {
370
  position: fixed;
371
  inset: 0;
@@ -425,5 +398,4 @@ input:focus, select:focus { outline: none; border-color: var(--accent); backgrou
425
  .search-actions, .mini-bar { grid-column: 1 / -1; }
426
  .detail-header { grid-template-columns: 1fr; }
427
  #results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: none; }
428
- .progress-info { grid-template-columns: 1fr; }
429
  }
 
170
  display: grid;
171
  gap: .5rem;
172
  }
173
+ .search-item {
174
  display: grid;
175
  grid-template-columns: minmax(0, 1fr) auto auto;
176
  align-items: center;
 
182
  border-radius: 6px;
183
  transition: border-color .15s, transform .15s, background .15s;
184
  }
185
+ .search-item:hover { border-color: var(--accent); background: var(--panel-2); transform: translateY(-1px); }
186
+ .search-item .id {
187
  color: var(--accent);
188
  font-family: Consolas, "SFMono-Regular", monospace;
189
  font-size: .88rem;
 
339
  .exif-5, .exif-6 { background: #232323; color: #aaa; }
340
  .exif-7 { background: #2a172a; color: #d9a; }
341
  .not-scanned, .no-exif { color: var(--dim); background: #181818; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  #viewer {
343
  position: fixed;
344
  inset: 0;
 
398
  .search-actions, .mini-bar { grid-column: 1 / -1; }
399
  .detail-header { grid-template-columns: 1fr; }
400
  #results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-height: none; }
 
401
  }