Added environment manager and updated UI

This commit is contained in:
2026-06-24 19:23:50 +02:00
parent 594834908c
commit 0614ae82f5
7 changed files with 783 additions and 98 deletions
+304
View File
@@ -3322,3 +3322,307 @@ code {
flex: 1;
}
}
.env-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,.65);
backdrop-filter: blur(6px);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
animation: fadeIn .15s ease;
}
.env-modal {
width: min(850px, 92vw);
max-height: 90vh;
overflow: auto;
background: #1f1f23;
color: #fff;
border-radius: 18px;
border: 1px solid #35353a;
box-shadow: 0 24px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03);
animation: scaleIn .18s ease;
}
.env-modal-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 24px;
border-bottom: 1px solid #35353a;
}
.env-modal-header h2 {
margin: 0;
font-size: 22px;
}
.env-subtitle {
margin-top: 6px;
color: #9aa0aa;
font-size: 13px;
}
.env-close-btn {
width: 36px;
height: 36px;
border-radius: 10px;
border: none;
cursor: pointer;
background: transparent;
color: #aaa;
font-size: 16px;
}
.env-close-btn:hover {
background: rgba(255,255,255,.08);
color: white;
}
.env-modal-body {
padding: 24px;
}
.env-section-title {
font-size: 13px;
font-weight: 600;
color: #9aa0aa;
text-transform: uppercase;
letter-spacing: .08em;
margin-bottom: 12px;
}
.env-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.env-card {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
border-radius: 14px;
border: 1px solid #35353a;
transition: .15s ease;
cursor: pointer;
}
.env-card:hover {
border-color: #5a9cff;
transform: translateY(-1px);
}
.env-card.active {
border-color: #5a9cff;
background: rgba(90,156,255,.12);
}
.env-card-left {
display: flex;
gap: 14px;
align-items: center;
}
.env-name {
display: flex;
align-items: center;
gap: 10px;
font-weight: 600;
}
.env-url {
margin-top: 4px;
color: #9aa0aa;
font-size: 13px;
}
.env-badge {
padding: 3px 8px;
border-radius: 999px;
font-size: 11px;
background: #5a9cff;
color: white;
}
.env-actions {
display: flex;
gap: 8px;
}
.icon-btn {
width: 34px;
height: 34px;
border-radius: 10px;
border: 1px solid #35353a;
background: transparent;
color: white;
cursor: pointer;
}
.icon-btn:hover {
background: rgba(255,255,255,.08);
}
.icon-btn.danger:hover {
background: rgba(255,80,80,.15);
}
.try-header-main {
display: flex;
flex-direction: column;
gap: 4px;
}
.try-subtitle {
color: var(--text-2);
font-size: 13px;
}
.try-env-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 16px;
padding: 12px 14px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--bg-2);
}
.try-env-info {
min-width: 0;
flex: 1;
}
.try-env-label {
font-size: 11px;
text-transform: uppercase;
letter-spacing: .08em;
color: var(--text-2);
margin-bottom: 6px;
}
.try-env-main {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.try-env-badge {
padding: 4px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
background: rgba(59,130,246,.15);
color: #60a5fa;
border: 1px solid rgba(59,130,246,.25);
}
.try-env-url {
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-2);
overflow: hidden;
text-overflow: ellipsis;
}
.request-target {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 16px;
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--bg-2);
}
.request-method {
padding: 4px 8px;
border-radius: 6px;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
color: white;
background: var(--method-color);
}
.request-url {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: var(--font-mono);
color: var(--text-1);
}
.env-divider {
margin: 24px 0;
border-top: 1px solid #35353a;
}
.env-form {
display: grid;
gap: 14px;
}
.field {
display: grid;
gap: 6px;
}
.field label {
font-size: 13px;
color: #9aa0aa;
}
.field input {
height: 42px;
padding: 0 12px;
border-radius: 10px;
border: 1px solid #35353a;
background: #27272c;
color: white;
}
.field input:focus {
outline: none;
border-color: #5a9cff;
}
.env-modal-footer {
display: flex;
justify-content: flex-end;
gap: 10px;
padding: 20px 24px;
border-top: 1px solid #35353a;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(.96);
}
to {
opacity: 1;
transform: scale(1);
}
}