feat(portal): Update services dashboard with SecuBox theme
- Use SecuBox blue cyberpunk theme (matching login.html) - Check secubox_token for authentication, redirect to login.html if missing - Add Guacamole to administration services - Consistent styling across all portal pages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
08ebaefafb
commit
20e4680d1a
@ -1,228 +1,251 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SecuBox Portal</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%); min-height: 100vh; color: #e0e0e0; }
|
||||
.grid-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px); background-size: 50px 50px; animation: gridMove 20s linear infinite; pointer-events: none; }
|
||||
@keyframes gridMove { 0% { transform: translate(0,0); } 100% { transform: translate(50px,50px); } }
|
||||
.container { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 2rem; }
|
||||
.login-view { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; }
|
||||
.login-card { background: rgba(26,26,46,0.9); border: 1px solid rgba(0,255,136,0.2); border-radius: 16px; padding: 3rem; width: 100%; max-width: 400px; backdrop-filter: blur(10px); }
|
||||
.logo { text-align: center; margin-bottom: 2rem; }
|
||||
.logo h1 { font-size: 2.5rem; background: linear-gradient(135deg, #00ff88, #00d4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
|
||||
.logo p { color: #888; margin-top: 0.5rem; }
|
||||
.form-group { margin-bottom: 1.5rem; }
|
||||
.form-group label { display: block; margin-bottom: 0.5rem; color: #aaa; font-size: 0.9rem; }
|
||||
.form-group input { width: 100%; padding: 0.8rem 1rem; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: #fff; font-size: 1rem; }
|
||||
.form-group input:focus { outline: none; border-color: #00ff88; }
|
||||
.btn { width: 100%; padding: 1rem; background: linear-gradient(135deg, #00ff88, #00cc6a); border: none; border-radius: 8px; color: #000; font-size: 1rem; font-weight: 600; cursor: pointer; }
|
||||
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,255,136,0.4); }
|
||||
.btn:disabled { opacity: 0.6; }
|
||||
.error-msg { background: rgba(255,68,68,0.2); border: 1px solid rgba(255,68,68,0.5); color: #ff6b6b; padding: 0.8rem; border-radius: 8px; margin-bottom: 1rem; display: none; text-align: center; }
|
||||
.guide-link { margin-top: 1.5rem; text-align: center; }
|
||||
.guide-link a { color: #00d4ff; text-decoration: none; font-size: 0.9rem; }
|
||||
.guide-link a:hover { color: #00ff88; text-decoration: underline; }
|
||||
.portal-view { display: none; }
|
||||
.portal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 2rem; }
|
||||
.portal-header h1 { font-size: 1.8rem; background: linear-gradient(135deg, #00ff88, #00d4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
|
||||
.user-info { display: flex; align-items: center; gap: 1rem; }
|
||||
.user-badge { background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3); padding: 0.5rem 1rem; border-radius: 20px; }
|
||||
.logout-btn { background: rgba(255,68,68,0.2); border: 1px solid rgba(255,68,68,0.5); color: #ff6b6b; padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; }
|
||||
.section-title { font-size: 1.1rem; color: #00ff88; margin: 1.5rem 0 1rem; }
|
||||
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
|
||||
.service-card { background: rgba(26,26,46,0.8); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 1.2rem; text-decoration: none; color: inherit; transition: all 0.3s; }
|
||||
.service-card:hover { border-color: #00ff88; transform: translateY(-3px); }
|
||||
.service-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
|
||||
.service-name { font-weight: 600; color: #fff; margin-bottom: 0.3rem; }
|
||||
.service-url { font-size: 0.75rem; color: #00d4ff; }
|
||||
.footer { text-align: center; padding: 2rem 0; color: #555; font-size: 0.85rem; }
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SecuBox — Services Portal</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #0a0a0f;
|
||||
--surface: #12121a;
|
||||
--border: #1a1a2e;
|
||||
--accent: #005f9e;
|
||||
--accent-glow: rgba(0,95,158,0.3);
|
||||
--text: #e0e0e0;
|
||||
--muted: #666;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: "Segoe UI", system-ui, sans-serif;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background-image:
|
||||
linear-gradient(rgba(0,95,158,0.03) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(0,95,158,0.03) 1px, transparent 1px);
|
||||
background-size: 50px 50px;
|
||||
animation: gridMove 20s linear infinite;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@keyframes gridMove {
|
||||
0% { transform: translate(0,0); }
|
||||
100% { transform: translate(50px,50px); }
|
||||
}
|
||||
|
||||
.container { max-width: 1200px; margin: 0 auto; padding: 20px; position: relative; z-index: 1; }
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.logo { display: flex; align-items: center; gap: 15px; }
|
||||
.logo-icon {
|
||||
width: 50px; height: 50px;
|
||||
background: linear-gradient(135deg, var(--accent), #007acc);
|
||||
border-radius: 12px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-family: "Courier New", monospace;
|
||||
font-size: 1.5rem; font-weight: 900; color: #fff;
|
||||
}
|
||||
.logo-text { font-size: 1.5rem; font-weight: 700; }
|
||||
.logo-text span { color: var(--accent); }
|
||||
|
||||
.user-info { display: flex; align-items: center; gap: 15px; }
|
||||
.user-badge {
|
||||
background: rgba(0,95,158,0.1);
|
||||
border: 1px solid var(--accent);
|
||||
padding: 8px 16px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.logout-btn {
|
||||
background: rgba(231,76,60,0.1);
|
||||
border: 1px solid #e74c3c;
|
||||
color: #e74c3c;
|
||||
padding: 8px 16px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.logout-btn:hover { background: rgba(231,76,60,0.2); }
|
||||
|
||||
.section-title {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: var(--accent);
|
||||
margin: 30px 0 15px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.services-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.service-card:hover {
|
||||
border-color: var(--accent);
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 8px 25px var(--accent-glow);
|
||||
}
|
||||
|
||||
.service-icon { font-size: 2rem; margin-bottom: 10px; }
|
||||
.service-name { font-weight: 600; color: #fff; margin-bottom: 5px; }
|
||||
.service-url { font-size: 0.75rem; color: var(--accent); font-family: monospace; }
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 40px 0 20px;
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.footer a { color: var(--accent); text-decoration: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="grid-bg"></div>
|
||||
|
||||
<div class="login-view" id="loginView">
|
||||
<div class="login-card">
|
||||
<div class="logo">
|
||||
<h1>SecuBox</h1>
|
||||
<p>SSO Portal</p>
|
||||
</div>
|
||||
<div class="error-msg" id="errorMsg"></div>
|
||||
<form id="loginForm">
|
||||
<div class="form-group">
|
||||
<label>Utilisateur</label>
|
||||
<input type="text" id="username" required autocomplete="username">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Mot de passe</label>
|
||||
<input type="password" id="password" required autocomplete="current-password">
|
||||
</div>
|
||||
<button type="submit" class="btn" id="loginBtn">Connexion</button>
|
||||
</form>
|
||||
<div class="guide-link">
|
||||
<a href="https://gk2.secubox.in/guide/" target="_blank">📖 Guide utilisateur</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<header class="header">
|
||||
<div class="logo">
|
||||
<div class="logo-icon">S</div>
|
||||
<h1 class="logo-text">Secu<span>Box</span></h1>
|
||||
</div>
|
||||
|
||||
<div class="portal-view" id="portalView">
|
||||
<div class="container">
|
||||
<header class="portal-header">
|
||||
<h1>SecuBox Services</h1>
|
||||
<div class="user-info">
|
||||
<span class="user-badge" id="userBadge"></span>
|
||||
<button class="logout-btn" id="logoutBtn">Logout</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<h2 class="section-title">Communication</h2>
|
||||
<div class="services-grid">
|
||||
<a href="https://webmail.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">📧</div>
|
||||
<div class="service-name">Webmail</div>
|
||||
<div class="service-url">webmail.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://matrix.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">💬</div>
|
||||
<div class="service-name">Matrix</div>
|
||||
<div class="service-url">matrix.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://xmpp.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🗨️</div>
|
||||
<div class="service-name">Jabber</div>
|
||||
<div class="service-url">xmpp.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://meet.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">📹</div>
|
||||
<div class="service-name">Jitsi Meet</div>
|
||||
<div class="service-url">meet.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://voip.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">📞</div>
|
||||
<div class="service-name">VoIP</div>
|
||||
<div class="service-url">voip.gk2.secubox.in</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h2 class="section-title">Cloud et Media</h2>
|
||||
<div class="services-grid">
|
||||
<a href="https://cloud.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">☁️</div>
|
||||
<div class="service-name">Nextcloud</div>
|
||||
<div class="service-url">cloud.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://git.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🔀</div>
|
||||
<div class="service-name">Gitea</div>
|
||||
<div class="service-url">git.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://tube.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🎬</div>
|
||||
<div class="service-name">PeerTube</div>
|
||||
<div class="service-url">tube.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://jellyfin.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🎵</div>
|
||||
<div class="service-name">Jellyfin</div>
|
||||
<div class="service-url">jellyfin.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://social.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🐘</div>
|
||||
<div class="service-name">GoToSocial</div>
|
||||
<div class="service-url">social.gk2.secubox.in</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h2 class="section-title">Administration</h2>
|
||||
<div class="services-grid">
|
||||
<a href="https://admin.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">⚙️</div>
|
||||
<div class="service-name">Admin</div>
|
||||
<div class="service-url">admin.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://vpn.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🔐</div>
|
||||
<div class="service-name">VPN</div>
|
||||
<div class="service-url">vpn.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://hub.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🏠</div>
|
||||
<div class="service-name">Hub</div>
|
||||
<div class="service-url">hub.gk2.secubox.in</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<footer class="footer">SecuBox - Secure Services Portal</footer>
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<span class="user-badge" id="userBadge"></span>
|
||||
<button class="logout-btn" id="logoutBtn">Deconnexion</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
var RPC = "/ubus";
|
||||
<h2 class="section-title">Communication</h2>
|
||||
<div class="services-grid">
|
||||
<a href="https://webmail.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">📧</div>
|
||||
<div class="service-name">Webmail</div>
|
||||
<div class="service-url">webmail.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://matrix.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">💬</div>
|
||||
<div class="service-name">Matrix</div>
|
||||
<div class="service-url">matrix.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://xmpp.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🗨️</div>
|
||||
<div class="service-name">Jabber</div>
|
||||
<div class="service-url">xmpp.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://meet.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">📹</div>
|
||||
<div class="service-name">Jitsi Meet</div>
|
||||
<div class="service-url">meet.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://voip.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">📞</div>
|
||||
<div class="service-name">VoIP</div>
|
||||
<div class="service-url">voip.gk2.secubox.in</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
function login(u, p) {
|
||||
return fetch(RPC, {
|
||||
method: "POST",
|
||||
headers: {"Content-Type": "application/json"},
|
||||
body: JSON.stringify({jsonrpc:"2.0",id:1,method:"call",params:["00000000000000000000000000000000","session","login",{username:u,password:p}]})
|
||||
})
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(d) {
|
||||
if (d.result && d.result[0] === 0) return d.result[1];
|
||||
throw new Error("Auth failed");
|
||||
});
|
||||
}
|
||||
<h2 class="section-title">Cloud & Media</h2>
|
||||
<div class="services-grid">
|
||||
<a href="https://cloud.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">☁️</div>
|
||||
<div class="service-name">Nextcloud</div>
|
||||
<div class="service-url">cloud.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://git.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🔀</div>
|
||||
<div class="service-name">Gitea</div>
|
||||
<div class="service-url">git.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://tube.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🎬</div>
|
||||
<div class="service-name">PeerTube</div>
|
||||
<div class="service-url">tube.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://jellyfin.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🎵</div>
|
||||
<div class="service-name">Jellyfin</div>
|
||||
<div class="service-url">jellyfin.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://social.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🐘</div>
|
||||
<div class="service-name">GoToSocial</div>
|
||||
<div class="service-url">social.gk2.secubox.in</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
function showView(v) {
|
||||
document.getElementById("loginView").style.display = v === "login" ? "flex" : "none";
|
||||
document.getElementById("portalView").style.display = v === "portal" ? "block" : "none";
|
||||
}
|
||||
<h2 class="section-title">Administration</h2>
|
||||
<div class="services-grid">
|
||||
<a href="https://admin.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">⚙️</div>
|
||||
<div class="service-name">Admin LuCI</div>
|
||||
<div class="service-url">admin.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://vpn.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🔐</div>
|
||||
<div class="service-name">WireGuard VPN</div>
|
||||
<div class="service-url">vpn.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://hub.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🏠</div>
|
||||
<div class="service-name">Hub</div>
|
||||
<div class="service-url">hub.gk2.secubox.in</div>
|
||||
</a>
|
||||
<a href="https://guacamole.gk2.secubox.in/" class="service-card" target="_blank">
|
||||
<div class="service-icon">🖥️</div>
|
||||
<div class="service-name">Guacamole</div>
|
||||
<div class="service-url">guacamole.gk2.secubox.in</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
function checkSession() {
|
||||
var s = sessionStorage.getItem("sb_session");
|
||||
var u = sessionStorage.getItem("sb_user");
|
||||
if (s && u) {
|
||||
document.getElementById("userBadge").textContent = u;
|
||||
showView("portal");
|
||||
} else {
|
||||
showView("login");
|
||||
}
|
||||
}
|
||||
<footer class="footer">
|
||||
SecuBox Portal — <a href="https://cybermind.fr">CyberMind.FR</a>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
document.getElementById("loginForm").onsubmit = function(e) {
|
||||
e.preventDefault();
|
||||
var u = document.getElementById("username").value;
|
||||
var p = document.getElementById("password").value;
|
||||
var btn = document.getElementById("loginBtn");
|
||||
var err = document.getElementById("errorMsg");
|
||||
<script>
|
||||
// Check authentication
|
||||
var token = sessionStorage.getItem("secubox_token");
|
||||
var user = sessionStorage.getItem("secubox_user");
|
||||
var email = sessionStorage.getItem("secubox_email");
|
||||
|
||||
btn.disabled = true;
|
||||
btn.textContent = "Connexion...";
|
||||
err.style.display = "none";
|
||||
if (!token || !user) {
|
||||
window.location.href = "/login.html";
|
||||
} else {
|
||||
document.getElementById("userBadge").textContent = user + " (" + email + ")";
|
||||
}
|
||||
|
||||
login(u, p).then(function(sess) {
|
||||
sessionStorage.setItem("sb_session", sess.ubus_rpc_session);
|
||||
sessionStorage.setItem("sb_user", u);
|
||||
document.getElementById("userBadge").textContent = u;
|
||||
showView("portal");
|
||||
}).catch(function() {
|
||||
err.textContent = "Identifiants incorrects";
|
||||
err.style.display = "block";
|
||||
}).finally(function() {
|
||||
btn.disabled = false;
|
||||
btn.textContent = "Connexion";
|
||||
});
|
||||
};
|
||||
document.getElementById("logoutBtn").onclick = function() {
|
||||
sessionStorage.clear();
|
||||
window.location.href = "/login.html";
|
||||
};
|
||||
</script>
|
||||
|
||||
document.getElementById("logoutBtn").onclick = function() {
|
||||
sessionStorage.clear();
|
||||
showView("login");
|
||||
};
|
||||
|
||||
checkSession();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user