v1.5.9 (Actuel)

This commit is contained in:
2026-09-15 21:56:10 +02:00
parent c21cd3ab5e
commit bff992aa4a
56 changed files with 3404 additions and 327 deletions
+5 -4
View File
@@ -3,14 +3,14 @@
<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>
<title>Agora — 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">
<meta name="apple-mobile-web-app-title" content="Agora">
<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">
@@ -25,14 +25,15 @@
font-weight: 600;
}
</style>
<link rel="icon" type="image/svg+xml" href="/logo_svg.svg">
</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>
<img src="/images/logo_svg.svg" alt="Logo" class="icon-xl">
<h1>Agora</h1>
</div>
<form id="login-form">
<input type="text" id="login-username" placeholder="Nom d'utilisateur" required autofocus autocomplete="username">
+1 -1
View File
@@ -32,7 +32,7 @@
<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.)&#10;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>
<textarea id="manual-links" placeholder="Copiez-collez vos liens ici (1fichier, turbobit, etc.)&#10;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;">
+3 -2
View File
@@ -3,19 +3,20 @@
<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>
<title>Agora</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">
<meta name="apple-mobile-web-app-title" content="Agora">
<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>
<link rel="icon" type="image/svg+xml" href="/logo_svg.svg">
</head>
<body>
<div id="app-container">
+2 -2
View File
@@ -8,8 +8,8 @@
</script>
<div class="brand">
<div class="brand-logo">
<img src="/images/logo_transparent.png" alt="Logo" class="brand-icon">
<span>Hydr'Hacked</span>
<img src="/images/logo_svg.svg" alt="Logo" class="brand-icon">
<span>Agora</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>
+15
View File
@@ -8,6 +8,21 @@
<p>Les derniers ajouts disponibles sur la source</p>
</div>
<div class="filter-pills" style="margin-bottom: 2rem;">
<label class="pill">
<input type="radio" name="recent-type" value="all" checked>
<span>Tout</span>
</label>
<label class="pill">
<input type="radio" name="recent-type" value="film">
<span>Films</span>
</label>
<label class="pill">
<input type="radio" name="recent-type" value="serie">
<span>Séries</span>
</label>
</div>
<div id="recent-grid" class="media-grid">
<div class="loader-wrapper">
<div class="loader"></div>
+288 -6
View File
@@ -1,4 +1,5 @@
<%- include('partials/header') %>
<script src="/sortable.min.js"></script>
<%- include('partials/sidebar') %>
<main class="content-wrapper">
@@ -7,6 +8,25 @@
<h2>Paramètres</h2>
</div>
<% if (typeof currentUser !== 'undefined' && currentUser && currentUser.role === 'admin') { %>
<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; justify-content: space-between;">
<span style="display: flex; align-items: center; gap: 8px;"><i data-lucide="refresh-cw"></i> Système & Mises à jour</span>
<span style="font-size: 0.75rem; background: rgba(255,255,255,0.1); padding: 4px 8px; border-radius: 4px; font-family: monospace;">v<%= appVersion %></span>
</h3>
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
Vérifiez si une nouvelle version d'Agora est disponible et consultez les instructions de mise à jour.
</p>
<button id="check-update-btn" class="btn-action" style="padding: 10px 20px; display: flex; align-items: center; justify-content: center; gap: 8px;">
<i data-lucide="download-cloud" style="width: 16px; height: 16px;"></i> Vérifier les mises à jour
</button>
<div id="update-results-container" style="display: none; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--border);">
<!-- Injecté par JS -->
</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; display: flex; align-items: center; gap: 8px;">
<i data-lucide="database"></i> Sources de Recherche
@@ -26,14 +46,113 @@
<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>
<% if (typeof currentUser !== 'undefined' && currentUser && currentUser.role === 'admin') { %>
<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="server"></i> Hébergeurs Préférés
</h3>
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
Glissez et déposez les hébergeurs pour définir leur ordre de préférence. Les liens de téléchargement seront triés selon cet ordre.
</p>
<div id="hosters-sortable-container" style="display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem;">
<% if (typeof preferredHosters !== 'undefined' && preferredHosters.length > 0) { %>
<% preferredHosters.forEach(function(hoster) {
const h = hoster.toLowerCase();
let domain = h + '.com';
if (h === 'turbobit') domain = 'turbobit.net';
if (h === 'rapidgator') domain = 'rapidgator.net';
if (h === 'mega') domain = 'mega.nz';
if (h === 'gofile') domain = 'gofile.io';
if (h === 'nitroflare') domain = 'nitroflare.com';
%>
<div class="sortable-item" data-hoster="<%= hoster %>" style="display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; cursor: grab;">
<div style="display: flex; align-items: center; gap: 12px;">
<i data-lucide="grip-vertical" style="color: var(--text-sec); width: 18px; height: 18px;"></i>
<img src="https://www.google.com/s2/favicons?domain=<%= domain %>&sz=32" alt="logo" style="width: 20px; height: 20px; border-radius: 4px;" onerror="this.style.display='none'; this.nextElementSibling.style.display='inline-block';">
<i data-lucide="server" style="color: var(--text-sec); width: 18px; height: 18px; display: none;"></i>
<span style="font-weight: 500; text-transform: capitalize;"><%= hoster %></span>
</div>
</div>
<% }); %>
<% } %>
</div>
<div style="display: flex; gap: 10px;">
<button id="save-hosters-btn" class="btn-action" style="padding: 10px 20px; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1;">
<i data-lucide="save" style="width: 16px; height: 16px;"></i> Enregistrer l'ordre
</button>
</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; display: flex; align-items: center; gap: 8px;">
<i data-lucide="plug"></i> Configuration des Plugins
</h3>
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1rem;">
Modifiez les adresses et clés d'accès des plugins. Les modifications seront appliquées immédiatement sans redémarrage.
</p>
<form id="plugins-config-form">
<% if (typeof pluginsToConfigure !== 'undefined' && pluginsToConfigure.length > 0) { %>
<% pluginsToConfigure.forEach(function(plugin) { %>
<div style="background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 1rem;">
<strong style="display: flex; align-items: center; gap: 6px; margin-bottom: 0.8rem; color: var(--text-main); font-size: 0.95rem; text-transform: capitalize;">
<i data-lucide="box" style="width: 14px; height: 14px; color: var(--text-sec);"></i>
<%= plugin.name %>
</strong>
<%
const urlField = plugin.fields.find(f => f.key.endsWith('_URL'));
const urlEmpty = urlField && !urlField.default;
%>
<% if (plugin.name.includes('TMDB')) { %>
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 12px; margin-top: -8px;">
<i data-lucide="info" style="width: 14px; height: 14px; vertical-align: middle;"></i>
Pour obtenir une clé d'API, créez un compte gratuit sur <a href="https://www.themoviedb.org/settings/api" target="_blank" style="color: var(--primary);">themoviedb.org</a>, générez une clé (API v3 Auth) et collez-la ci-dessous.
</p>
<% plugin.fields.forEach(function(field) { %>
<div style="margin-bottom: 0.8rem;">
<label for="config_<%= field.key %>" style="font-size: 0.8rem; color: var(--text-sec); margin-bottom: 4px; display: block;"><%= field.label %></label>
<% if (field.key.endsWith('_ENABLED') || field.key === 'JD_FORCED_START') { %>
<select id="config_<%= field.key %>" name="<%= field.key %>" style="width: 100%; padding: 10px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 6px; color: var(--text-main); font-size: 0.9rem;">
<option value="true" <%= field.default === 'true' ? 'selected' : '' %>>Activé</option>
<option value="false" <%= field.default === 'false' ? 'selected' : '' %>>Désactivé</option>
</select>
<% } else { %>
<input type="text" id="config_<%= field.key %>" name="<%= field.key %>"
placeholder="<%= field.placeholder %>" value="<%= field.default || '' %>"
style="width: 100%; padding: 10px; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 6px; color: var(--text-main); font-size: 0.9rem;">
<% } %>
</div>
<% }); %>
<% } else { %>
<% plugin.fields.forEach(function(field) { %>
<div style="margin-bottom: 0.8rem;">
<label for="config_<%= field.key %>" style="font-size: 0.8rem; color: var(--text-sec); margin-bottom: 4px; display: block;"><%= field.label %></label>
<input type="text" id="config_<%= field.key %>" name="<%= field.key %>"
placeholder="<%= field.placeholder %>" value="<%= field.default || '' %>"
data-is-url="<%= field.key.endsWith('_URL') ? 'true' : 'false' %>"
data-plugin="<%= plugin.name %>"
style="padding: 8px; font-size: 0.9rem; width: 100%; border: 1px solid var(--border); background: var(--bg-main); color: var(--text-main); border-radius: 6px;">
</div>
<% }); %>
<% } %>
</div>
<% }); %>
<div style="display: flex; gap: 10px;">
<button type="submit" class="btn-action" style="padding: 10px 20px; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1;">
<i data-lucide="save" style="width: 16px; height: 16px;"></i> Enregistrer & Recharger
</button>
</div>
<% } else { %>
<p style="font-size: 0.85rem; color: var(--text-sec);">Aucun plugin détecté.</p>
<% } %>
</form>
</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>
@@ -118,10 +237,173 @@
<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
Agora v<%= appVersion %>
</p>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
// --- Plugins Config Form ---
const form = document.getElementById('plugins-config-form');
if (form) {
form.addEventListener('submit', async (e) => {
e.preventDefault();
const btn = form.querySelector('button[type="submit"]');
const origHtml = btn.innerHTML;
btn.innerHTML = '<i data-lucide="loader-2" class="spin" style="width: 16px; height: 16px;"></i> Enregistrement...';
btn.disabled = true;
if (window.lucide) lucide.createIcons();
const fd = new FormData(form);
const config = Object.fromEntries(fd.entries());
try {
const res = await fetch('/api/admin/plugins/save', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ config })
});
const data = await res.json();
if (data.success) {
window.showModal(
'Succès',
`<div style="padding: 1rem; text-align: center; color: var(--text-main);">
<i data-lucide="check-circle" style="color: #10b981; width: 48px; height: 48px; margin-bottom: 1rem;"></i>
<p>Configuration enregistrée avec succès.</p>
<p style="font-size: 0.9rem; color: var(--text-sec); margin-top: 0.5rem;">Plugins actifs : ${data.activeSources.join(', ')}</p>
</div>`
);
if (window.lucide) lucide.createIcons();
setTimeout(() => window.location.reload(), 2000);
} else {
window.showModal('Erreur', `<div style="padding: 1rem; text-align: center; color: #ef4444;"><p>${data.error}</p></div>`);
}
} catch (err) {
window.showModal('Erreur', `<div style="padding: 1rem; text-align: center; color: #ef4444;"><p>Erreur lors de la sauvegarde.</p></div>`);
console.error(err);
} finally {
btn.innerHTML = origHtml;
btn.disabled = false;
if (window.lucide) lucide.createIcons();
}
});
}
// --- Hosters Sorting ---
const hostersContainer = document.getElementById('hosters-sortable-container');
if (hostersContainer) {
Sortable.create(hostersContainer, {
animation: 150,
handle: '.sortable-item', // Permet de draguer sur tout l'item
ghostClass: 'dragging-hoster', // Classe appliquée pendant le drag
});
document.getElementById('save-hosters-btn')?.addEventListener('click', async (e) => {
const btn = e.currentTarget;
const origHtml = btn.innerHTML;
btn.innerHTML = '<i data-lucide="loader-2" class="spin" style="width: 16px; height: 16px;"></i> Enregistrement...';
btn.disabled = true;
if (window.lucide) lucide.createIcons();
const order = Array.from(hostersContainer.querySelectorAll('.sortable-item')).map(el => el.dataset.hoster);
try {
const res = await fetch('/api/admin/hosters/save', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ preferredHosters: order })
});
const data = await res.json();
if (data.success) {
window.showModal(
'Succès',
`<div style="padding: 1rem; text-align: center; color: var(--text-main);">
<i data-lucide="check-circle" style="color: #10b981; width: 48px; height: 48px; margin-bottom: 1rem;"></i>
<p>Ordre des hébergeurs enregistré avec succès !</p>
</div>`
);
if (window.lucide) lucide.createIcons();
} else {
window.showModal('Erreur', `<div style="padding: 1rem; text-align: center; color: #ef4444;"><p>${data.error}</p></div>`);
}
} catch (err) {
window.showModal('Erreur', `<div style="padding: 1rem; text-align: center; color: #ef4444;"><p>Erreur réseau lors de la sauvegarde.</p></div>`);
} finally {
btn.innerHTML = origHtml;
btn.disabled = false;
if (window.lucide) lucide.createIcons();
}
});
}
// --- Updates Checking ---
const checkUpdateBtn = document.getElementById('check-update-btn');
if (checkUpdateBtn) {
checkUpdateBtn.addEventListener('click', async () => {
const btn = checkUpdateBtn;
const origHtml = btn.innerHTML;
btn.innerHTML = '<i data-lucide="loader-2" class="spin" style="width: 16px; height: 16px;"></i> Vérification...';
btn.disabled = true;
if (window.lucide) lucide.createIcons();
const container = document.getElementById('update-results-container');
container.style.display = 'none';
container.innerHTML = '';
try {
const res = await fetch('/api/admin/check-update');
const data = await res.json();
if (data.success) {
container.style.display = 'block';
const isNew = data.currentVersion !== data.latestVersion;
let html = '';
if (isNew) {
html += `<div style="background: rgba(16, 185, 129, 0.1); border: 1px solid #10b981; padding: 12px; border-radius: 6px; margin-bottom: 1rem; color: #10b981; font-weight: 600; display: flex; align-items: center; gap: 8px;">
<i data-lucide="party-popper" style="width: 20px; height: 20px;"></i> Nouvelle version disponible : ${data.latestVersion} !
</div>`;
} else {
html += `<div style="background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); padding: 12px; border-radius: 6px; margin-bottom: 1rem; color: var(--text-main); font-weight: 500; display: flex; align-items: center; gap: 8px;">
<i data-lucide="check-circle" style="color: #10b981; width: 20px; height: 20px;"></i> Votre système est à jour (v${data.currentVersion}).
</div>`;
}
if (data.notes && data.notes.length > 0) {
html += `<h4 style="margin-bottom: 8px; font-size: 0.9rem;">Nouveautés :</h4><ul style="margin: 0 0 1rem 0; padding-left: 20px; color: var(--text-sec); font-size: 0.85rem; line-height: 1.5;">`;
data.notes.forEach(n => html += `<li>${n}</li>`);
html += `</ul>`;
}
html += `<h4 style="margin-bottom: 8px; font-size: 0.9rem;">Comment mettre à jour :</h4>
<div style="display: flex; flex-direction: column; gap: 10px;">
<div style="background: var(--bg-main); padding: 12px; border-radius: 6px; border: 1px solid var(--border);">
<strong style="display: block; font-size: 0.8rem; color: var(--primary); margin-bottom: 4px;">Via Docker</strong>
<code style="font-size: 0.85rem; color: var(--text-main); user-select: all; cursor: text;">${data.updateInfo.dockerCmd}</code>
</div>
<div style="background: var(--bg-main); padding: 12px; border-radius: 6px; border: 1px solid var(--border);">
<strong style="display: block; font-size: 0.8rem; color: var(--primary); margin-bottom: 4px;">Installation Manuelle (.zip)</strong>
<a href="${data.updateInfo.zipUrl}" target="_blank" style="font-size: 0.85rem; color: var(--text-main); text-decoration: underline;">Télécharger l'archive depuis le site</a>
${data.updateInfo.zipSha256 ? `<div style="margin-top: 8px; font-size: 0.8rem; color: var(--text-muted);">Somme de contrôle (SHA-256) :<br><code style="font-size: 0.75rem; user-select: all; background: rgba(0,0,0,0.2); padding: 2px 4px; border-radius: 4px; word-break: break-all;">${data.updateInfo.zipSha256}</code></div>` : ''}
</div>
</div>`;
container.innerHTML = html;
} else {
window.showModal('Erreur', `<div style="padding: 1rem; text-align: center; color: #ef4444;"><p>${data.error}</p></div>`);
}
} catch (err) {
window.showModal('Erreur', `<div style="padding: 1rem; text-align: center; color: #ef4444;"><p>Erreur réseau lors de la vérification.</p></div>`);
} finally {
btn.innerHTML = origHtml;
btn.disabled = false;
if (window.lucide) lucide.createIcons();
}
});
}
});
</script>
</section>
</main>
+41 -8
View File
@@ -3,14 +3,14 @@
<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>
<title>Agora — 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">
<meta name="apple-mobile-web-app-title" content="Agora">
<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">
@@ -22,10 +22,11 @@
min-height: 100vh;
width: 100%;
display: flex;
align-items: center;
align-items: flex-start;
justify-content: center;
padding: 2rem;
padding: 2rem 1rem;
background: var(--bg-main);
overflow-y: auto;
}
.setup-box {
background: var(--bg-card);
@@ -33,8 +34,9 @@
border-radius: 16px;
padding: 2.5rem;
width: 100%;
max-width: 420px;
max-width: 480px;
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
margin: auto;
}
.setup-logo {
text-align: center;
@@ -127,13 +129,14 @@
font-weight: 500;
}
</style>
<link rel="icon" type="image/svg+xml" href="/logo_svg.svg">
</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>
<img src="/images/logo_svg.svg" alt="Logo">
<h1>Agora</h1>
<p>Configuration initiale</p>
</div>
@@ -190,11 +193,41 @@
</button>
</div>
</div>
<% if (typeof pluginsToConfigure !== 'undefined' && pluginsToConfigure.length > 0) { %>
<div style="margin: 2rem 0; border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: left;">
<h3 style="margin-bottom: 1rem; color: var(--text-main); font-size: 1.1rem; display: flex; align-items: center; gap: 8px;">
<i data-lucide="plug" style="width: 18px; height: 18px; color: var(--primary);"></i>
Configuration des Plugins (Optionnel)
</h3>
<p style="font-size: 0.85rem; color: var(--text-sec); margin-bottom: 1.5rem; line-height: 1.4;">
Des sources ont été détectées. Vous pouvez les configurer maintenant ou plus tard dans les paramètres.
</p>
<% pluginsToConfigure.forEach(function(plugin) { %>
<div style="background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 1rem;">
<strong style="display: flex; align-items: center; gap: 6px; margin-bottom: 0.8rem; color: var(--text-main); font-size: 0.95rem; text-transform: capitalize;">
<i data-lucide="box" style="width: 14px; height: 14px; color: var(--text-sec);"></i>
<%= plugin.name %>
</strong>
<% plugin.fields.forEach(function(field) { %>
<div style="margin-bottom: 0.8rem;">
<label for="config_<%= field.key %>" style="font-size: 0.8rem; color: var(--text-sec); margin-bottom: 4px; display: block;"><%= field.label %></label>
<input type="text" id="config_<%= field.key %>" name="config[<%= field.key %>]"
placeholder="<%= field.placeholder %>" value="<%= field.default || '' %>"
style="padding: 8px; font-size: 0.9rem; width: 100%; border: 1px solid var(--border); background: var(--bg-main); color: var(--text-main); border-radius: 6px;">
</div>
<% }); %>
</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
Agora v<%= appVersion %>
</p>
</div>
</form>