Add chat rooms, channels, sidebar nav, themes, and UI polish
Backend (profiles.py / main.py): - Fix bot startup crash: create active user before start_chat - Fix address-clobbering bug on restart (UserContactLink vs CreatedConnLink) - Add user profile type alongside bots - Channels: create groups with observer links, classify via acceptMemberRole - Chat rooms: get_chat_history + send_to_chat, history/messages/send routes UI: - Chat room view with message bubbles and live polling - Convert top nav to collapsible left sidebar (mobile-friendly off-canvas) - Three-way Users/Bots split; clickable cards; copy-address buttons + links - Add Matrix theme alongside Original Light/Dark - File upload sidebar link; site footer on all pages incl. login - Bot-type descriptions on the Bots page; QR caption on profiles Remove orphaned index.html (superseded by list.html). Ignore downloaded libs/, exploration DBs, and local ai.sh. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script>
|
||||
(function(){
|
||||
var t=localStorage.getItem('theme');
|
||||
if(!t){t=window.matchMedia('(prefers-color-scheme:dark)').matches?'original-dark':'original-light';}
|
||||
document.documentElement.setAttribute('data-theme',t);
|
||||
})();
|
||||
</script>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SimpleX Manager — Login</title>
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
:root { --bg: #f5f5f7; --card: #fff; --text: #1d1d1f; --accent: #0053D0; --border: #e0e0e5; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root { --bg: #111827; --card: #0B2A59; --text: #f5f5f7; --accent: #70F0F9; --border: #1e3a5f; }
|
||||
|
||||
[data-theme="original-light"] {
|
||||
--bg: #f5f5f7; --card: #fff; --text: #1d1d1f;
|
||||
--accent: #0053D0; --border: #e0e0e5;
|
||||
--btn-light-text: #fff;
|
||||
}
|
||||
[data-theme="original-dark"] {
|
||||
--bg: #111827; --card: #0B2A59; --text: #f5f5f7;
|
||||
--accent: #70F0F9; --border: #1e3a5f;
|
||||
--btn-light-text: #000;
|
||||
}
|
||||
[data-theme="matrix"] {
|
||||
--bg: #000; --card: #050d05; --text: #00ff41;
|
||||
--accent: #00ff41; --border: #0f3d0f;
|
||||
--btn-light-text: #000; --muted: #2e8b57;
|
||||
}
|
||||
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
|
||||
background: var(--bg); color: var(--text); min-height: 100vh;
|
||||
display: flex; align-items: center; justify-content: center; }
|
||||
display: flex; flex-direction: column; }
|
||||
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
|
||||
.box { background: var(--card); border-radius: 12px; padding: 36px 32px;
|
||||
width: 100%; max-width: 360px; box-shadow: 0 4px 24px rgba(0,0,0,0.1); }
|
||||
h1 { font-size: 22px; font-weight: 700; color: var(--accent); margin-bottom: 24px; text-align: center; }
|
||||
@@ -20,21 +41,35 @@
|
||||
input { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid var(--border);
|
||||
border-radius: 8px; background: var(--bg); color: var(--text); outline: none; margin-bottom: 16px; }
|
||||
input:focus { border-color: var(--accent); }
|
||||
button { width: 100%; padding: 10px; background: var(--accent); color: #fff; border: none;
|
||||
border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
|
||||
@media (prefers-color-scheme: dark) { button { color: #000; } }
|
||||
button { width: 100%; padding: 10px; background: var(--accent); color: var(--btn-light-text);
|
||||
border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
|
||||
.error { color: #DD0000; font-size: 13px; margin-bottom: 12px; text-align: center; }
|
||||
.site-footer { flex-shrink: 0; text-align: center; padding: 18px 20px;
|
||||
border-top: 1px solid var(--border); color: var(--muted, #6e6e73);
|
||||
font-size: 12px; line-height: 1.6; }
|
||||
.site-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
|
||||
.site-footer a:hover { text-decoration: underline; }
|
||||
.site-footer .sep { margin: 0 8px; opacity: 0.5; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<h1>SimpleX Manager</h1>
|
||||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||||
<form method="post" action="/login">
|
||||
<label for="token">Access Token</label>
|
||||
<input type="password" id="token" name="token" placeholder="Enter token…" autofocus>
|
||||
<button type="submit">Sign in</button>
|
||||
</form>
|
||||
<div class="login-main">
|
||||
<div class="box">
|
||||
<h1>SimpleX Manager</h1>
|
||||
{% if error %}<div class="error">{{ error }}</div>{% endif %}
|
||||
<form method="post" action="/login">
|
||||
<label for="token">Access Token</label>
|
||||
<input type="password" id="token" name="token" placeholder="Enter token…" autofocus>
|
||||
<button type="submit">Sign in</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="site-footer">
|
||||
© Bournemouth Technology Ltd
|
||||
<span class="sep">·</span>
|
||||
built on © SimpleX Network
|
||||
<span class="sep">·</span>
|
||||
<a href="https://simplex.chat/downloads/" target="_blank" rel="noopener">Get SimpleX App</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user