ci: fix pipeline, update readme and anonymize ZT references
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<%- include('partials/header') %>
|
||||
<%- include('partials/sidebar') %>
|
||||
|
||||
<main class="content-wrapper">
|
||||
<section id="section-downloads" class="section">
|
||||
<div class="header-row">
|
||||
<h2>Téléchargements</h2>
|
||||
<button id="btn-refresh-downloads" class="btn-icon-only">
|
||||
<i data-lucide="refresh-cw"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="downloads-list" class="downloads-container">
|
||||
<div class="empty-state">Aucun téléchargement actif</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<%- include('partials/footer') %>
|
||||
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>Hydr'Hacked — Connexion</title>
|
||||
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="theme-color" content="#1a1a1a">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="Hydr'Hacked">
|
||||
<link rel="apple-touch-icon" href="/images/icone-192.png">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/lucide.min.js"></script>
|
||||
<script src="/app.auth.js"></script>
|
||||
<style>
|
||||
.error-msg {
|
||||
color: var(--primary);
|
||||
font-size: 0.95rem;
|
||||
margin-top: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="login-overlay" class="overlay active">
|
||||
<div class="login-box">
|
||||
<div class="logo-large">
|
||||
<img src="/images/logo_transparent.png" alt="Logo" class="icon-xl">
|
||||
<h1>Hydr'Hacked</h1>
|
||||
</div>
|
||||
<form id="login-form">
|
||||
<input type="text" id="login-username" placeholder="Nom d'utilisateur" required autofocus autocomplete="username">
|
||||
<div class="password-container">
|
||||
<input type="password" id="login-password" placeholder="Mot de passe" required autocomplete="current-password">
|
||||
<button type="button" class="toggle-password" tabindex="-1">
|
||||
<i data-lucide="eye" class="eye-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
<button type="submit">Connexion</button>
|
||||
</form>
|
||||
<div id="login-error" class="error-msg hidden"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
if (typeof lucide !== 'undefined') lucide.createIcons();
|
||||
if (window.AuthHelpers) AuthHelpers.initPasswordToggles();
|
||||
|
||||
document.getElementById('login-form').addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
const username = document.getElementById('login-username').value.trim();
|
||||
const password = document.getElementById('login-password').value;
|
||||
const errorDiv = document.getElementById('login-error');
|
||||
|
||||
errorDiv.classList.add('hidden');
|
||||
errorDiv.textContent = '';
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/login', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ username, password })
|
||||
});
|
||||
const data = await res.json();
|
||||
|
||||
if (data.success) {
|
||||
// Redirection vers la page par défaut
|
||||
const defaultPage = document.cookie.split('; ').find(c => c.startsWith('defaultPage='));
|
||||
const target = defaultPage ? defaultPage.split('=')[1] : '/trending';
|
||||
window.location.href = target;
|
||||
} else {
|
||||
errorDiv.textContent = data.error || 'Identifiants invalides.';
|
||||
errorDiv.classList.remove('hidden');
|
||||
}
|
||||
} catch (err) {
|
||||
errorDiv.textContent = 'Erreur de connexion au serveur.';
|
||||
errorDiv.classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,45 @@
|
||||
<%- include('partials/header') %>
|
||||
<%- include('partials/sidebar') %>
|
||||
|
||||
<main class="content-wrapper">
|
||||
<section id="section-manual" class="section">
|
||||
<div class="hero-header">
|
||||
<h2>Ajout Manuel JDownloader</h2>
|
||||
</div>
|
||||
|
||||
<div class="form-card" style="max-width: 600px; margin: 0 auto;">
|
||||
<h3 style="margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;">Ajouter des liens manuellement</h3>
|
||||
|
||||
<div style="margin-bottom: 1.25rem;">
|
||||
<label for="manual-title" style="display: block; font-weight: 600; margin-bottom: 0.5rem; color: white;">Nom du Film ou de la Série</label>
|
||||
<input type="text" id="manual-title" placeholder="Ex: Inception, Breaking Bad S01..." style="width: 100%; padding: 12px; background: var(--bg-main); border: 1px solid var(--border); color: white; border-radius: var(--radius);">
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1.25rem;">
|
||||
<label style="display: block; font-weight: 600; margin-bottom: 0.5rem; color: white;">Type de contenu</label>
|
||||
<div class="manual-type-selector">
|
||||
<div class="type-option active" data-type="film">
|
||||
<i data-lucide="film" style="width: 18px; height: 18px;"></i>
|
||||
Film
|
||||
</div>
|
||||
<div class="type-option" data-type="series">
|
||||
<i data-lucide="tv" style="width: 18px; height: 18px;"></i>
|
||||
Série
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="manual-type" value="film">
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1.5rem;">
|
||||
<label for="manual-links" style="display: block; font-weight: 600; margin-bottom: 0.5rem; color: white;">Liens (un lien par ligne)</label>
|
||||
<textarea id="manual-links" placeholder="Copiez-collez vos liens ici (1fichier, uptobox, etc.) Un lien par ligne..." style="width: 100%; height: 180px; padding: 12px; background: var(--bg-main); border: 1px solid var(--border); color: white; border-radius: var(--radius); font-family: monospace; line-height: 1.5; resize: vertical;"></textarea>
|
||||
</div>
|
||||
|
||||
<button class="btn-primary" id="btn-manual-submit" style="width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 24px; font-weight: bold;">
|
||||
<i data-lucide="plus-circle"></i> Envoyer à JDownloader
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<%- include('partials/footer') %>
|
||||
@@ -0,0 +1,26 @@
|
||||
</div>
|
||||
|
||||
<div id="modal-overlay" class="modal-overlay hidden">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 id="modal-title">Titre</h3>
|
||||
<button id="modal-close"><i data-lucide="x"></i></button>
|
||||
</div>
|
||||
<div id="modal-body" class="modal-body"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="toast" class="toast hidden">Notification</div>
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(reg => console.log('SW enregistré!', reg.scope))
|
||||
.catch(err => console.log('SW échec:', err));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="/app.auth.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>Hydr'Hacked</title>
|
||||
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="theme-color" content="#1a1a1a">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="Hydr'Hacked">
|
||||
<link rel="apple-touch-icon" href="/images/icone-192.png">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/lucide.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app-container">
|
||||
@@ -0,0 +1,93 @@
|
||||
<nav class="sidebar" id="sidebar">
|
||||
<script>
|
||||
(function() {
|
||||
if (localStorage.getItem('sidebar-collapsed') === 'true') {
|
||||
document.getElementById('sidebar').classList.add('collapsed');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<div class="brand">
|
||||
<div class="brand-logo">
|
||||
<img src="/images/logo_transparent.png" alt="Logo" class="brand-icon">
|
||||
<span>Hydr'Hacked</span>
|
||||
</div>
|
||||
<button id="btn-sidebar-toggle" class="btn-sidebar-toggle" title="Réduire la barre latérale">
|
||||
<i data-lucide="chevron-left" id="sidebar-toggle-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
<ul class="nav-links">
|
||||
<a href="/trending" style="text-decoration: none; color: inherit;">
|
||||
<li class="<%= page === 'trending' ? 'active' : '' %>" data-target="section-trending">
|
||||
<i data-lucide="flame"></i>
|
||||
<span>Tendances</span>
|
||||
</li>
|
||||
</a>
|
||||
<a href="/recent" style="text-decoration: none; color: inherit;">
|
||||
<li class="<%= page === 'recent' ? 'active' : '' %>" data-target="section-recent">
|
||||
<i data-lucide="clock"></i>
|
||||
<span>Ajouts récents</span>
|
||||
</li>
|
||||
</a>
|
||||
<a href="/search" style="text-decoration: none; color: inherit;">
|
||||
<li class="<%= page === 'search' ? 'active' : '' %>" data-target="section-search">
|
||||
<i data-lucide="search"></i>
|
||||
<span>Recherche</span>
|
||||
</li>
|
||||
</a>
|
||||
<a href="/downloads" style="text-decoration: none; color: inherit;">
|
||||
<li class="<%= page === 'downloads' ? 'active' : '' %>" data-target="section-downloads">
|
||||
<i data-lucide="download"></i>
|
||||
<span>Téléchargements</span>
|
||||
</li>
|
||||
</a>
|
||||
<a href="/manual" style="text-decoration: none; color: inherit;">
|
||||
<li class="<%= page === 'manual' ? 'active' : '' %>" data-target="section-manual">
|
||||
<i data-lucide="plus-circle"></i>
|
||||
<span>Ajout manuel</span>
|
||||
</li>
|
||||
</a>
|
||||
<% if (typeof currentUser !== 'undefined' && currentUser && currentUser.role === 'admin') { %>
|
||||
<a href="/settings" style="text-decoration: none; color: inherit;">
|
||||
<li class="<%= page === 'settings' ? 'active' : '' %>" data-target="section-settings">
|
||||
<i data-lucide="settings"></i>
|
||||
<span>Paramètres</span>
|
||||
</li>
|
||||
</a>
|
||||
<% } %>
|
||||
</ul>
|
||||
<div class="nav-footer">
|
||||
<button id="btn-logout" class="btn-text">
|
||||
<i data-lucide="log-out"></i>
|
||||
<span>Déconnexion</span>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
const toggleBtn = document.getElementById('btn-sidebar-toggle');
|
||||
const toggleIcon = document.getElementById('sidebar-toggle-icon');
|
||||
|
||||
if (!sidebar || !toggleBtn || !toggleIcon) return;
|
||||
|
||||
const updateIcon = (isCollapsed) => {
|
||||
toggleIcon.setAttribute('data-lucide', isCollapsed ? 'chevron-right' : 'chevron-left');
|
||||
if (window.lucide) {
|
||||
window.lucide.createIcons({ root: toggleBtn });
|
||||
}
|
||||
};
|
||||
|
||||
// Sync initial icon state
|
||||
const isCollapsed = sidebar.classList.contains('collapsed');
|
||||
updateIcon(isCollapsed);
|
||||
|
||||
toggleBtn.addEventListener('click', () => {
|
||||
const willCollapse = !sidebar.classList.contains('collapsed');
|
||||
sidebar.classList.toggle('collapsed', willCollapse);
|
||||
localStorage.setItem('sidebar-collapsed', willCollapse ? 'true' : 'false');
|
||||
updateIcon(willCollapse);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<%- include('partials/header') %>
|
||||
<%- include('partials/sidebar') %>
|
||||
|
||||
<main class="content-wrapper">
|
||||
<section id="section-recent" class="section">
|
||||
<div class="hero-header">
|
||||
<h2>Récemment Ajoutés</h2>
|
||||
<p>Les derniers ajouts disponibles sur la source</p>
|
||||
</div>
|
||||
|
||||
<div id="recent-grid" class="media-grid">
|
||||
<div class="loader-wrapper">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<%- include('partials/footer') %>
|
||||
@@ -0,0 +1,55 @@
|
||||
<%- include('partials/header') %>
|
||||
<%- include('partials/sidebar') %>
|
||||
|
||||
<main class="content-wrapper">
|
||||
<section id="section-search" class="section">
|
||||
<div class="hero-header">
|
||||
<h2>Recherche Globale</h2>
|
||||
</div>
|
||||
|
||||
<div class="search-hero">
|
||||
<div class="search-input-wrapper">
|
||||
<i data-lucide="search" class="search-icon-inside"></i>
|
||||
<input type="text" id="search-input" placeholder="Titre du film, série...">
|
||||
<button id="btn-search-trigger" class="btn-search-action">Go</button>
|
||||
</div>
|
||||
<p style="font-size: 0.8rem; color: var(--text-sec); margin-top: 8px; text-align: center;">
|
||||
⚠️ <i>Recherche stricte (Seulement pour la LocalDB) : Saisissez exactement le titre du film/série recherché.</i>
|
||||
</p>
|
||||
<div class="filter-pills" style="margin-top: 15px;" id="search-filters-container">
|
||||
<label class="pill">
|
||||
<input type="radio" name="search-type" value="film" checked>
|
||||
<span>Films</span>
|
||||
</label>
|
||||
<label class="pill">
|
||||
<input type="radio" name="search-type" value="serie">
|
||||
<span>Séries</span>
|
||||
</label>
|
||||
<label class="pill localdb-filter hidden">
|
||||
<input type="radio" name="search-type" value="game">
|
||||
<span>Jeux</span>
|
||||
</label>
|
||||
<label class="pill localdb-filter hidden">
|
||||
<input type="radio" name="search-type" value="software">
|
||||
<span>Logiciels</span>
|
||||
</label>
|
||||
<label class="pill localdb-filter hidden">
|
||||
<input type="radio" name="search-type" value="book">
|
||||
<span>Livres/BD</span>
|
||||
</label>
|
||||
<label class="pill localdb-filter hidden">
|
||||
<input type="radio" name="search-type" value="music">
|
||||
<span>Musique</span>
|
||||
</label>
|
||||
<label class="pill localdb-filter hidden">
|
||||
<input type="radio" name="search-type" value="other">
|
||||
<span>Autres</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="search-results" class="media-grid"></div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<%- include('partials/footer') %>
|
||||
@@ -0,0 +1,128 @@
|
||||
<%- include('partials/header') %>
|
||||
<%- include('partials/sidebar') %>
|
||||
|
||||
<main class="content-wrapper">
|
||||
<section id="section-settings" class="section">
|
||||
<div class="hero-header">
|
||||
<h2>Paramètres</h2>
|
||||
</div>
|
||||
|
||||
<div class="form-card" style="max-width: 750px; margin: 0 auto 1.5rem auto;">
|
||||
<h3 style="margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; display: flex; align-items: center; gap: 8px;">
|
||||
<i data-lucide="database"></i> Sources de Recherche
|
||||
</h3>
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
|
||||
Sélectionnez la source principale (prioritaire) et les sources secondaires à utiliser.
|
||||
</p>
|
||||
|
||||
<div style="margin-bottom: 1.5rem;">
|
||||
<label style="display: block; font-weight: 600; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px;">
|
||||
<i data-lucide="list-ordered" style="color: var(--primary); width: 18px; height: 18px;"></i> Priorité & Activation des Sources
|
||||
</label>
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1.2rem;">
|
||||
Activez les sources et glissez-déposez pour définir leur ordre de priorité. La première source active (cochée) sera la source principale.
|
||||
</p>
|
||||
|
||||
<div id="sources-sortable-container" style="display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem;">
|
||||
<!-- Les sources ordonnables seront injectées ici par JS -->
|
||||
</div>
|
||||
|
||||
<p id="primary-source-warning" style="font-size: 0.8rem; color: #f59e0b; margin-top: 12px; display: none; align-items: center; gap: 6px; font-weight: 500; background: rgba(245, 158, 11, 0.1); padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(245, 158, 11, 0.2);">
|
||||
<i data-lucide="alert-triangle" style="width: 16px; height: 16px; flex-shrink: 0;"></i>
|
||||
Hydracker est la première source active. Elle peut être très lente à répondre.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-card" style="max-width: 750px; margin: 0 auto 1.5rem auto;">
|
||||
<h3 style="margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;">
|
||||
Page d'accueil par défaut</h3>
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
|
||||
Sélectionnez la page sur laquelle vous souhaitez être redirigé par défaut à l'ouverture de
|
||||
l'application.
|
||||
</p>
|
||||
<select id="select-default-page" style="margin-top: 0.5rem; margin-bottom: 0;">
|
||||
<option value="/trending">Tendances</option>
|
||||
<option value="/recent">Ajouts récents</option>
|
||||
<option value="/search">Recherche</option>
|
||||
<option value="/downloads">Téléchargements</option>
|
||||
<option value="/manual">Ajout manuel</option>
|
||||
<option value="/settings">Paramètres</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-card" style="max-width: 750px; margin: 0 auto;">
|
||||
<label style="display: flex; align-items: center; justify-content: space-between; cursor: pointer;">
|
||||
<span style="font-weight: 600;">Intégration JDownloader</span>
|
||||
<input type="checkbox" id="toggle-jd" style="width: 20px; height: 20px;">
|
||||
</label>
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); margin-top: 10px;">Si désactivé, le lien
|
||||
1fichier sera affiché directement sous forme de pop-up sans être envoyé à JDownloader.</p>
|
||||
</div>
|
||||
|
||||
<% if (typeof currentUser !== 'undefined' && currentUser && currentUser.role === 'admin') { %>
|
||||
<div class="form-card" style="max-width: 750px; margin: 1.5rem auto 0 auto;">
|
||||
<h3 style="margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; display: flex; align-items: center; gap: 8px;">
|
||||
<i data-lucide="users" style="width: 20px; height: 20px;"></i> Gestion des Utilisateurs
|
||||
</h3>
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
|
||||
Gérez les comptes utilisateurs. Seuls les administrateurs ont accès à cette section.
|
||||
</p>
|
||||
|
||||
<!-- Liste des utilisateurs -->
|
||||
<div id="admin-users-list" style="display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem;">
|
||||
<!-- Injecté par JS -->
|
||||
</div>
|
||||
|
||||
<!-- Formulaire d'ajout -->
|
||||
<div style="border-top: 1px solid var(--border); padding-top: 1rem;">
|
||||
<label style="display: block; font-weight: 600; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px;">
|
||||
<i data-lucide="user-plus" style="color: var(--primary); width: 16px; height: 16px;"></i> Ajouter un utilisateur
|
||||
</label>
|
||||
<div style="display: flex; gap: 10px; margin-bottom: 12px; align-items: center;">
|
||||
<input type="text" id="admin-new-username" placeholder="Nom d'utilisateur"
|
||||
style="flex: 1; margin: 0; padding: 12px 16px;"
|
||||
minlength="3" maxlength="32" pattern="[a-zA-Z0-9_.\-]+">
|
||||
<select id="admin-new-role" style="width: auto; min-width: 130px; margin: 0; padding: 12px 16px;">
|
||||
<option value="user">Utilisateur</option>
|
||||
<option value="admin">Admin</option>
|
||||
</select>
|
||||
</div>
|
||||
<button id="admin-add-user-btn" class="btn-action" style="width: 100%; padding: 12px 20px;">
|
||||
Créer l'utilisateur
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<!-- Modal pour afficher le mot de passe généré -->
|
||||
<div id="admin-password-modal" class="modal-overlay hidden">
|
||||
<div class="modal-content" style="max-width: 420px;">
|
||||
<h3 style="margin-bottom: 1rem; display: flex; align-items: center; gap: 8px;">
|
||||
<i data-lucide="key" style="width: 20px; height: 20px; color: var(--primary);"></i>
|
||||
Mot de passe généré
|
||||
</h3>
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
|
||||
Copiez ce mot de passe et transmettez-le à l'utilisateur. Il ne sera plus affiché.
|
||||
</p>
|
||||
<div id="admin-generated-password" style="background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; padding: 14px; font-family: monospace; font-size: 1.1rem; text-align: center; color: var(--primary); font-weight: 700; letter-spacing: 1px; user-select: all; cursor: text; word-break: break-all;"></div>
|
||||
<button id="admin-copy-password-btn" style="width: 100%; margin-top: 1rem; padding: 10px; border-radius: 8px; background: var(--bg-card); border: 1px solid var(--border); color: white; font-weight: 600; cursor: pointer;">
|
||||
Copier le mot de passe
|
||||
</button>
|
||||
<button id="admin-close-modal-btn" style="width: 100%; margin-top: 0.5rem; padding: 10px; border-radius: 8px; background: var(--primary); border: none; color: white; font-weight: 600; cursor: pointer;">
|
||||
Fermer
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; margin-top: 3rem; margin-bottom: 1rem;">
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border);">
|
||||
<i data-lucide="info" style="width: 14px; height: 14px;"></i>
|
||||
Hydr'Hacked v1.4.8
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<%- include('partials/footer') %>
|
||||
+249
@@ -0,0 +1,249 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||
<title>Hydr'Hacked — Installation</title>
|
||||
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<meta name="theme-color" content="#1a1a1a">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<meta name="apple-mobile-web-app-title" content="Hydr'Hacked">
|
||||
<link rel="apple-touch-icon" href="/images/icone-192.png">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
<script src="/lucide.min.js"></script>
|
||||
<script src="/app.auth.js"></script>
|
||||
<style>
|
||||
.setup-container {
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
background: var(--bg-main);
|
||||
}
|
||||
.setup-box {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
padding: 2.5rem;
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
|
||||
}
|
||||
.setup-logo {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.setup-logo img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.setup-logo h1 {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
margin: 0;
|
||||
}
|
||||
.setup-logo p {
|
||||
color: var(--text-sec);
|
||||
font-size: 0.9rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.setup-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background: rgba(229, 9, 20, 0.15);
|
||||
color: var(--primary);
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
padding: 4px 12px;
|
||||
border-radius: 20px;
|
||||
margin-bottom: 1.5rem;
|
||||
border: 1px solid rgba(229, 9, 20, 0.3);
|
||||
}
|
||||
.setup-form { display: flex; flex-direction: column; gap: 1rem; }
|
||||
.setup-form label {
|
||||
display: block;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-sec);
|
||||
margin-bottom: 6px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.setup-form input {
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.setup-form input:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
|
||||
}
|
||||
.setup-form button[type="submit"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s, transform 0.1s;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.setup-form button[type="submit"]:hover { background: #c40812; }
|
||||
.setup-form button[type="submit"]:active { transform: scale(0.98); }
|
||||
.setup-form button[type="submit"]:disabled {
|
||||
background: #4b5563;
|
||||
color: #9ca3af;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.setup-error {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border: 1px solid rgba(239, 68, 68, 0.3);
|
||||
color: #ef4444;
|
||||
padding: 10px 14px;
|
||||
border-radius: 8px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="setup-container">
|
||||
<div class="setup-box">
|
||||
<div class="setup-logo">
|
||||
<img src="/images/logo_transparent.png" alt="Logo">
|
||||
<h1>Hydr'Hacked</h1>
|
||||
<p>Configuration initiale</p>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<span class="setup-badge">
|
||||
<i data-lucide="shield" style="width: 14px; height: 14px;"></i>
|
||||
Création du compte administrateur
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<% if (error) { %>
|
||||
<div class="setup-error" style="margin-bottom: 1rem;">
|
||||
<%= error %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<div id="setup-client-error" class="setup-error" style="margin-bottom: 1rem; display: none;"></div>
|
||||
|
||||
<form class="setup-form" id="setup-form" action="/setup" method="POST">
|
||||
<div>
|
||||
<label for="setup-username">Nom d'utilisateur</label>
|
||||
<input type="text" id="setup-username" name="username" placeholder="admin" required
|
||||
minlength="3" maxlength="32" pattern="[a-zA-Z0-9_.\-]+" autofocus autocomplete="username">
|
||||
</div>
|
||||
|
||||
<div class="password-requirements" style="text-align: left;">
|
||||
<strong>Exigences du mot de passe :</strong>
|
||||
<ul style="margin-top: 8px;">
|
||||
<li id="req-length" class="invalid" style="display: flex; align-items: center; gap: 6px; font-size: 0.8rem;"><span class="icon-holder"><i data-lucide="x" style="width:14px;height:14px;"></i></span> Au moins 8 caractères</li>
|
||||
<li id="req-upper" class="invalid" style="display: flex; align-items: center; gap: 6px; font-size: 0.8rem;"><span class="icon-holder"><i data-lucide="x" style="width:14px;height:14px;"></i></span> Au moins une majuscule (A-Z)</li>
|
||||
<li id="req-number" class="invalid" style="display: flex; align-items: center; gap: 6px; font-size: 0.8rem;"><span class="icon-holder"><i data-lucide="x" style="width:14px;height:14px;"></i></span> Au moins un chiffre (0-9)</li>
|
||||
<li id="req-special" class="invalid" style="display: flex; align-items: center; gap: 6px; font-size: 0.8rem;"><span class="icon-holder"><i data-lucide="x" style="width:14px;height:14px;"></i></span> Au moins un caractère spécial</li>
|
||||
<li id="req-match" class="invalid" style="display: flex; align-items: center; gap: 6px; font-size: 0.8rem;"><span class="icon-holder"><i data-lucide="x" style="width:14px;height:14px;"></i></span> Mots de passe identiques</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="setup-password">Mot de passe</label>
|
||||
<div class="password-container">
|
||||
<input type="password" id="setup-password" name="password" placeholder="Faut sécuriser le compte !"
|
||||
required minlength="8" maxlength="128" autocomplete="new-password">
|
||||
<button type="button" class="toggle-password" tabindex="-1">
|
||||
<i data-lucide="eye" class="eye-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="setup-confirm">Confirmer le mot de passe</label>
|
||||
<div class="password-container">
|
||||
<input type="password" id="setup-confirm" name="confirmPassword" placeholder="Retapez le mot de passe"
|
||||
required minlength="8" maxlength="128" autocomplete="new-password">
|
||||
<button type="button" class="toggle-password" tabindex="-1">
|
||||
<i data-lucide="eye" class="eye-icon"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" id="setup-submit-btn" disabled>Créer le compte administrateur</button>
|
||||
<div style="text-align: center; margin-top: 3rem; margin-bottom: 1rem;">
|
||||
<p style="font-size: 0.85rem; color: var(--text-sec); display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border);">
|
||||
<i data-lucide="info" style="width: 14px; height: 14px;"></i>
|
||||
Hydr'Hacked v1.4.8
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
if (typeof lucide !== 'undefined') lucide.createIcons();
|
||||
|
||||
// Initialize password visibility toggles using the shared library
|
||||
if (window.AuthHelpers) {
|
||||
AuthHelpers.initPasswordToggles();
|
||||
}
|
||||
|
||||
const passwordInput = document.getElementById('setup-password');
|
||||
const confirmInput = document.getElementById('setup-confirm');
|
||||
const submitBtn = document.getElementById('setup-submit-btn');
|
||||
|
||||
const validateSetupInputs = () => {
|
||||
if (!window.AuthHelpers) return;
|
||||
const val = passwordInput.value;
|
||||
const confirmVal = confirmInput.value;
|
||||
|
||||
// Use the shared library validation logic
|
||||
const statuses = AuthHelpers.validateComplexity(val, confirmVal);
|
||||
|
||||
// Use the shared library UI updater
|
||||
AuthHelpers.updateRequirementsUI(document.getElementById('setup-form'), statuses);
|
||||
|
||||
submitBtn.disabled = !statuses.allValid;
|
||||
};
|
||||
|
||||
passwordInput.addEventListener('input', validateSetupInputs);
|
||||
confirmInput.addEventListener('input', validateSetupInputs);
|
||||
|
||||
document.getElementById('setup-form').addEventListener('submit', function(e) {
|
||||
const password = passwordInput.value;
|
||||
const confirm = confirmInput.value;
|
||||
const errorDiv = document.getElementById('setup-client-error');
|
||||
|
||||
errorDiv.style.display = 'none';
|
||||
|
||||
if (password !== confirm) {
|
||||
e.preventDefault();
|
||||
errorDiv.textContent = 'Les mots de passe ne correspondent pas.';
|
||||
errorDiv.style.display = 'block';
|
||||
return;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
<%- include('partials/header') %>
|
||||
<%- include('partials/sidebar') %>
|
||||
|
||||
<main class="content-wrapper">
|
||||
<section id="section-trending" class="section">
|
||||
<div class="hero-header">
|
||||
<h2>🔥 Tendances du Moment</h2>
|
||||
<p>Les contenus les plus populaires en ce moment</p>
|
||||
</div>
|
||||
|
||||
<div class="filter-pills" style="margin-bottom: 2rem;">
|
||||
<label class="pill">
|
||||
<input type="radio" name="trending-type" value="film" checked>
|
||||
<span>Films</span>
|
||||
</label>
|
||||
<label class="pill">
|
||||
<input type="radio" name="trending-type" value="serie">
|
||||
<span>Séries</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="trending-grid" class="media-grid">
|
||||
<div class="loader-wrapper">
|
||||
<div class="loader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<%- include('partials/footer') %>
|
||||
Reference in New Issue
Block a user