Fix navigation accessibility for token generation and admin pages

- Add API Tokens navigation link to all user templates (dashboard, analyze, train, history, settings)
- Add Admin navigation link for admin users across all templates
- Remove old API token generation button from settings page (now uses dedicated page)
- Ensure consistent navigation experience across the application
- Admin users can now easily access user management and token generation pages
parent fd4ca804
......@@ -42,7 +42,11 @@
<a href="/analyze">Analyze</a>
<a href="/train">Train</a>
<a href="/history">History</a>
<a href="/api_tokens">API Tokens</a>
<a href="/settings">Settings</a>
{% if user.get('role') == 'admin' %}
<a href="/admin">Admin</a>
{% endif %}
</nav>
<div class="user-menu">
<span>{{ tokens }} tokens</span>
......
......@@ -41,7 +41,11 @@
<a href="/analyze">Analyze</a>
<a href="/train">Train</a>
<a href="/history" class="active">History</a>
<a href="/api_tokens">API Tokens</a>
<a href="/settings">Settings</a>
{% if user.get('role') == 'admin' %}
<a href="/admin">Admin</a>
{% endif %}
</nav>
<div class="user-menu">
<span>{{ tokens }} tokens</span>
......
......@@ -39,7 +39,11 @@
<a href="/analyze">Analyze</a>
<a href="/train">Train</a>
<a href="/history">History</a>
<a href="/api_tokens">API Tokens</a>
<a href="/settings" class="active">Settings</a>
{% if user.get('role') == 'admin' %}
<a href="/admin">Admin</a>
{% endif %}
</nav>
<div class="user-menu">
<span>{{ tokens }} tokens</span>
......@@ -139,13 +143,6 @@
<a href="/generate_worker_token" class="btn" style="background: #f59e0b;"><i class="fas fa-plus"></i> Generate Worker Token</a>
</div>
<div class="settings-card">
<div class="card-header">
<h3><i class="fas fa-key"></i> API Tokens</h3>
</div>
<p>Generate API tokens for programmatic access to analysis functionality.</p>
<a href="/generate_api_token" class="btn" style="background: #10b981;"><i class="fas fa-plus"></i> Generate API Token</a>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -40,7 +40,11 @@
<a href="/analyze">Analyze</a>
<a href="/train" class="active">Train</a>
<a href="/history">History</a>
<a href="/api_tokens">API Tokens</a>
<a href="/settings">Settings</a>
{% if user.get('role') == 'admin' %}
<a href="/admin">Admin</a>
{% endif %}
</nav>
<div class="user-menu">
<span>{{ tokens }} tokens</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment