126 lines
5.0 KiB
HTML
126 lines
5.0 KiB
HTML
<!DOCTYPE html>
|
|
<!-- Copyright © 2026 Olaf Kolkman -->
|
|
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>LinkLog Admin</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="stylesheet" href="/static/style.css" />
|
|
</head>
|
|
<body>
|
|
<header class="site-header">
|
|
<div class="container">
|
|
<div class="header-row">
|
|
<div>
|
|
<img class="site-logo" src="/static/logo.svg" alt="LinkLog" />
|
|
<h1>Admin</h1>
|
|
<p>Manage users and plugin configuration</p>
|
|
</div>
|
|
<div class="header-actions">
|
|
<button id="new-entry-button" class="new-entry-button hidden" type="button"><a href="/new-entry">New entry</a></button>
|
|
<button class="menu-toggle" type="button" aria-expanded="false" aria-controls="auth-menu">Menu</button>
|
|
<nav id="auth-menu" class="auth-menu hidden" aria-label="Account menu">
|
|
<a id="auth-home-link" href="/">Home</a>
|
|
<a id="auth-about-link" href="/about">About</a>
|
|
<a id="auth-login-button" href="/login">Sign in</a>
|
|
<a id="auth-profile-link" class="hidden" href="/profile">Profile</a>
|
|
<a id="auth-labels-link" class="hidden" href="/labels">Labels</a>
|
|
<a id="auth-admin-link" class="hidden" href="/admin">Admin</a>
|
|
<div id="auth-session" class="auth-session hidden">
|
|
<a id="auth-username" class="user-name" href="/"></a>
|
|
</div>
|
|
<button id="logout-button" class="logout-button hidden" type="button">Sign out</button>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="container">
|
|
<p id="admin-auth-notice" class="auth-notice hidden"></p>
|
|
<div id="admin-controls" class="hidden">
|
|
<section class="link-item settings-panel">
|
|
<h2>Users</h2>
|
|
<form id="user-form">
|
|
<label>
|
|
Username
|
|
<input name="username" type="text" required />
|
|
</label>
|
|
<label>
|
|
Email
|
|
<input name="email" type="email" required />
|
|
</label>
|
|
<label>
|
|
Password
|
|
<input name="password" type="password" minlength="8" required />
|
|
</label>
|
|
<label class="checkbox-label">
|
|
<input name="is_admin" type="checkbox" />
|
|
Administrator
|
|
</label>
|
|
<button type="submit">Add user</button>
|
|
<p id="user-status" class="status" role="status"></p>
|
|
</form>
|
|
<div id="user-list" class="plugin-list" aria-live="polite">Loading users...</div>
|
|
</section>
|
|
|
|
<section class="link-item settings-panel">
|
|
<h2>Plugins</h2>
|
|
<div id="plugin-list" class="plugin-list" aria-live="polite">Loading plugins...</div>
|
|
</section>
|
|
<section class="link-item settings-panel">
|
|
<h2>Labels</h2>
|
|
<div id="admin-label-list" class="plugin-list" aria-live="polite">Loading labels...</div>
|
|
</section>
|
|
<section class="link-item settings-panel">
|
|
<h2>SMTP settings</h2>
|
|
<form id="smtp-form">
|
|
<label>
|
|
SMTP host
|
|
<input name="smtp_host" type="text" required />
|
|
</label>
|
|
<label>
|
|
SMTP port
|
|
<input name="smtp_port" type="number" min="1" max="65535" required />
|
|
</label>
|
|
<label>
|
|
SMTP username
|
|
<input name="smtp_username" type="text" autocomplete="off" />
|
|
</label>
|
|
<label>
|
|
SMTP password
|
|
<input name="smtp_password" type="password" autocomplete="new-password" />
|
|
</label>
|
|
<label>
|
|
From address
|
|
<input name="smtp_from" type="text" required />
|
|
</label>
|
|
<label class="checkbox-label">
|
|
<input name="smtp_use_tls" type="checkbox" /> Use STARTTLS
|
|
</label>
|
|
<button type="submit">Save SMTP settings</button>
|
|
<button id="smtp-test-button" type="button">Send validation email</button>
|
|
<p id="smtp-status" class="status" role="status"></p>
|
|
|
|
</form>
|
|
</section>
|
|
<section class="link-item settings-panel">
|
|
<h2>Available themes</h2>
|
|
<p>Choose the themes visitors may use.</p>
|
|
<form id="themes-form">
|
|
<div id="theme-options" class="theme-options" aria-live="polite">Loading themes...</div>
|
|
<button type="submit">Save themes</button>
|
|
<p id="theme-status" class="status" role="status"></p>
|
|
</form>
|
|
</section>
|
|
</div>
|
|
</main>
|
|
<footer class="site-footer">LinkLog Version {{ app_version }}. Copyright © 2026 Olaf Kolkman · <a href="https://git.kolkman.org/olaf/Link-Log">git.kolkman.org/LinkLog</a></footer>
|
|
<script src="/static/auth-header.js?v=3"></script>
|
|
<script src="/static/logout.js?v=2"></script>
|
|
<script src="/static/theme.js?v=1"></script>
|
|
<script src="/static/admin.js?v=5"></script>
|
|
</body>
|
|
</html>
|