add some features

This commit is contained in:
2026-06-27 23:47:15 +02:00
parent 5b44a65e51
commit 433085a895
6 changed files with 623 additions and 18 deletions
+270
View File
@@ -636,6 +636,276 @@
.prepared-tag { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; color: #1f7a4d; font-size: 12px; font-weight: 700; }
/* --- Credential dialog --- */
.cred-card {
display: flex;
flex-direction: column;
width: min(420px, 100%);
max-height: calc(100vh - 48px);
border-radius: 14px;
background: var(--color-surface);
box-shadow: 0 24px 64px rgba(20, 26, 31, 0.38), 0 2px 8px rgba(20, 26, 31, 0.12);
overflow: hidden;
}
/* Dark hero header */
.cred-hero {
display: flex;
align-items: center;
gap: 14px;
padding: 20px 20px 20px 22px;
background: var(--color-bar);
}
.cred-hero-icon {
display: flex;
align-items: center;
justify-content: center;
width: 48px;
height: 48px;
flex-shrink: 0;
border-radius: 12px;
background: rgba(255, 255, 255, 0.1);
color: #ffffff;
box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.cred-hero-text { flex: 1; min-width: 0; }
.cred-hero-label {
margin: 0 0 2px;
color: var(--color-bar-muted);
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.cred-hero-title {
margin: 0;
color: #ffffff;
font-size: 16px;
font-weight: 700;
line-height: 1.2;
}
.cred-close {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
flex-shrink: 0;
padding: 0;
border: 1px solid rgba(255,255,255,0.12);
border-radius: 7px;
background: transparent;
color: var(--color-bar-muted);
cursor: pointer;
transition: background 0.12s, color 0.12s;
}
.cred-close:hover:not(:disabled) {
background: rgba(255,255,255,0.1);
border-color: rgba(255,255,255,0.2);
color: #ffffff;
}
/* Form body */
.cred-body {
display: flex;
flex-direction: column;
gap: 16px;
padding: 20px;
overflow: auto;
}
/* Segmented mode toggle */
.cred-segment {
display: flex;
gap: 0;
padding: 3px;
border: 1px solid var(--color-border-subtle);
border-radius: 9px;
background: var(--color-surface-dim);
}
.cred-seg-btn {
flex: 1;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-height: 34px;
padding: 0 12px;
border: 1px solid transparent;
border-radius: 7px;
background: transparent;
color: var(--color-ink-muted);
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: background 0.14s, color 0.14s, box-shadow 0.14s, border-color 0.14s;
}
.cred-seg-btn:hover:not(.active) { color: var(--color-ink-quiet); }
.cred-seg-btn.active {
background: #ffffff;
border-color: var(--color-border);
color: var(--color-ink);
box-shadow: 0 1px 4px rgba(20, 26, 31, 0.12);
}
/* Fields */
.cred-fields { display: flex; flex-direction: column; gap: 12px; }
.cred-field { display: flex; flex-direction: column; gap: 5px; }
.cred-field-label {
font-size: 12px;
font-weight: 700;
color: var(--color-ink-quiet);
letter-spacing: 0.03em;
}
.cred-input {
position: relative;
display: flex;
align-items: center;
}
.cred-input :global(.cred-field-icon) {
position: absolute;
left: 11px;
color: var(--color-ink-muted);
pointer-events: none;
}
.cred-input input {
height: 40px;
padding-left: 34px;
padding-right: 40px;
border-radius: 8px;
font-size: 14px;
}
.cred-input input:focus {
border-color: var(--color-primary);
box-shadow: 0 0 0 3px rgba(37, 111, 143, 0.14);
}
.cred-reveal {
position: absolute;
right: 8px;
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: none;
border-radius: 5px;
background: transparent;
color: var(--color-ink-muted);
cursor: pointer;
transition: background 0.12s, color 0.12s;
}
.cred-reveal:hover { background: var(--color-surface-hover); color: var(--color-ink); }
/* Token hint */
.cred-token-hint {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 10px 12px;
border-radius: 8px;
border: 1px solid #c9e0ea;
background: #edf5f9;
color: #1d5570;
font-size: 12px;
line-height: 1.55;
}
.cred-token-hint svg { flex-shrink: 0; margin-top: 1px; color: var(--color-primary); }
.cred-token-hint code {
padding: 1px 5px;
border-radius: 4px;
background: rgba(37,111,143,0.12);
font-family: var(--font-mono);
font-size: 11px;
font-weight: 700;
color: var(--color-primary-dark);
}
/* Error */
.cred-error {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 10px 12px;
border: 1px solid #fca5a5;
border-radius: 8px;
background: #fff5f5;
color: #991b1b;
font-size: 13px;
line-height: 1.5;
}
.cred-error svg { flex-shrink: 0; margin-top: 1px; }
/* Footer row */
.cred-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding-top: 4px;
border-top: 1px solid var(--color-border-subtle);
}
.cred-save {
display: flex;
align-items: center;
gap: 7px;
cursor: pointer;
user-select: none;
}
.cred-save input[type="checkbox"] { width: auto; height: auto; cursor: pointer; }
.cred-save span { font-size: 12.5px; color: var(--color-ink-quiet); }
.cred-btns { display: flex; gap: 8px; }
.cred-cancel {
min-height: 36px;
padding: 0 14px;
border: 1px solid var(--color-border);
border-radius: 7px;
background: var(--color-surface);
color: var(--color-ink-quiet);
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.cred-cancel:hover:not(:disabled) {
border-color: var(--color-border-input);
background: var(--color-surface-hover);
color: var(--color-ink);
}
.cred-submit {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 36px;
padding: 0 16px;
border: 1px solid var(--color-primary-dark);
border-radius: 7px;
background: var(--color-primary);
color: #ffffff;
font-size: 13px;
font-weight: 700;
cursor: pointer;
transition: background 0.12s, border-color 0.12s;
}
.cred-submit:hover:not(:disabled) {
background: var(--color-primary-dark);
border-color: #194d63;
}
.cred-submit:disabled { opacity: 0.5; cursor: not-allowed; }
/* --- Diff viewer --- */
.diff-view {