Update style for config page
This commit is contained in:
@@ -1,109 +1,213 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Config</title>
|
<title>Config Module</title>
|
||||||
<link rel="stylesheet" href="/static/style.css" />
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; padding: 24px; max-width: 920px; margin: 0 auto; }
|
* { border-radius: 0 !important; }
|
||||||
.nav { display: flex; gap: 12px; margin-bottom: 18px; }
|
body {
|
||||||
.nav a { text-decoration: none; color: #2b6cb0; }
|
font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
||||||
.card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; margin: 16px 0; }
|
background: #fff;
|
||||||
.card h2 { margin: 0 0 10px 0; font-size: 18px; }
|
color: #000;
|
||||||
.row { display: grid; grid-template-columns: 260px 1fr; gap: 12px; align-items: center; margin: 10px 0; }
|
padding: 20px;
|
||||||
.row label { font-weight: 600; }
|
}
|
||||||
input[type="number"] { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e0; border-radius: 8px; }
|
|
||||||
.hint { color: #4a5568; font-size: 13px; margin-top: 4px; }
|
.box { border: 3px solid #000; background: #fff; padding: 20px; }
|
||||||
.actions { display:flex; gap: 12px; margin-top: 14px; }
|
|
||||||
button { background: #2b6cb0; color: white; border: 0; padding: 10px 14px; border-radius: 8px; cursor: pointer; }
|
.section-title {
|
||||||
.ok { color: #22543d; background: #c6f6d5; border: 1px solid #9ae6b4; padding: 10px 12px; border-radius: 8px; }
|
font-size: 18px;
|
||||||
.err { color: #742a2a; background: #fed7d7; border: 1px solid #feb2b2; padding: 10px 12px; border-radius: 8px; }
|
font-weight: 900;
|
||||||
|
text-transform: uppercase;
|
||||||
|
border-bottom: 3px solid #000;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 300px 1fr;
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-weight: 900;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
border: 2px solid #000;
|
||||||
|
padding: 6px 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
font-size: 11px;
|
||||||
|
font-style: italic;
|
||||||
|
margin-top: 4px;
|
||||||
|
border-left: 4px solid #000;
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button, .button {
|
||||||
|
border: 2px solid #000;
|
||||||
|
background: #fff;
|
||||||
|
padding: 6px 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 900;
|
||||||
|
text-transform: uppercase;
|
||||||
|
box-shadow: 3px 3px 0px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover, .button:hover {
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: none;
|
||||||
|
transform: translate(2px, 2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active {
|
||||||
|
background: #ff0000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
font-weight: 900;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link:hover {
|
||||||
|
background: #000;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ok {
|
||||||
|
border: 3px solid #000;
|
||||||
|
background: #00ff00;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: 900;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.err {
|
||||||
|
border: 3px solid #000;
|
||||||
|
background: #ff0000;
|
||||||
|
color: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: 900;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="nav">
|
|
||||||
<a href="/admin">Admin</a>
|
|
||||||
<a href="/config">Config</a>
|
|
||||||
<a href="/logout">Logout</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<h1>Config</h1>
|
<div class="max-w-4xl mx-auto">
|
||||||
|
|
||||||
|
<!-- HEADER -->
|
||||||
|
<header class="mb-6 border-b-8 border-black pb-4 flex justify-between items-start">
|
||||||
|
<h1 class="text-4xl font-black uppercase tracking-tighter leading-none">
|
||||||
|
Config_Settings
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div class="flex flex-col items-end gap-2">
|
||||||
|
<a href="/admin" class="nav-link">Admin_Panel</a>
|
||||||
|
<a href="/config" class="nav-link">Reload_Config</a>
|
||||||
|
<a href="/logout" class="nav-link text-red-600">Logout</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- STATUS -->
|
||||||
{{if .Success}}
|
{{if .Success}}
|
||||||
<div class="ok">Saved.</div>
|
<div class="ok mb-4">CONFIG_SAVED_SUCCESSFULLY</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .Error}}
|
{{if .Error}}
|
||||||
<div class="err">{{.Error}}</div>
|
<div class="err mb-4">{{.Error}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<form method="POST" action="/config">
|
<form method="POST" action="/config">
|
||||||
|
|
||||||
<div class="card">
|
<!-- UPLOAD SETTINGS -->
|
||||||
<h2>Uploads</h2>
|
<div class="box mb-6">
|
||||||
|
<div class="section-title">Upload_Control</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label for="upload_max_file_size_mb">Max file size (MB)</label>
|
<label>Max_File_Size_MB</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="1" step="1" id="upload_max_file_size_mb" name="upload_max_file_size_mb" value="{{.UploadMaxFileSizeMB}}" />
|
<input type="number" min="1" name="upload_max_file_size_mb" value="{{.UploadMaxFileSizeMB}}">
|
||||||
<div class="hint">Hard limit enforced by the upload endpoints. (This is separate from reverse proxy limits.)</div>
|
<div class="hint">Hard limit enforced by upload endpoints</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label for="upload_multi_max_files">Max files in multi upload</label>
|
<label>Multi_Upload_Limit</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="1" step="1" id="upload_multi_max_files" name="upload_multi_max_files" value="{{.UploadMultiMaxFiles}}" />
|
<input type="number" min="1" name="upload_multi_max_files" value="{{.UploadMultiMaxFiles}}">
|
||||||
<div class="hint">Limits how many files can be sent to /api/files/upload-multi in one request.</div>
|
<div class="hint">Max files per multi-upload request</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label for="upload_max_hours">Max expiry duration (hours)</label>
|
<label>Max_Expiry_Hours</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="number" min="1" step="1" id="upload_max_hours" name="upload_max_hours" value="{{.UploadMaxHours}}" />
|
<input type="number" min="1" name="upload_max_hours" value="{{.UploadMaxHours}}">
|
||||||
<div class="hint">User-chosen duration is clamped to this maximum.</div>
|
<div class="hint">User duration capped to this value</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<h2>Rate limiting (display only)</h2>
|
|
||||||
<div class="hint">Right now rate limits are wired at startup; changing these values won’t take effect until the server restarts (unless we refactor it to be dynamic).</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label for="ratelimit_login_per_minute">Login max per minute</label>
|
|
||||||
<div>
|
|
||||||
<input type="number" min="1" step="1" id="ratelimit_login_per_minute" name="ratelimit_login_per_minute" value="{{.RateLimitLoginPerMinute}}" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label for="ratelimit_login_burst">Login burst</label>
|
|
||||||
<div>
|
|
||||||
<input type="number" min="1" step="1" id="ratelimit_login_burst" name="ratelimit_login_burst" value="{{.RateLimitLoginBurst}}" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label for="ratelimit_api_per_minute">API max per minute</label>
|
|
||||||
<div>
|
|
||||||
<input type="number" min="1" step="1" id="ratelimit_api_per_minute" name="ratelimit_api_per_minute" value="{{.RateLimitApiPerMinute}}" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label for="ratelimit_api_burst">API burst</label>
|
|
||||||
<div>
|
|
||||||
<input type="number" min="1" step="1" id="ratelimit_api_burst" name="ratelimit_api_burst" value="{{.RateLimitApiBurst}}" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions">
|
<!-- RATE LIMITS -->
|
||||||
<button type="submit">Save config</button>
|
<div class="box mb-6">
|
||||||
|
<div class="section-title">Rate_Limits_(Static)</div>
|
||||||
|
|
||||||
|
<div class="hint mb-4">
|
||||||
|
Changes require server restart to take effect
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label>Login_Per_Minute</label>
|
||||||
|
<input type="number" min="1" name="ratelimit_login_per_minute" value="{{.RateLimitLoginPerMinute}}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label>Login_Burst</label>
|
||||||
|
<input type="number" min="1" name="ratelimit_login_burst" value="{{.RateLimitLoginBurst}}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label>API_Per_Minute</label>
|
||||||
|
<input type="number" min="1" name="ratelimit_api_per_minute" value="{{.RateLimitApiPerMinute}}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label>API_Burst</label>
|
||||||
|
<input type="number" min="1" name="ratelimit_api_burst" value="{{.RateLimitApiBurst}}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ACTIONS -->
|
||||||
|
<div class="flex justify-between items-center border-t-8 border-black pt-4">
|
||||||
|
<button type="submit">Commit_Config</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="/change-password" class="fixed bottom-1 left-1 text-[10px] underline">
|
||||||
|
CHANGE_PASSWORD
|
||||||
|
</a>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user