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 = `
|
let html = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Suivi Autopost ${config.name}</title>
|
<title>Suivi Autopost ${config.name}</title>
|
||||||
<script src="/js/index.global.js"></script>
|
<script src="js/index.global.js"></script>
|
||||||
<script src="/jquery/jquery.min.js"></script>
|
<script src="jquery/jquery.min.js"></script>
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet">
|
||||||
</head>
|
</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">
|
<div class="w-full px-4">
|
||||||
|
<!-- Header -->
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<div class="flex items-center justify-between">
|
<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">
|
<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>
|
<th class="px-4 py-2">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-700">
|
<tbody class="divide-y divide-gray-700">`;
|
||||||
`;
|
|
||||||
|
|
||||||
rows.forEach(row => {
|
rows.forEach(row => {
|
||||||
let statusText = '';
|
let statusText = '';
|
||||||
@ -301,13 +301,13 @@ autopostRouter.get('/', async (req, res) => {
|
|||||||
statusText = 'INCONNU';
|
statusText = 'INCONNU';
|
||||||
}
|
}
|
||||||
let logLink = (parseInt(row.status) === 1 || parseInt(row.status) === 2)
|
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)
|
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
|
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 += `
|
html += `
|
||||||
@ -326,6 +326,7 @@ autopostRouter.get('/', async (req, res) => {
|
|||||||
`;
|
`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
html += `
|
html += `
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -335,7 +336,6 @@ autopostRouter.get('/', async (req, res) => {
|
|||||||
<!-- Modale d'édition -->
|
<!-- 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 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">
|
<div class="bg-gray-900 p-6 rounded-2xl shadow-2xl w-full max-w-md transform transition-all scale-95">
|
||||||
|
|
||||||
<!-- Bouton fermer -->
|
<!-- Bouton fermer -->
|
||||||
<button type="button" class="absolute top-4 right-4 text-gray-400 hover:text-white text-2xl font-bold close">
|
<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 -->
|
<!-- Formulaire -->
|
||||||
<form id="editForm">
|
<form id="editForm">
|
||||||
|
|
||||||
<!-- Label + Select -->
|
<!-- Label + Select -->
|
||||||
<label for="statusSelect" class="block mb-2 text-gray-300 font-medium">Status :</label>
|
<label for="statusSelect" class="block mb-2 text-gray-300 font-medium">Status :</label>
|
||||||
<select id="statusSelect" name="status"
|
<select id="statusSelect" name="status"
|
||||||
@ -371,11 +370,9 @@ autopostRouter.get('/', async (req, res) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Modale pour afficher le log -->
|
<!-- 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 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 -->
|
<div class="bg-gray-900 p-6 rounded-2xl shadow-2xl w-full max-w-7xl relative"> <!-- élargi max-w -->
|
||||||
|
|
||||||
<!-- Bouton fermer -->
|
<!-- Bouton fermer -->
|
||||||
<button type="button" class="absolute top-4 right-4 text-gray-400 hover:text-white text-2xl font-bold close log-close">
|
<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"
|
<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">
|
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>
|
</pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modale pour afficher le mediainfo -->
|
<!-- 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 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">
|
<div class="bg-gray-900 p-6 rounded-2xl shadow-2xl w-full max-w-6xl relative">
|
||||||
|
|
||||||
<!-- Bouton fermer -->
|
<!-- Bouton fermer -->
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="absolute top-4 right-4 text-gray-400 hover:text-white text-2xl font-bold close mediainfo-close"
|
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"
|
<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">
|
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>
|
</pre>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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]">
|
<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>
|
<span id="toastMsg">Supprimé.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// --- State ---
|
// --- State ---
|
||||||
const INITIAL_PAGE = ${page};
|
const INITIAL_PAGE = ${page};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user