diff --git a/webserver.py b/webserver.py index 3bc6f38..4f5015d 100644 --- a/webserver.py +++ b/webserver.py @@ -2032,10 +2032,67 @@ class PetBotRequestHandler(BaseHTTPRequestHandler): self.wfile.write(html.encode()) def serve_teambuilder_interface(self, nickname, pets): - """Serve the team builder interface - basic version for now""" + """Serve the full interactive team builder interface""" active_pets = [pet for pet in pets if pet['is_active']] inactive_pets = [pet for pet in pets if not pet['is_active']] + # Generate detailed pet cards + def make_pet_card(pet, is_active): + name = pet['nickname'] or pet['species_name'] + status = "Active" if is_active else "Storage" + status_class = "active" if is_active else "storage" + type_str = pet['type1'] + if pet['type2']: + type_str += f"/{pet['type2']}" + + # Calculate HP percentage for health bar + hp_percent = (pet['hp'] / pet['max_hp']) * 100 if pet['max_hp'] > 0 else 0 + hp_color = "#4CAF50" if hp_percent > 60 else "#FF9800" if hp_percent > 25 else "#f44336" + + return f""" +
{nickname} | Active: {len(active_pets)} | Storage: {len(inactive_pets)}
+Drag pets between Active and Storage to build your perfect team
+{nickname} | Active: {len(active_pets)} pets | Storage: {len(inactive_pets)} pets
Full drag-and-drop interface coming soon!
- ← Back to Profile + + ← Back to Profile +A 6-digit PIN has been sent to you via IRC private message.
+Enter the PIN below to confirm your team changes:
+ + + +