Skip to content

Commit 9ece334

Browse files
committed
feat: Increase API key creation rate limit from 3 to 5 per hour; update modal styles for UI consistency
1 parent 272fe57 commit 9ece334

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

api/v1/keys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _parse_expires_at(value: Optional[str | int | float]):
4040

4141

4242
@api_v1.route("/keys", methods=["POST"])
43-
@limiter.limit("3 per hour", key_func=rate_limit_key_for_request)
43+
@limiter.limit("5 per hour", key_func=rate_limit_key_for_request)
4444
@requires_auth
4545
def create_api_key():
4646
body = request.get_json(silent=True) or {}

static/css/dashboard/keys.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
right: 0;
312312
bottom: 0;
313313
background: rgba(0, 0, 0, 0.7);
314-
backdrop-filter: blur(10px);
314+
backdrop-filter: blur(10px) saturate(180%) brightness(0.7);
315315
}
316316

317317
.modal-content {
@@ -320,8 +320,8 @@
320320
width: 100%;
321321
max-height: 90vh;
322322
overflow-y: auto;
323-
background: linear-gradient(135deg, rgba(20, 25, 40, 0.98), rgba(15, 20, 35, 0.98));
324-
backdrop-filter: blur(20px);
323+
background: rgba(15, 20, 35, 0.5);
324+
backdrop-filter: blur(60px);
325325
border: 1px solid var(--border-color);
326326
border-radius: var(--radius-lg);
327327
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
@@ -344,9 +344,10 @@
344344
display: flex;
345345
justify-content: space-between;
346346
align-items: center;
347-
padding: 24px 24px 20px 24px;
347+
padding: 24px 20px;
348348
margin-bottom: 20px;
349349
border-bottom: 1px solid var(--border-color);
350+
background: rgba(255, 255, 255, 0.02);
350351
}
351352

352353
.modal-header h2 {
@@ -388,6 +389,7 @@
388389
gap: 12px;
389390
padding: 20px 24px 24px 24px;
390391
border-top: 1px solid var(--border-color);
392+
background: rgba(255, 255, 255, 0.02);
391393
margin-top: 24px;
392394
}
393395

@@ -466,7 +468,7 @@
466468
gap: 12px;
467469
padding: 16px;
468470
background: rgba(255, 255, 255, 0.03);
469-
border: 2px solid var(--border-color);
471+
border: 1px solid var(--border-color);
470472
border-radius: var(--radius-md);
471473
cursor: pointer;
472474
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
@@ -740,6 +742,10 @@
740742
border-color: var(--accent-primary);
741743
}
742744

745+
.token-input:focus {
746+
border-color: var(--accent-primary);
747+
}
748+
743749
.copy-btn {
744750
padding: 12px;
745751
background: rgba(255, 255, 255, 0.08);

static/css/dashboard/url-modal.css

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
padding: 20px;
3131
position: relative;
3232
z-index: 2;
33-
background: rgba(0, 0, 0, 0.5);
33+
background: rgba(0, 0, 0, 0.7);
3434
-webkit-backdrop-filter: blur(10px) saturate(180%) brightness(0.7);
3535
backdrop-filter: blur(10px) saturate(180%) brightness(0.7);
3636
}
@@ -41,12 +41,11 @@
4141

4242
/* Modal Content */
4343
.modal-content {
44-
background: #1a1a1a;
44+
backdrop-filter: blur(60px);
45+
background: rgba(15, 20, 35, 0.5);
4546
border: 1px solid rgba(255, 255, 255, 0.1);
4647
border-radius: 16px;
47-
box-shadow:
48-
0 20px 40px rgba(0, 0, 0, 0.5),
49-
0 0 0 1px rgba(255, 255, 255, 0.05);
48+
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
5049
width: 100%;
5150
max-width: 800px;
5251
max-height: 90vh;
@@ -294,9 +293,8 @@
294293
.field input:focus,
295294
.field select:focus {
296295
outline: none;
297-
border-color: var(--accent-color);
296+
border-color: var(--accent-primary);
298297
background: rgba(255, 255, 255, 0.08);
299-
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
300298
}
301299

302300
.field input::placeholder {

static/js/dashboard/keys.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ function openKeySuccessModal(token, tokenPrefix) {
180180
} catch (error) {
181181
console.log('Auto-copy failed, user can copy manually');
182182
}
183-
184-
// Focus and select token for manual copy if needed
185-
keyElements.tokenInput.focus();
186-
keyElements.tokenInput.select();
187183
}, 100);
188184
}
189185

0 commit comments

Comments
 (0)