reindentation et rangement du code
This commit is contained in:
parent
67780d5b7c
commit
1dd75eb2ba
@ -128,17 +128,18 @@ autopostRouter.get('/', async (req, res) => {
|
||||
);
|
||||
|
||||
let html = `
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Suivi Autopost ${config.name}</title>
|
||||
<script src="/js/index.global.js"></script>
|
||||
<script src="/jquery/jquery.min.js"></script>
|
||||
<script src="js/index.global.js"></script>
|
||||
<script src="jquery/jquery.min.js"></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body class="bg-slate-900 text-white font-sans p-4">
|
||||
<body class="bg-sky-950 text-white font-sans p-4">
|
||||
<div class="w-full px-4">
|
||||
<!-- Header -->
|
||||
<div class="mb-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<h1 class="text-2xl md:text-3xl font-extrabold tracking-tight bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-cyan-300">
|
||||
@ -270,8 +271,7 @@ autopostRouter.get('/', async (req, res) => {
|
||||
<th class="px-4 py-2">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-700">
|
||||
`;
|
||||
<tbody class="divide-y divide-gray-700">`;
|
||||
|
||||
rows.forEach(row => {
|
||||
let statusText = '';
|
||||
@ -301,13 +301,13 @@ autopostRouter.get('/', async (req, res) => {
|
||||
statusText = 'INCONNU';
|
||||
}
|
||||
let logLink = (parseInt(row.status) === 1 || parseInt(row.status) === 2)
|
||||
? ' | <a href="#" class="log-link text-blue-400 hover:underline" data-filename="'+row.nom+'">Log</a>'
|
||||
? ' | <a href="#" class="log-link text-blue-400 hover:underline" data-filename="' + row.nom + '">Log</a>'
|
||||
: '';
|
||||
let mediainfoLink = (parseInt(row.status) === 0 || parseInt(row.status) === 1 || parseInt(row.status) === 2)
|
||||
? ' | <a href="#" class="mediainfo-link text-blue-400 hover:underline" data-filename="'+row.nom+'">MediaInfo/BDInfo</a>'
|
||||
? ' | <a href="#" class="mediainfo-link text-blue-400 hover:underline" data-filename="' + row.nom + '">MediaInfo/BDInfo</a>'
|
||||
: '';
|
||||
let dlLink = row.status === 1
|
||||
? ` | <a href="/autopost/dl?name=${encodeURIComponent(row.nom)}" class="dl-link text-blue-400 hover:underline">DL</a>`
|
||||
? ' | <a href="/autopost/dl?name=' + encodeURIComponent(row.nom) + '" class="dl-link text-blue-400 hover:underline">DL</a>'
|
||||
: '';
|
||||
|
||||
html += `
|
||||
@ -326,6 +326,7 @@ autopostRouter.get('/', async (req, res) => {
|
||||
`;
|
||||
});
|
||||
|
||||
|
||||
html += `
|
||||
</tbody>
|
||||
</table>
|
||||
@ -335,7 +336,6 @@ autopostRouter.get('/', async (req, res) => {
|
||||
<!-- Modale d'édition -->
|
||||
<div id="editModal" class="hidden fixed inset-0 bg-black bg-opacity-60 backdrop-blur-sm flex items-center justify-center z-50">
|
||||
<div class="bg-gray-900 p-6 rounded-2xl shadow-2xl w-full max-w-md transform transition-all scale-95">
|
||||
|
||||
<!-- Bouton fermer -->
|
||||
<button type="button" class="absolute top-4 right-4 text-gray-400 hover:text-white text-2xl font-bold close">
|
||||
×
|
||||
@ -348,7 +348,6 @@ autopostRouter.get('/', async (req, res) => {
|
||||
|
||||
<!-- Formulaire -->
|
||||
<form id="editForm">
|
||||
|
||||
<!-- Label + Select -->
|
||||
<label for="statusSelect" class="block mb-2 text-gray-300 font-medium">Status :</label>
|
||||
<select id="statusSelect" name="status"
|
||||
@ -371,11 +370,9 @@ autopostRouter.get('/', async (req, res) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modale pour afficher le log -->
|
||||
<div id="logModal" class="hidden fixed inset-0 bg-black bg-opacity-60 backdrop-blur-sm flex items-center justify-center z-50">
|
||||
<div class="bg-gray-900 p-6 rounded-2xl shadow-2xl w-full max-w-7xl relative"> <!-- élargi max-w -->
|
||||
|
||||
<!-- Bouton fermer -->
|
||||
<button type="button" class="absolute top-4 right-4 text-gray-400 hover:text-white text-2xl font-bold close log-close">
|
||||
×
|
||||
@ -390,14 +387,12 @@ autopostRouter.get('/', async (req, res) => {
|
||||
<pre id="logContent"
|
||||
class="max-h-[90vh] overflow-y-auto p-6 rounded-lg bg-gray-800 text-green-400 font-mono text-sm leading-relaxed border border-gray-700 shadow-inner whitespace-pre-wrap">
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modale pour afficher le mediainfo -->
|
||||
<div id="mediainfoModal" class="hidden fixed inset-0 bg-black bg-opacity-60 backdrop-blur-sm flex items-center justify-center z-50">
|
||||
<div class="bg-gray-900 p-6 rounded-2xl shadow-2xl w-full max-w-6xl relative">
|
||||
|
||||
<!-- Bouton fermer -->
|
||||
<button type="button"
|
||||
class="absolute top-4 right-4 text-gray-400 hover:text-white text-2xl font-bold close mediainfo-close"
|
||||
@ -420,7 +415,6 @@ autopostRouter.get('/', async (req, res) => {
|
||||
<pre id="mediainfoContent"
|
||||
class="max-h-[80vh] overflow-y-auto p-4 rounded-lg bg-gray-800 text-yellow-300 font-mono text-sm leading-relaxed border border-gray-700 shadow-inner whitespace-pre-wrap">
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -451,7 +445,6 @@ autopostRouter.get('/', async (req, res) => {
|
||||
<div id="toast" class="hidden fixed bottom-6 left-1/2 -translate-x-1/2 px-4 py-2 rounded-lg bg-gray-900/95 text-white shadow-lg z-[60]">
|
||||
<span id="toastMsg">Supprimé.</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// --- State ---
|
||||
const INITIAL_PAGE = ${page};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user