webcodelab commited on
Commit
c785583
·
verified ·
1 Parent(s): a719504

Update app/templates/dashboard.html

Browse files
Files changed (1) hide show
  1. app/templates/dashboard.html +9 -2
app/templates/dashboard.html CHANGED
@@ -97,8 +97,15 @@
97
  <div class="section-card api-key-summary">
98
  <h3 class="section-title">Your API Key</h3>
99
  <p class="section-description">
100
- API Key: <span class="api-key-display">{{ user.api_key[:8] }}...</span>
101
- <a href="{{ url_for('auth.api_keys') }}" class="link-small">View Full Key & Manage</a>
 
 
 
 
 
 
 
102
  </p>
103
  </div>
104
 
 
97
  <div class="section-card api-key-summary">
98
  <h3 class="section-title">Your API Key</h3>
99
  <p class="section-description">
100
+ {% if user.api_key %}
101
+ API Key: <span class="api-key-display">{{ user.api_key[:8] }}...</span>
102
+ <a href="{{ url_for('auth.api_keys') }}" class="link-small">View Full Key & Manage</a>
103
+ {% else %}
104
+ <span class="no-api-key">No API key generated yet.</span>
105
+ <form method="POST" action="{{ url_for('auth.generate_initial_api_key') }}" style="display: inline;">
106
+ <button type="submit" class="link-small" style="background: none; border: none; color: #007BFF; text-decoration: underline; cursor: pointer;">Generate API Key</button>
107
+ </form>
108
+ {% endif %}
109
  </p>
110
  </div>
111