mirror of
https://github.com/andrey271192/kaskad.git
synced 2026-09-21 13:51:57 +00:00
Browsers cannot clear HTTP Basic credentials; logout never worked reliably. Use Flask signed session + /login form + GET /logout + POST /api/logout. Optional KASKAD_SECRET_KEY or auto /etc/kaskad/.session_secret. Fetch API uses credentials: same-origin; 401 redirects to /login. Docs + README updated. Co-authored-by: Cursor <cursoragent@cursor.com>
200 lines
5.2 KiB
CSS
200 lines
5.2 KiB
CSS
* { box-sizing: border-box; }
|
|
body {
|
|
background: #0f1419;
|
|
color: #c9d1d9;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
font-size: 14px;
|
|
margin: 0;
|
|
padding: 0 24px 80px;
|
|
max-width: 1200px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
header {
|
|
position: sticky; top: 0;
|
|
background: #0f1419;
|
|
display: flex; align-items: center; gap: 16px;
|
|
padding: 16px 0;
|
|
border-bottom: 1px solid #21262d;
|
|
z-index: 10;
|
|
}
|
|
h1 { margin: 0; font-size: 20px; color: #58a6ff; }
|
|
h2 { font-size: 16px; color: #79c0ff; margin: 24px 0 8px; }
|
|
section { margin: 24px 0; }
|
|
.muted { color: #6e7681; font-size: 12px; }
|
|
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
|
|
code { background: #161b22; padding: 1px 5px; border-radius: 3px; }
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: #161b22;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
}
|
|
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid #21262d; }
|
|
th { background: #1c2128; color: #8b949e; font-weight: 500; font-size: 12px; text-transform: uppercase; }
|
|
tr:last-child td { border: 0; }
|
|
tr.bad { background: rgba(248, 81, 73, 0.07); }
|
|
tr:hover { background: #1c2128; }
|
|
|
|
button {
|
|
background: #21262d;
|
|
color: #c9d1d9;
|
|
border: 1px solid #30363d;
|
|
padding: 6px 12px;
|
|
border-radius: 5px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
button:hover:not(:disabled) { background: #30363d; border-color: #58a6ff; color: #58a6ff; }
|
|
button:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
button.danger { color: #f85149; border-color: #4a1f23; }
|
|
button.danger:hover:not(:disabled) { background: #4a1f23; color: #fff; border-color: #f85149; }
|
|
button.danger.solid {
|
|
background: #b1361a;
|
|
color: #fff;
|
|
border-color: #f85149;
|
|
font-weight: 600;
|
|
}
|
|
button.danger.solid:hover:not(:disabled) {
|
|
background: #f85149;
|
|
color: #fff;
|
|
border-color: #f85149;
|
|
}
|
|
button.sm { padding: 2px 8px; font-size: 11px; }
|
|
|
|
.actions {
|
|
display: flex; gap: 8px; align-items: center;
|
|
margin: 12px 0;
|
|
}
|
|
.actions input[type=text] { padding: 6px 10px; }
|
|
|
|
input, textarea {
|
|
background: #0d1117;
|
|
color: #c9d1d9;
|
|
border: 1px solid #30363d;
|
|
padding: 6px 10px;
|
|
border-radius: 5px;
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
}
|
|
input:focus, textarea:focus { outline: none; border-color: #58a6ff; }
|
|
textarea { width: 100%; font-family: ui-monospace, monospace; resize: vertical; }
|
|
|
|
details {
|
|
margin: 12px 0;
|
|
border: 1px dashed #30363d;
|
|
border-radius: 5px;
|
|
padding: 0 12px;
|
|
}
|
|
details[open] { padding: 12px; }
|
|
summary { cursor: pointer; padding: 8px 0; color: #58a6ff; }
|
|
form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-items: end; }
|
|
form label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #8b949e; }
|
|
form button { grid-column: span 2; justify-self: start; padding: 8px 16px; }
|
|
form textarea { grid-column: span 2; }
|
|
|
|
.ip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
|
|
.ip-list li {
|
|
background: #161b22; border: 1px solid #21262d;
|
|
padding: 4px 8px; border-radius: 4px;
|
|
font-family: ui-monospace, monospace; font-size: 12px;
|
|
display: flex; align-items: center; gap: 6px;
|
|
}
|
|
.ip-list.compact li { font-size: 11px; padding: 2px 6px; opacity: 0.7; }
|
|
|
|
.status { color: #8b949e; font-size: 12px; }
|
|
.status.err { color: #f85149; }
|
|
|
|
.toast {
|
|
position: fixed; bottom: 24px; right: 24px;
|
|
background: #238636; color: #fff;
|
|
padding: 10px 18px; border-radius: 6px;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.4);
|
|
z-index: 100;
|
|
}
|
|
|
|
header .spacer { flex: 1; }
|
|
|
|
[x-cloak] { display: none !important; }
|
|
|
|
.modal {
|
|
position: fixed; inset: 0;
|
|
background: rgba(0,0,0,0.65);
|
|
display: flex; align-items: center; justify-content: center;
|
|
z-index: 200;
|
|
}
|
|
.modal-body {
|
|
background: #161b22;
|
|
border: 1px solid #30363d;
|
|
border-radius: 8px;
|
|
padding: 24px;
|
|
width: min(420px, 92vw);
|
|
box-shadow: 0 12px 40px rgba(0,0,0,0.6);
|
|
}
|
|
.modal-body h2 { margin-top: 0; }
|
|
.modal-body form { display: grid; grid-template-columns: 1fr; gap: 10px; }
|
|
.modal-body form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #8b949e; }
|
|
.modal-actions {
|
|
display: flex; gap: 8px; justify-content: flex-end;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
footer {
|
|
margin-top: 60px; padding: 20px 0;
|
|
border-top: 1px solid #21262d;
|
|
color: #6e7681; font-size: 12px;
|
|
text-align: center;
|
|
}
|
|
footer a { color: #58a6ff; text-decoration: none; }
|
|
|
|
|
|
footer .foot-row {
|
|
display: flex; flex-wrap: wrap; gap: 6px;
|
|
align-items: center; justify-content: center;
|
|
margin: 4px 0;
|
|
}
|
|
footer .foot-row.muted { color: #6e7681; font-size: 11px; margin-top: 8px; }
|
|
footer a { margin: 0 2px; }
|
|
|
|
/* --- login --- */
|
|
body.login-page {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
padding: 24px;
|
|
}
|
|
.login-box {
|
|
width: 100%;
|
|
max-width: 380px;
|
|
background: #161b22;
|
|
border: 1px solid #30363d;
|
|
border-radius: 8px;
|
|
padding: 28px;
|
|
}
|
|
.login-box h1 { margin: 0 0 8px 0; }
|
|
.login-box form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
margin-top: 20px;
|
|
}
|
|
.login-box form label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
font-size: 12px;
|
|
color: #8b949e;
|
|
}
|
|
.login-box form input {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
.login-box form button {
|
|
width: 100%;
|
|
margin-top: 8px;
|
|
padding: 10px 16px;
|
|
}
|