mirror of
https://github.com/thecyberlearn/quantum-ai.git
synced 2026-08-18 09:53:00 +00:00
- Replace legacy agents system with modular individual agent apps - Add agent_base framework for BaseAgent, processors, and management commands - Create weather_reporter as example individual agent with API integration - Implement simplified template structure: agent_name/templates/detail.html - Fix marketplace to display actual agents instead of placeholder - Add proper authentication flow with login redirect for agent access - Organize project structure: move tests to tests/, docs to docs/ - Update all documentation to reflect new simplified architecture - Fix URL namespace issues throughout templates and views 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
118 lines
6.3 KiB
HTML
118 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Marketplace - NetCop Hub</title>
|
|
<style>
|
|
body { font-family: Arial, sans-serif; margin: 0; padding: 20px; background-color: #f5f5f5; }
|
|
.container { max-width: 1200px; margin: 0 auto; }
|
|
.header { background: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
|
|
.user-info { float: right; }
|
|
.balance { background: #e8f5e8; padding: 5px 15px; border-radius: 20px; color: #2d5a2d; }
|
|
.content-section { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; }
|
|
.auth-links { margin-top: 10px; }
|
|
.auth-links a { margin-right: 15px; text-decoration: none; color: #007bff; }
|
|
.message { background: #e8f4fd; padding: 20px; border-radius: 8px; margin: 20px 0; border-left: 4px solid #007bff; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>Marketplace - NetCop Hub</h1>
|
|
<div class="user-info">
|
|
{% if user.is_authenticated %}
|
|
<p>Welcome, {{ user.username }}!</p>
|
|
<div class="balance">Balance: {{ user_balance }} AED</div>
|
|
<div class="auth-links">
|
|
<a href="{% url 'core:homepage' %}">Homepage</a>
|
|
<a href="{% url 'core:wallet' %}">Wallet</a>
|
|
<a href="{% url 'authentication:logout' %}">Logout</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="auth-links">
|
|
<a href="{% url 'core:homepage' %}">Homepage</a>
|
|
<a href="{% url 'authentication:login' %}">Login</a>
|
|
<a href="{% url 'authentication:register' %}">Register</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div style="clear: both;"></div>
|
|
</div>
|
|
|
|
<div class="content-section">
|
|
<h2>Marketplace</h2>
|
|
<p>Browse and discover AI-powered agents for your tasks.</p>
|
|
|
|
{% if user.is_authenticated %}
|
|
<p>Welcome {{ user.username }}! Your current balance is {{ user_balance }} AED.</p>
|
|
<p><a href="{% url 'core:wallet' %}">Manage your wallet</a> or <a href="{% url 'core:homepage' %}">return to homepage</a>.</p>
|
|
{% else %}
|
|
<p><a href="{% url 'authentication:login' %}">Log in</a> to use AI agents.</p>
|
|
{% endif %}
|
|
|
|
<!-- Category Filter -->
|
|
{% if categories %}
|
|
<div style="margin: 20px 0; text-align: left;">
|
|
<h3>Filter by Category:</h3>
|
|
<a href="{% url 'core:marketplace' %}" style="margin-right: 10px; {% if not selected_category %}font-weight: bold;{% endif %}">All</a>
|
|
{% for category_value, category_display in categories %}
|
|
<a href="{% url 'core:marketplace' %}?category={{ category_value }}"
|
|
style="margin-right: 10px; text-decoration: none; {% if selected_category == category_value %}font-weight: bold;{% endif %}">
|
|
{{ category_display|title }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Agents Grid -->
|
|
{% if agents %}
|
|
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 30px;">
|
|
{% for agent in agents %}
|
|
<div style="border: 1px solid #ddd; border-radius: 8px; padding: 20px; background: #f9f9f9; text-align: left;">
|
|
<h3 style="margin: 0 0 10px 0; color: #333;">
|
|
{% if agent.icon %}{{ agent.icon }}{% endif %} {{ agent.name }}
|
|
</h3>
|
|
<p style="color: #666; margin: 10px 0;">{{ agent.description }}</p>
|
|
<div style="margin: 15px 0;">
|
|
<span style="background: #e8f4fd; color: #0066cc; padding: 3px 8px; border-radius: 12px; font-size: 12px;">
|
|
{{ agent.category|title }}
|
|
</span>
|
|
<span style="background: #f0f8ff; color: #2d5a2d; padding: 3px 8px; border-radius: 12px; font-size: 12px; margin-left: 5px;">
|
|
{{ agent.agent_type|title }}
|
|
</span>
|
|
</div>
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 15px;">
|
|
<div>
|
|
<strong style="color: #2d5a2d;">{{ agent.price }} AED</strong>
|
|
{% if agent.rating %}
|
|
<div style="font-size: 12px; color: #666;">
|
|
⭐ {{ agent.rating }} ({{ agent.review_count }} reviews)
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% if user.is_authenticated %}
|
|
<a href="{% url 'core:agent_detail' agent.slug %}"
|
|
style="background: #007bff; color: white; padding: 8px 16px; text-decoration: none; border-radius: 4px; font-size: 14px;">
|
|
Use Agent
|
|
</a>
|
|
{% else %}
|
|
<a href="{% url 'authentication:login' %}?next={% url 'core:agent_detail' agent.slug %}"
|
|
style="background: #28a745; color: white; padding: 8px 16px; text-decoration: none; border-radius: 4px; font-size: 14px;">
|
|
Login to Use
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="message">
|
|
<h3>🤖 No Agents Available</h3>
|
|
<p>No agents are currently available{% if selected_category %} in the {{ selected_category }} category{% endif %}. Check back later!</p>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |