ghstedpixel commited on
Commit
dd5a44b
·
verified ·
1 Parent(s): 6bc5dbb

Update dashboard.html

Browse files
Files changed (1) hide show
  1. dashboard.html +202 -76
dashboard.html CHANGED
@@ -30,21 +30,32 @@
30
  h3 { font-size: 18px; font-weight: 600; color: #ffffff; margin-top: 0; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
31
  .status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 30px; background: rgba(255,255,255,0.02); padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-color); }
32
  .status-pill { width: 8px; height: 8px; background: {{ status_color }}; border-radius: 50%; box-shadow: 0 0 12px {{ status_color }}; }
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  .card { background: var(--card-bg); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); margin-bottom: 24px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); }
34
 
35
- /* Floating Elevation Effect for Search Container */
36
  .search-card {
37
- background: #181c2e; /* Tinted slightly lighter than background to stand out */
38
  border: 1px solid rgba(255, 255, 255, 0.12);
39
- transform: translateY(-6px); /* Lifts the card physically off the grid layer */
40
  box-shadow:
41
  0 20px 38px rgba(0, 0, 0, 0.55),
42
  0 15px 12px rgba(0, 0, 0, 0.22),
43
  0 1px 3px rgba(255, 255, 255, 0.05) inset;
44
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
45
  }
46
-
47
- /* Interactive feedback when interacting with inputs inside the floating block */
48
  .search-card:focus-within {
49
  transform: translateY(-9px);
50
  border-color: rgba(59, 130, 246, 0.35);
@@ -137,6 +148,46 @@
137
  document.getElementById("submit-btn").style.display = "none";
138
  document.getElementById("loader-zone").style.display = "block";
139
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  </script>
141
  </head>
142
  <body>
@@ -224,84 +275,159 @@
224
  <div class="error">{{ error_msg }}</div>
225
  {% endif %}
226
 
227
- <div class="card search-card">
228
- <h3>
229
- <svg class="icon" style="color:var(--accent-blue);" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
230
- Run On-Demand Scan
231
- </h3>
232
- <p style="font-size: 12px; color: var(--text-muted); margin-top: -10px; margin-bottom: 15px;">💡 Append an asterisk to force an engine refresh (e.g. <i>nike shorts *</i>)</p>
233
- <form action="/search" method="post" onsubmit="triggerLoadingState()">
234
- <div class="input-flex">
235
- <div class="input-group">
236
- <label>Enter Product Details OR Paste Product Link</label>
237
- <input type="text" name="product_name" value="{{ prev_name }}" placeholder="e.g., Creed Green Irish Tweed OR https://www.store.com/item" autocomplete="off" required>
238
- </div>
239
- <div class="input-group size-group">
240
- <label>Size / Variant</label>
241
- <input type="text" name="product_size" value="{{ prev_size }}" placeholder="e.g., 3.4 oz, XL, 10.5" autocomplete="off">
242
- </div>
243
- <div class="input-group gender-group">
244
- <label>Gender</label>
245
- <select name="product_gender">
246
- <option value="unisex" {% if prev_gender == "unisex" %}selected{% endif %}>All</option>
247
- <option value="mens" {% if prev_gender == "mens" %}selected{% endif %}>Men's</option>
248
- <option value="womens" {% if prev_gender == "womens" %}selected{% endif %}>Women's</option>
249
- <option value="kids" {% if prev_gender == "kids" %}selected{% endif %}>Kids'</option>
250
- </select>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  </div>
252
- <div class="input-group mode-group">
253
- <label>Search Strategy</label>
254
- <select name="search_mode">
255
- <option value="broad" {% if prev_mode == "broad" %}selected{% endif %}>Broad Exploration</option>
256
- <option value="balanced" {% if prev_mode == "balanced" %}selected{% endif %}>Standard Balanced</option>
257
- <option value="exact" {% if prev_mode == "exact" %}selected{% endif %}>Precision Match</option>
258
- </select>
 
 
259
  </div>
260
- </div>
261
- <button type="submit" id="submit-btn">
262
- <svg class="icon" viewBox="0 0 24 24"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/></svg>
263
- Execute Price Scout Sweep
264
- </button>
265
- <div id="loader-zone" class="loader-box">
266
- <p style="color: var(--text-muted); font-size: 14px; margin-bottom: 15px; text-align: center;">⚡ Price Scout is assembling structural pricing matrices across real-time storage nodes...</p>
267
- <div style="height: 64px; width: 100%; margin-bottom: 12px;" class="skeleton"></div>
268
- <div style="height: 64px; width: 100%; margin-bottom: 12px;" class="skeleton"></div>
269
- <div style="height: 64px; width: 100%;" class="skeleton"></div>
270
- </div>
271
- </form>
272
- </div>
273
 
274
- {% if show_results %}
275
- <div class="card" style="border-color: var(--accent-green);">
276
- <h3>Results Matrix for: <span style="color: var(--accent-blue); margin-left: 4px;"><b>{{ target_item }}{{ size_header }}</b></span></h3>
277
-
278
- {% if deals %}
279
- <p style="color:var(--accent-green); font-weight:600; margin-top:-10px; font-size:15px; margin-bottom: 20px;">🏆 Lowest verified online price: ${{ "%.2f"|format(deals[0].price) }}</p>
280
-
281
- <ul style="margin-top: 15px;">
282
- {% for deal in deals[:10] %}
283
- {{ render_deal_row(deal, loop.index0, target_item, coupons, is_ref_url) }}
284
- {% endfor %}
285
- </ul>
286
-
287
- {% if deals|length > 10 %}
288
- <details>
289
- <summary>
290
- <svg class="icon" viewBox="0 0 24 24" style="width:14px; height:14px;"><path d="M7 10l5 5 5-5z"/></svg>
291
- View Additional Pricing Options (+{{ deals|length - 10 }} more variants found)
292
- </summary>
293
  <ul style="margin-top: 15px;">
294
- {% for deal in deals[10:20] %}
295
- {{ render_deal_row(deal, loop.index0 + 10, target_item, coupons, is_ref_url) }}
296
  {% endfor %}
297
  </ul>
298
- </details>
299
- {% endif %}
300
-
301
- {% else %}
302
- <p style="color: var(--text-muted); margin: 0;">⚠️ No verifiable pricing matrices were found matching this selection criteria.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  {% endif %}
304
  </div>
305
- {% endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  </body>
307
  </html>
 
30
  h3 { font-size: 18px; font-weight: 600; color: #ffffff; margin-top: 0; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
31
  .status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 30px; background: rgba(255,255,255,0.02); padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-color); }
32
  .status-pill { width: 8px; height: 8px; background: {{ status_color }}; border-radius: 50%; box-shadow: 0 0 12px {{ status_color }}; }
33
+
34
+ /* UI Tab Navigation Bar Architecture Styles */
35
+ .tabs-nav { display: flex; gap: 8px; margin-bottom: 32px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
36
+ .tab-btn { background: none; border: none; box-shadow: none; color: var(--text-muted); font-size: 14px; font-weight: 600; padding: 10px 18px; width: auto; cursor: pointer; border-radius: 8px; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 8px; }
37
+ .tab-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.04); }
38
+ .tab-btn.active { color: #ffffff; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.25); }
39
+ .tab-content { display: none; }
40
+ .tab-content.active { display: block; }
41
+
42
+ /* Dynamic Filter Bar Elements Layout */
43
+ .filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; background: rgba(255,255,255,0.02); padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border-color); width: fit-content; }
44
+ .filter-select { width: 180px !important; height: 38px !important; padding: 8px 12px !important; font-size: 13px !important; }
45
+
46
  .card { background: var(--card-bg); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); margin-bottom: 24px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); }
47
 
48
+ /* Floating Elevation Effect with Drop Shadow Context */
49
  .search-card {
50
+ background: #181c2e;
51
  border: 1px solid rgba(255, 255, 255, 0.12);
52
+ transform: translateY(-6px);
53
  box-shadow:
54
  0 20px 38px rgba(0, 0, 0, 0.55),
55
  0 15px 12px rgba(0, 0, 0, 0.22),
56
  0 1px 3px rgba(255, 255, 255, 0.05) inset;
57
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
58
  }
 
 
59
  .search-card:focus-within {
60
  transform: translateY(-9px);
61
  border-color: rgba(59, 130, 246, 0.35);
 
148
  document.getElementById("submit-btn").style.display = "none";
149
  document.getElementById("loader-zone").style.display = "block";
150
  }
151
+
152
+ // High-Speed Tab Switch Context Manager
153
+ function switchViewTab(targetTabId) {
154
+ document.querySelectorAll('.tab-content').forEach(element => element.classList.remove('active'));
155
+ document.querySelectorAll('.tab-btn').forEach(element => element.classList.remove('active'));
156
+
157
+ document.getElementById(targetTabId + '-view').classList.add('active');
158
+ event.currentTarget.classList.add('active');
159
+ }
160
+
161
+ // Adaptive Category Matrix Filter Function
162
+ function executeCategoryFilter() {
163
+ const selectedCategory = document.getElementById('type-filter').value;
164
+ document.querySelectorAll('.popular-deal-item').forEach(item => {
165
+ const rowType = item.getAttribute('data-type');
166
+ if (selectedCategory === 'all' || rowType === selectedCategory) {
167
+ item.style.display = 'block';
168
+ } else {
169
+ item.style.display = 'none';
170
+ }
171
+ });
172
+ }
173
+
174
+ // Automatic Dynamic Dropdown Provisioner Sequence
175
+ document.addEventListener("DOMContentLoaded", function() {
176
+ const filterDropdown = document.getElementById('type-filter');
177
+ if (filterDropdown) {
178
+ const verifiedTypes = new Set();
179
+ document.querySelectorAll('.popular-deal-item').forEach(item => {
180
+ const extractedType = item.getAttribute('data-type');
181
+ if (extractedType) verifiedTypes.add(extractedType);
182
+ });
183
+ verifiedTypes.forEach(category => {
184
+ const optElement = document.createElement('option');
185
+ optElement.value = category;
186
+ optElement.textContent = category;
187
+ filterDropdown.appendChild(optElement);
188
+ });
189
+ }
190
+ });
191
  </script>
192
  </head>
193
  <body>
 
275
  <div class="error">{{ error_msg }}</div>
276
  {% endif %}
277
 
278
+ <div class="tabs-nav">
279
+ <button class="tab-btn {% if active_tab == 'scan' %}active{% endif %}" onclick="switchViewTab('scan')">
280
+ <svg class="icon" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
281
+ On-Demand Engine
282
+ </button>
283
+ <button class="tab-btn {% if active_tab == 'popular' %}active{% endif %}" onclick="switchViewTab('popular')">
284
+ <svg class="icon" viewBox="0 0 24 24"><path d="M12 2l3.09 6.3 6.91 1-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.17 2 9.3l6.91-1L12 2z"/></svg>
285
+ Most Popular Deals
286
+ </button>
287
+ </div>
288
+
289
+ <div id="scan-view" class="tab-content {% if active_tab == 'scan' %}active{% endif %}">
290
+ <div class="card search-card">
291
+ <h3>
292
+ <svg class="icon" style="color:var(--accent-blue);" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
293
+ Run On-Demand Scan
294
+ </h3>
295
+ <p style="font-size: 12px; color: var(--text-muted); margin-top: -10px; margin-bottom: 15px;">💡 Append an asterisk to force an engine refresh (e.g. <i>nike shorts *</i>)</p>
296
+ <form action="/search" method="post" onsubmit="triggerLoadingState()">
297
+ <div class="input-flex">
298
+ <div class="input-group">
299
+ <label>Enter Product Details OR Paste Product Link</label>
300
+ <input type="text" name="product_name" value="{{ prev_name }}" placeholder="e.g., Creed Green Irish Tweed OR https://www.store.com/item" autocomplete="off" required>
301
+ </div>
302
+ <div class="input-group size-group">
303
+ <label>Size / Variant</label>
304
+ <input type="text" name="product_size" value="{{ prev_size }}" placeholder="e.g., 3.4 oz, XL, 10.5" autocomplete="off">
305
+ </div>
306
+ <div class="input-group gender-group">
307
+ <label>Gender</label>
308
+ <select name="product_gender">
309
+ <option value="unisex" {% if prev_gender == "unisex" %}selected{% endif %}>All</option>
310
+ <option value="mens" {% if prev_gender == "mens" %}selected{% endif %}>Men's</option>
311
+ <option value="womens" {% if prev_gender == "womens" %}selected{% endif %}>Women's</option>
312
+ <option value="kids" {% if prev_gender == "kids" %}selected{% endif %}>Kids'</option>
313
+ </select>
314
+ </div>
315
+ <div class="input-group mode-group">
316
+ <label>Search Strategy</label>
317
+ <select name="search_mode">
318
+ <option value="broad" {% if prev_mode == "broad" %}selected{% endif %}>Broad Exploration</option>
319
+ <option value="balanced" {% if prev_mode == "balanced" %}selected{% endif %}>Standard Balanced</option>
320
+ <option value="exact" {% if prev_mode == "exact" %}selected{% endif %}>Precision Match</option>
321
+ </select>
322
+ </div>
323
  </div>
324
+ <button type="submit" id="submit-btn">
325
+ <svg class="icon" viewBox="0 0 24 24"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/></svg>
326
+ Execute Price Scout Sweep
327
+ </button>
328
+ <div id="loader-zone" class="loader-box">
329
+ <p style="color: var(--text-muted); font-size: 14px; margin-bottom: 15px; text-align: center;">⚡ Price Scout is assembling structural pricing matrices across real-time storage nodes...</p>
330
+ <div style="height: 64px; width: 100%; margin-bottom: 12px;" class="skeleton"></div>
331
+ <div style="height: 64px; width: 100%; margin-bottom: 12px;" class="skeleton"></div>
332
+ <div style="height: 64px; width: 100%;" class="skeleton"></div>
333
  </div>
334
+ </form>
335
+ </div>
 
 
 
 
 
 
 
 
 
 
 
336
 
337
+ {% if show_results %}
338
+ <div class="card" style="border-color: var(--accent-green);">
339
+ <h3>Results Matrix for: <span style="color: var(--accent-blue); margin-left: 4px;"><b>{{ target_item }}{{ size_header }}</b></span></h3>
340
+
341
+ {% if deals %}
342
+ <p style="color:var(--accent-green); font-weight:600; margin-top:-10px; font-size:15px; margin-bottom: 20px;">🏆 Lowest verified online price: ${{ "%.2f"|format(deals[0].price) }}</p>
343
+
 
 
 
 
 
 
 
 
 
 
 
 
344
  <ul style="margin-top: 15px;">
345
+ {% for deal in deals[:10] %}
346
+ {{ render_deal_row(deal, loop.index0, target_item, coupons, is_ref_url) }}
347
  {% endfor %}
348
  </ul>
349
+
350
+ {% if deals|length > 10 %}
351
+ <details>
352
+ <summary>
353
+ <svg class="icon" viewBox="0 0 24 24" style="width:14px; height:14px;"><path d="M7 10l5 5 5-5z"/></svg>
354
+ View Additional Pricing Options (+{{ deals|length - 10 }} more variants found)
355
+ </summary>
356
+ <ul style="margin-top: 15px;">
357
+ {% for deal in deals[10:20] %}
358
+ {{ render_deal_row(deal, loop.index0 + 10, target_item, coupons, is_ref_url) }}
359
+ {% endfor %}
360
+ </ul>
361
+ </details>
362
+ {% endif %}
363
+
364
+ {% else %}
365
+ <p style="color: var(--text-muted); margin: 0;">⚠️ No verifiable pricing matrices were found matching this selection criteria.</p>
366
+ {% endif %}
367
+ </div>
368
  {% endif %}
369
  </div>
370
+
371
+ <div id="popular-view" class="tab-content {% if active_tab == 'popular' %}active{% endif %}">
372
+ <div class="card" style="border-color: rgba(245, 158, 11, 0.45);">
373
+ <h3>
374
+ <svg class="icon" style="color:var(--accent-gold);" viewBox="0 0 24 24"><path d="M12 2l3.09 6.3 6.91 1-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.17 2 9.3l6.91-1L12 2z"/></svg>
375
+ Trending Daily Volume Leaders
376
+ </h3>
377
+ <p style="font-size: 12px; color: var(--text-muted); margin-top: -10px; margin-bottom: 15px;">Verified global high-velocity price drops index monitored over the last 24 hours.</p>
378
+
379
+ <div class="filter-bar">
380
+ <span style="font-size: 13px; font-weight: 600; color: var(--text-main);">Filter By Type:</span>
381
+ <select id="type-filter" class="filter-select" onchange="executeCategoryFilter()">
382
+ <option value="all">Show All Categories</option>
383
+ </select>
384
+ </div>
385
+
386
+ <ul id="popular-deals-list" style="margin-top: 15px;">
387
+ {% for deal in popular_deals %}
388
+ <li class="deal-item popular-deal-item" data-type="{{ deal.product_type }}">
389
+ <div class="deal-item-header">
390
+ <img src="{{ deal.image }}" class="product-img" />
391
+ <div class="deal-info">
392
+ <span class="item-title">{{ deal.title }}</span>
393
+ <div class="meta-container">
394
+ <span class="domain-badge">{{ deal.source_domain }}</span>
395
+ <span class="size-badge">{{ deal.size }}</span>
396
+ <span class="size-badge" style="background: rgba(245, 158, 11, 0.1); color: var(--accent-gold); border-color: rgba(245, 158, 11, 0.2);">{{ deal.product_type }}</span>
397
+
398
+ {% if deal.is_third_party %}
399
+ <span class="shield-badge marketplace">⚠️ Third-Party Merchant</span>
400
+ {% else %}
401
+ <span class="shield-badge oem">🛡️ Direct OEM</span>
402
+ {% endif %}
403
+
404
+ <span class="rating-badge">
405
+ <svg class="icon" style="width:11px; height:11px; color:var(--accent-gold); fill:currentColor;" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>
406
+ {{ deal.rating }} ({{ deal.reviews }})
407
+ </span>
408
+
409
+ <a href="{{ deal.url }}" target="_blank" class="small-link">{{ deal.url }}</a>
410
+ </div>
411
+ </div>
412
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
413
+ <span class="price-tag" style="background: var(--accent-gold);">
414
+ <a href="{{ deal.url }}" target="_blank">${{ "%.2f"|format(deal.price) }}</a>
415
+ </span>
416
+ <span class="trend-indicator down" style="color: var(--text-muted); text-decoration: line-through; font-weight: 500; font-size: 12px; margin-top: 4px;">
417
+ ${{ "%.2f"|format(deal.original_price) }}
418
+ </span>
419
+ </div>
420
+ </div>
421
+
422
+ {% if deal.badge %}
423
+ <div class="inline-coupon" style="color: var(--accent-gold); font-weight: 600; letter-spacing: 0.02em;">
424
+ {{ deal.badge }}
425
+ </div>
426
+ {% endif %}
427
+ </li>
428
+ {% endfor %}
429
+ </ul>
430
+ </div>
431
+ </div>
432
  </body>
433
  </html>