From 731a7b2f3ba17be4f1b434365c8f695ca2a49426 Mon Sep 17 00:00:00 2001 From: haunter Date: Fri, 1 May 2026 16:34:46 +0300 Subject: [PATCH] ui tweak --- static/js/components/townViewer.js | 15 +++------------ templates/dashboard.html | 10 +++------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/static/js/components/townViewer.js b/static/js/components/townViewer.js index f16678d..c928a84 100644 --- a/static/js/components/townViewer.js +++ b/static/js/components/townViewer.js @@ -12,8 +12,7 @@ window.renderTowns = function() { // Get active filters const searchTerm = (document.getElementById('town-search')?.value || '').toLowerCase(); const reqFullWh = document.getElementById('filter-full-wh')?.checked; - const reqFestival = document.getElementById('filter-festival')?.checked; - const reqPoints = document.getElementById('filter-points')?.checked; + const reqNotBuilding = document.getElementById('filter-not-building')?.checked; const filteredTowns = window.towns.filter(t => { // 1. Search by name @@ -29,13 +28,8 @@ window.renderTowns = function() { // 2. Full WH (>95%) if (reqFullWh && Math.max(wPct, sPct, iPct) < 0.95) return false; - // 3. Festival (Wood>15k, Stone>18k, Iron>15k) - // City Festival exact costs = 15000, 18000, 15000 - if (reqFestival && ((res.wood || 0) < 15000 || (res.stone || 0) < 18000 || (res.iron || 0) < 15000)) return false; - - // 4. Large Points - const pts = typeof t.points === 'number' ? t.points : parseInt(t.points) || 0; - if (reqPoints && pts < 10000) return false; + // 3. Not Building (no items in build_queue) + if (reqNotBuilding && t.build_queue && t.build_queue.length > 0) return false; return true; }); @@ -62,9 +56,6 @@ window.renderTowns = function() { if (wPct >= 0.95 || sPct >= 0.95 || iPct >= 0.95) { markers += '⚠️'; } - if ((res.wood || 0) >= 15000 && (res.stone || 0) >= 18000 && (res.iron || 0) >= 15000) { - markers += '🎭'; - } const getC = (pct) => pct >= 0.95 ? 'color:#ff4a4a;font-weight:bold;' : ''; diff --git a/templates/dashboard.html b/templates/dashboard.html index d249f85..8f29705 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -10,7 +10,8 @@

⬅️ ⚔️ Grepolis Remote

-
+
+
Server…
Client…
@@ -29,7 +30,6 @@

Towns

-
@@ -41,11 +41,7 @@ - -