Commit
·
bd41a78
1
Parent(s):
082b2ad
added disable button in generate key
Browse files
app.py
CHANGED
|
@@ -284,8 +284,16 @@ if __name__ == "__main__":
|
|
| 284 |
input { width: 100%; padding: 12px; margin: 10px 0; border-radius: 6px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; font-size: 16px; }
|
| 285 |
button { background: #3b82f6; color: white; border: none; padding: 12px 24px; border-radius: 6px; font-size: 16px; cursor: pointer; width: 100%; }
|
| 286 |
button:hover { background: #2563eb; }
|
|
|
|
| 287 |
.info { background: #1e3a5f; padding: 15px; border-radius: 6px; margin: 15px 0; border-left: 4px solid #3b82f6; }
|
| 288 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
</head>
|
| 290 |
<body>
|
| 291 |
<div class="container">
|
|
@@ -303,7 +311,7 @@ if __name__ == "__main__":
|
|
| 303 |
• All your data (orders/drivers/assignments) will be isolated by this user_id
|
| 304 |
</div>
|
| 305 |
|
| 306 |
-
<form method="POST">
|
| 307 |
<input type="email" name="email" placeholder="Your email address" required>
|
| 308 |
<input type="text" name="name" placeholder="Your name (optional)">
|
| 309 |
<button type="submit">Generate API Key</button>
|
|
|
|
| 284 |
input { width: 100%; padding: 12px; margin: 10px 0; border-radius: 6px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; font-size: 16px; }
|
| 285 |
button { background: #3b82f6; color: white; border: none; padding: 12px 24px; border-radius: 6px; font-size: 16px; cursor: pointer; width: 100%; }
|
| 286 |
button:hover { background: #2563eb; }
|
| 287 |
+
button:disabled { background: #64748b; cursor: not-allowed; opacity: 0.6; }
|
| 288 |
.info { background: #1e3a5f; padding: 15px; border-radius: 6px; margin: 15px 0; border-left: 4px solid #3b82f6; }
|
| 289 |
</style>
|
| 290 |
+
<script>
|
| 291 |
+
function handleGenerateKey(event) {
|
| 292 |
+
const button = event.target.querySelector('button');
|
| 293 |
+
button.textContent = 'Generating...';
|
| 294 |
+
button.disabled = true;
|
| 295 |
+
}
|
| 296 |
+
</script>
|
| 297 |
</head>
|
| 298 |
<body>
|
| 299 |
<div class="container">
|
|
|
|
| 311 |
• All your data (orders/drivers/assignments) will be isolated by this user_id
|
| 312 |
</div>
|
| 313 |
|
| 314 |
+
<form method="POST" onsubmit="handleGenerateKey(event)">
|
| 315 |
<input type="email" name="email" placeholder="Your email address" required>
|
| 316 |
<input type="text" name="name" placeholder="Your name (optional)">
|
| 317 |
<button type="submit">Generate API Key</button>
|