Delete a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai
Browse files- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/README.md +0 -5
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/app.py +0 -1
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/editor.html +0 -435
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/html_launcher.html +0 -221
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/index.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/mot_de_passe_oublie.html +0 -201
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/politique_confidentialite.html +0 -370
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/upload_file.html +0 -463
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
| 1 |
-
# Dépôt fredo
|
| 2 |
-
|
| 3 |
-
Bienvenue sur votre dépôt GitForge, hébergé sur Mailix.
|
| 4 |
-
|
| 5 |
-
Commencez par ajouter ou créer des fichiers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/app.py
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
b
|
|
|
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/editor.html
DELETED
|
@@ -1,435 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="fr">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>GitForge | mindus0/mailix - Modifier a_propos.html</title>
|
| 7 |
-
<link rel="icon" type="image/png" href="https://i.imgur.com/7Gn3toV.png">
|
| 8 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
-
<link rel="stylesheet"
|
| 10 |
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
-
|
| 12 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css">
|
| 13 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/theme/monokai.min.css">
|
| 14 |
-
|
| 15 |
-
<style>
|
| 16 |
-
/* Configuration de la police Inter */
|
| 17 |
-
body { font-family: 'Inter', sans-serif; }
|
| 18 |
-
|
| 19 |
-
/* Variables de Thème (Mode Clair forcé pour le style GitHub) */
|
| 20 |
-
:root {
|
| 21 |
-
--bg-page: #FFFFFF;
|
| 22 |
-
--bg-header: #F6F8FA;
|
| 23 |
-
--bg-card: #FFFFFF;
|
| 24 |
-
--bg-active: #F3F4F6;
|
| 25 |
-
--border-color: #D0D7DE;
|
| 26 |
-
--text-color: #24292F;
|
| 27 |
-
--text-secondary: #57606A;
|
| 28 |
-
--text-link: #0969DA;
|
| 29 |
-
--primary-color: #2DA44E; /* Bouton Commit (Vert) */
|
| 30 |
-
--primary-hover: #2C974B;
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
/* Classes utilitaires pour les variables */
|
| 34 |
-
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 35 |
-
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 36 |
-
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 37 |
-
.text-link-var { color: var(--text-link); } .hover\:text-link-hover-var:hover { color: var(--text-link); }
|
| 38 |
-
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 39 |
-
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 40 |
-
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 41 |
-
|
| 42 |
-
/* Style spécifique pour la barre de navigation */
|
| 43 |
-
.repo-nav-link { padding: 0.5rem 1rem; border-bottom: 2px solid transparent; margin-right: 0.5rem; }
|
| 44 |
-
.repo-nav-link.active { border-bottom-color: var(--text-link); color: var(--text-color) !important; font-weight: 600; }
|
| 45 |
-
|
| 46 |
-
/* Ajustements CodeMirror pour qu'il remplisse l'espace */
|
| 47 |
-
.CodeMirror {
|
| 48 |
-
border-top: 1px solid var(--border-color);
|
| 49 |
-
border-bottom: 1px solid var(--border-color);
|
| 50 |
-
height: 500px; /* Hauteur fixe pour l'édition */
|
| 51 |
-
font-size: 14px;
|
| 52 |
-
line-height: 1.5;
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
/* Styles pour la barre latérale de fichiers */
|
| 56 |
-
.sidebar {
|
| 57 |
-
width: 250px; /* Largeur fixe comme dans GitHub */
|
| 58 |
-
min-height: calc(100vh - 64px); /* Hauteur de l'écran moins la barre de navigation principale */
|
| 59 |
-
border-right: 1px solid var(--border-color);
|
| 60 |
-
background-color: var(--bg-card); /* Fond blanc pour la barre latérale */
|
| 61 |
-
position: sticky;
|
| 62 |
-
top: 0; /* Pour qu'elle reste fixe */
|
| 63 |
-
padding-top: 0;
|
| 64 |
-
overflow-y: auto; /* Scroll si trop de fichiers */
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
.file-item {
|
| 68 |
-
padding: 8px 15px;
|
| 69 |
-
cursor: pointer;
|
| 70 |
-
display: flex;
|
| 71 |
-
align-items: center;
|
| 72 |
-
font-size: 14px;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
.file-item.active {
|
| 76 |
-
background-color: var(--bg-active);
|
| 77 |
-
font-weight: 600;
|
| 78 |
-
border-left: 3px solid var(--text-link);
|
| 79 |
-
color: var(--text-color);
|
| 80 |
-
}
|
| 81 |
-
|
| 82 |
-
/* Ajustement de la hauteur CodeMirror et de la barre latérale pour la barre d'onglets au-dessus */
|
| 83 |
-
.main-content-area {
|
| 84 |
-
display: flex;
|
| 85 |
-
min-height: calc(100vh - 120px); /* Ajuster la hauteur restante */
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
.editor-view {
|
| 89 |
-
flex-grow: 1;
|
| 90 |
-
padding: 2rem;
|
| 91 |
-
}
|
| 92 |
-
|
| 93 |
-
</style>
|
| 94 |
-
</head>
|
| 95 |
-
|
| 96 |
-
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 97 |
-
|
| 98 |
-
<header class="w-full bg-header-var border-b border-color-var sticky top-0 z-50">
|
| 99 |
-
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 100 |
-
<div class="flex justify-between items-center h-16">
|
| 101 |
-
<div class="flex items-center space-x-4">
|
| 102 |
-
<img src="https://i.imgur.com/7Gn3toV.png" alt="GitForge Logo" class="h-6">
|
| 103 |
-
<span class="text-xl font-bold text-color-var">GitForge</span>
|
| 104 |
-
<span class="text-secondary-var">/</span>
|
| 105 |
-
<a href="/mindus/nexus/repo_files" class="text-color-var hover:text-link-var text-lg font-semibold">
|
| 106 |
-
<span id="repo-user">mindus0</span> / <span id="repo-name">mailix</span>
|
| 107 |
-
</a>
|
| 108 |
-
</div>
|
| 109 |
-
|
| 110 |
-
<div class="flex items-center space-x-3">
|
| 111 |
-
<div class="hidden sm:block">
|
| 112 |
-
<input type="text" placeholder="Type / to search"
|
| 113 |
-
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 114 |
-
</div>
|
| 115 |
-
<button class="p-2 rounded-lg text-secondary-var hover:text-color-var">
|
| 116 |
-
<span class="material-symbols-rounded">notifications</span>
|
| 117 |
-
</button>
|
| 118 |
-
<button class="p-2 rounded-lg text-secondary-var hover:text-color-var">
|
| 119 |
-
<span class="material-symbols-rounded">add</span>
|
| 120 |
-
</button>
|
| 121 |
-
<button class="p-2 rounded-full text-secondary-var hover:text-color-var">
|
| 122 |
-
<span class="material-symbols-rounded">account_circle</span>
|
| 123 |
-
</button>
|
| 124 |
-
</div>
|
| 125 |
-
</div>
|
| 126 |
-
</div>
|
| 127 |
-
|
| 128 |
-
<div class="w-full border-b border-color-var bg-page-var">
|
| 129 |
-
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 130 |
-
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 131 |
-
<a href="repo_files.html" class="repo-nav-link text-secondary-var hover:text-color-var active flex items-center">
|
| 132 |
-
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 133 |
-
</a>
|
| 134 |
-
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var flex items-center">
|
| 135 |
-
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues (0)
|
| 136 |
-
</a>
|
| 137 |
-
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var flex items-center">
|
| 138 |
-
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests (0)
|
| 139 |
-
</a>
|
| 140 |
-
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var flex items-center">
|
| 141 |
-
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 142 |
-
</a>
|
| 143 |
-
</nav>
|
| 144 |
-
</div>
|
| 145 |
-
</div>
|
| 146 |
-
</header>
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
<div class="max-w-7xl mx-auto">
|
| 150 |
-
<div class="flex main-content-area">
|
| 151 |
-
|
| 152 |
-
<aside class="sidebar bg-page-var">
|
| 153 |
-
<div class="p-4 border-b border-color-var flex items-center justify-between sticky top-0 bg-page-var">
|
| 154 |
-
<span class="text-sm font-semibold text-color-var">Files</span>
|
| 155 |
-
<button class="text-secondary-var hover:text-link-var">
|
| 156 |
-
<span class="material-symbols-rounded text-lg">add</span>
|
| 157 |
-
</button>
|
| 158 |
-
</div>
|
| 159 |
-
|
| 160 |
-
<div class="p-2 border-b border-color-var">
|
| 161 |
-
<input type="text" placeholder="Go to file..."
|
| 162 |
-
class="w-full p-1.5 text-sm border border-color-var rounded-lg focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var bg-page-var text-color-var">
|
| 163 |
-
</div>
|
| 164 |
-
|
| 165 |
-
<nav id="file-list">
|
| 166 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 167 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> LICENSE
|
| 168 |
-
</div>
|
| 169 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 170 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> README.md
|
| 171 |
-
</div>
|
| 172 |
-
<div class="file-item active text-color-var">
|
| 173 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> a_propos.html
|
| 174 |
-
</div>
|
| 175 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 176 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> checkout.html
|
| 177 |
-
</div>
|
| 178 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 179 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> conditions_utilisation.html
|
| 180 |
-
</div>
|
| 181 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 182 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> connexion.html
|
| 183 |
-
</div>
|
| 184 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 185 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> create_project.html
|
| 186 |
-
</div>
|
| 187 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 188 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> dashboard.html
|
| 189 |
-
</div>
|
| 190 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 191 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> documentation.html
|
| 192 |
-
</div>
|
| 193 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 194 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> html_launcher.html
|
| 195 |
-
</div>
|
| 196 |
-
<div class="file-item text-secondary-var hover:bg-active-var border-l-2 border-transparent">
|
| 197 |
-
<span class="material-symbols-rounded text-lg mr-2">draft</span> index.html
|
| 198 |
-
</div>
|
| 199 |
-
</nav>
|
| 200 |
-
</aside>
|
| 201 |
-
|
| 202 |
-
<div id="editor-view" class="editor-view flex-grow">
|
| 203 |
-
|
| 204 |
-
<div class="flex items-center space-x-2 mb-6 text-sm font-semibold">
|
| 205 |
-
<span class="text-color-var">
|
| 206 |
-
<span class="material-symbols-rounded text-lg align-bottom mr-1">folder</span>
|
| 207 |
-
<a href="/mindus/nexus/repo_files" class="text-link-var hover:text-link-hover-var">mailix</a> /
|
| 208 |
-
<span id="current-file-path" class="font-bold">/mindus/nexus/a_propos</span>
|
| 209 |
-
</span>
|
| 210 |
-
|
| 211 |
-
<span class="inline-flex items-center px-3 py-1 bg-active-var text-color-var rounded-lg ml-3">
|
| 212 |
-
<span class="material-symbols-rounded text-sm mr-1">git_branch</span>
|
| 213 |
-
main
|
| 214 |
-
</span>
|
| 215 |
-
|
| 216 |
-
<div class="ml-auto flex space-x-3">
|
| 217 |
-
<button id="cancel-changes" type="button" class="px-3 py-1.5 text-secondary-var hover:text-color-var hover:bg-active-var border border-transparent rounded-lg transition duration-150">
|
| 218 |
-
Cancel
|
| 219 |
-
</button>
|
| 220 |
-
<button type="submit" id="propose-changes-btn" class="px-4 py-1.5 bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 shadow-md disabled:opacity-50" disabled>
|
| 221 |
-
Propose changes
|
| 222 |
-
</button>
|
| 223 |
-
</div>
|
| 224 |
-
</div>
|
| 225 |
-
|
| 226 |
-
<div class="flex justify-between items-center border border-color-var border-b-0 rounded-t-lg bg-header-var px-4 py-2">
|
| 227 |
-
<div class="flex space-x-4">
|
| 228 |
-
<button class="flex items-center font-semibold text-color-var border-b-2 border-text-color pb-1">Edit</button>
|
| 229 |
-
<button class="flex items-center text-secondary-var hover:text-color-var hover:border-b-2 hover:border-text-secondary pb-1">Preview</button>
|
| 230 |
-
</div>
|
| 231 |
-
|
| 232 |
-
<div class="flex items-center space-x-4 text-sm text-secondary-var">
|
| 233 |
-
<span class="hidden sm:inline-block">mindus0 modified the file 16 hours ago</span>
|
| 234 |
-
<span class="hidden sm:inline-block">|</span>
|
| 235 |
-
|
| 236 |
-
<span id="space-option" class="inline-flex items-center space-x-1">
|
| 237 |
-
<span>Spaces</span>
|
| 238 |
-
<select id="indent-size" class="bg-active-var p-0.5 rounded text-color-var border-none focus:ring-link-var">
|
| 239 |
-
<option value="2">2</option>
|
| 240 |
-
<option value="4" selected>4</option>
|
| 241 |
-
<option value="8">8</option>
|
| 242 |
-
</select>
|
| 243 |
-
</span>
|
| 244 |
-
<span class="hidden sm:inline-block">|</span>
|
| 245 |
-
<button id="no-wrap-toggle" class="hover:text-color-var">No wrap</button>
|
| 246 |
-
</div>
|
| 247 |
-
</div>
|
| 248 |
-
|
| 249 |
-
<div id="editor-container">
|
| 250 |
-
<textarea id="code-editor" name="code">
|
| 251 |
-
<!DOCTYPE html>
|
| 252 |
-
<html lang="fr">
|
| 253 |
-
<head>
|
| 254 |
-
<meta charset="UTF-8">
|
| 255 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 256 |
-
<title>À Propos de Nexus</title>
|
| 257 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 258 |
-
<link rel="stylesheet"
|
| 259 |
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 260 |
-
|
| 261 |
-
<style>
|
| 262 |
-
body {
|
| 263 |
-
font-family: 'Inter', sans-serif;
|
| 264 |
-
}
|
| 265 |
-
|
| 266 |
-
/* Transition pour un effet doux lors du changement de thème */
|
| 267 |
-
transition: background-color 0.3s, color 0.3s;
|
| 268 |
-
</style>
|
| 269 |
-
</head>
|
| 270 |
-
<body>
|
| 271 |
-
<h1>Ceci est la page À Propos</h1>
|
| 272 |
-
<p>Simuler la modification de ce contenu.</p>
|
| 273 |
-
</body>
|
| 274 |
-
</html>
|
| 275 |
-
</textarea>
|
| 276 |
-
</div>
|
| 277 |
-
|
| 278 |
-
<form id="commit-form" class="bg-card-var p-6 rounded-lg border border-color-var shadow-lg mt-8">
|
| 279 |
-
<h2 class="text-lg font-semibold text-color-var mb-4">Commit changes</h2>
|
| 280 |
-
|
| 281 |
-
<input type="text" id="commit-title" placeholder="Update a_propos.html" value="Update a_propos.html"
|
| 282 |
-
class="w-full p-2 mb-3 border border-color-var rounded-lg focus:outline-none focus:ring-2 focus:ring-link-var bg-page-var text-color-var transition-colors-theme"
|
| 283 |
-
required>
|
| 284 |
-
|
| 285 |
-
<textarea id="commit-description" placeholder="Add an optional extended description..." rows="4"
|
| 286 |
-
class="w-full p-2 mb-6 border border-color-var rounded-lg focus:outline-none focus:ring-2 focus:ring-link-var bg-page-var text-color-var transition-colors-theme resize-none"></textarea>
|
| 287 |
-
|
| 288 |
-
<div class="space-y-3 mb-6">
|
| 289 |
-
<div class="flex items-start">
|
| 290 |
-
<input type="radio" id="commit-main" name="branch-option" value="main" checked
|
| 291 |
-
class="mt-1 mr-2 text-link-var focus:ring-link-var border-color-var">
|
| 292 |
-
<label for="commit-main" class="text-sm text-color-var">
|
| 293 |
-
<span class="material-symbols-rounded text-base mr-1 align-bottom">subdirectory_arrow_right</span>
|
| 294 |
-
Commit directly to the <span class="font-semibold">main</span> branch.
|
| 295 |
-
</label>
|
| 296 |
-
</div>
|
| 297 |
-
|
| 298 |
-
<div class="flex items-start">
|
| 299 |
-
<input type="radio" id="commit-new-branch" name="branch-option" value="new"
|
| 300 |
-
class="mt-1 mr-2 text-link-var focus:ring-link-var border-color-var">
|
| 301 |
-
<label for="commit-new-branch" class="text-sm text-color-var">
|
| 302 |
-
<span class="material-symbols-rounded text-base mr-1 align-bottom">call_split</span>
|
| 303 |
-
Create a new branch for this commit and start a pull request.
|
| 304 |
-
<a href="#" class="text-link-var hover:underline ml-1">Learn more about pull requests.</a>
|
| 305 |
-
</label>
|
| 306 |
-
</div>
|
| 307 |
-
</div>
|
| 308 |
-
|
| 309 |
-
<div class="flex items-center space-x-3">
|
| 310 |
-
<button type="submit" class="px-5 py-2 bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 shadow-md">
|
| 311 |
-
Propose changes
|
| 312 |
-
</button>
|
| 313 |
-
<a href="/mindus/nexus/repo_files" class="px-5 py-2 text-secondary-var hover:text-color-var hover:bg-active-var border border-transparent rounded-lg transition duration-150">
|
| 314 |
-
Cancel
|
| 315 |
-
</a>
|
| 316 |
-
</div>
|
| 317 |
-
</form>
|
| 318 |
-
|
| 319 |
-
</div>
|
| 320 |
-
|
| 321 |
-
</div>
|
| 322 |
-
</div>
|
| 323 |
-
|
| 324 |
-
<footer class="mt-12 py-8 border-t border-color-var text-center text-sm text-secondary-var max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 325 |
-
<p>Use <kbd class="px-1 py-0.5 border border-color-var rounded bg-active-var text-color-var text-xs">control</kbd> + <kbd class="px-1 py-0.5 border border-color-var rounded bg-active-var text-color-var text-xs">shift</kbd> + <kbd class="px-1 py-0.5 border border-color-var rounded bg-active-var text-color-var text-xs">m</kbd> to toggle the <kbd class="px-1 py-0.5 border border-color-var rounded bg-active-var text-color-var text-xs">tab</kbd> key moving focus. Alternatively, use <kbd class="px-1 py-0.5 border border-color-var rounded bg-active-var text-color-var text-xs">esc</kbd> then <kbd class="px-1 py-0.5 border border-color-var rounded bg-active-var text-color-var text-xs">tab</kbd> to move to the next interactive element on the page.</p>
|
| 326 |
-
<p class="mt-4">© 2025 GitForge, Inc. · <a href="#" class="hover:text-link-var">Terms</a> · <a href="#" class="hover:text-link-var">Privacy</a></p>
|
| 327 |
-
</footer>
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
|
| 331 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/xml/xml.min.js"></script>
|
| 332 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/javascript/javascript.min.js"></script>
|
| 333 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/css/css.min.js"></script>
|
| 334 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/htmlmixed/htmlmixed.min.js"></script>
|
| 335 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/python/python.min.js"></script>
|
| 336 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/php/php.min.js"></script>
|
| 337 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/clike/clike.min.js"></script>
|
| 338 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/sql/sql.min.js"></script>
|
| 339 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/markdown/markdown.min.js"></script>
|
| 340 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/shell/shell.min.js"></script>
|
| 341 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/typescript/typescript.min.js"></script>
|
| 342 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/go/go.min.js"></script>
|
| 343 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/yaml/yaml.min.js"></script>
|
| 344 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/rust/rust.min.js"></script>
|
| 345 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/stex/stex.min.js"></script>
|
| 346 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/meta.js"></script>
|
| 347 |
-
|
| 348 |
-
<script>
|
| 349 |
-
// Initialisation de CodeMirror
|
| 350 |
-
let editor = null;
|
| 351 |
-
// On commence avec 'htmlmixed' car le fichier actif simulé est 'a_propos.html'
|
| 352 |
-
let currentMode = 'htmlmixed';
|
| 353 |
-
const initialFilePath = 'a_propos.html';
|
| 354 |
-
|
| 355 |
-
const initCodeMirror = () => {
|
| 356 |
-
const textarea = document.getElementById('code-editor');
|
| 357 |
-
editor = CodeMirror.fromTextArea(textarea, {
|
| 358 |
-
lineNumbers: true,
|
| 359 |
-
mode: currentMode,
|
| 360 |
-
theme: 'monokai', // Thème Monokai pour l'éditeur
|
| 361 |
-
indentUnit: 4, // 4 espaces
|
| 362 |
-
tabSize: 4,
|
| 363 |
-
lineWrapping: true, // Par défaut, on active le retour à la ligne
|
| 364 |
-
foldGutter: true,
|
| 365 |
-
extraKeys: {
|
| 366 |
-
"Ctrl-Space": "autocomplete"
|
| 367 |
-
}
|
| 368 |
-
});
|
| 369 |
-
|
| 370 |
-
// Mettre à jour l'état du bouton "Propose changes" à chaque changement dans l'éditeur
|
| 371 |
-
editor.on('change', checkContent);
|
| 372 |
-
|
| 373 |
-
// Mettre le focus dans l'éditeur au chargement
|
| 374 |
-
editor.focus();
|
| 375 |
-
};
|
| 376 |
-
|
| 377 |
-
// Fonction de vérification (simplifiée pour l'édition)
|
| 378 |
-
const checkContent = () => {
|
| 379 |
-
const contentHasChanged = editor && editor.isClean() === false;
|
| 380 |
-
const proposeBtn = document.getElementById('propose-changes-btn');
|
| 381 |
-
|
| 382 |
-
// Active le bouton si le contenu a été modifié
|
| 383 |
-
proposeBtn.disabled = !contentHasChanged;
|
| 384 |
-
};
|
| 385 |
-
|
| 386 |
-
// Gestion de la taille d'indentation (Spaces)
|
| 387 |
-
const indentSizeSelect = document.getElementById('indent-size');
|
| 388 |
-
indentSizeSelect.addEventListener('change', (e) => {
|
| 389 |
-
if (editor) {
|
| 390 |
-
const size = parseInt(e.target.value, 10);
|
| 391 |
-
editor.setOption('indentUnit', size);
|
| 392 |
-
editor.setOption('tabSize', size);
|
| 393 |
-
}
|
| 394 |
-
});
|
| 395 |
-
|
| 396 |
-
// Gestion du "No wrap" (Retour à la ligne)
|
| 397 |
-
const noWrapToggle = document.getElementById('no-wrap-toggle');
|
| 398 |
-
let isWrapped = true;
|
| 399 |
-
noWrapToggle.addEventListener('click', () => {
|
| 400 |
-
isWrapped = !isWrapped;
|
| 401 |
-
editor.setOption('lineWrapping', isWrapped);
|
| 402 |
-
noWrapToggle.textContent = isWrapped ? 'No wrap' : 'Wrap';
|
| 403 |
-
noWrapToggle.classList.toggle('text-color-var', !isWrapped); // Inverse le style de texte
|
| 404 |
-
});
|
| 405 |
-
|
| 406 |
-
// Soumission du Formulaire de Commit (Simulation)
|
| 407 |
-
document.getElementById('commit-form').addEventListener('submit', (e) => {
|
| 408 |
-
e.preventDefault();
|
| 409 |
-
|
| 410 |
-
const commitTitle = document.getElementById('commit-title').value.trim();
|
| 411 |
-
const fileContent = editor ? editor.getValue() : '';
|
| 412 |
-
|
| 413 |
-
// VRAI BACKEND: Envoyer le fichier (initialFilePath), le fileContent et les détails du commit au serveur
|
| 414 |
-
|
| 415 |
-
console.log(`--- MODIFICATION DE FICHIER ENVOYÉE ---`);
|
| 416 |
-
console.log(`Fichier: ${initialFilePath}`);
|
| 417 |
-
console.log(`Titre du Commit: ${commitTitle}`);
|
| 418 |
-
console.log(`Contenu (début): ${fileContent.substring(0, 50)}...`);
|
| 419 |
-
|
| 420 |
-
// Redirection vers la page de dépôt après un succès simulé
|
| 421 |
-
window.location.href = 'repo_files.html?status=file_updated&path=' + encodeURIComponent(initialFilePath);
|
| 422 |
-
});
|
| 423 |
-
|
| 424 |
-
// Gestion du bouton d'annulation principal
|
| 425 |
-
document.getElementById('cancel-changes').addEventListener('click', () => {
|
| 426 |
-
window.location.href = 'repo_files.html';
|
| 427 |
-
});
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
// Initialisation au chargement de la page
|
| 431 |
-
window.onload = initCodeMirror;
|
| 432 |
-
</script>
|
| 433 |
-
|
| 434 |
-
</body>
|
| 435 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 5 |
-
<link rel="icon" type="image/png" href="https://i.imgur.com/7Gn3toV.png">
|
| 6 |
-
<title>GitForge | Lanceur HTML</title>
|
| 7 |
-
<link rel="stylesheet"
|
| 8 |
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 9 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
-
<style>
|
| 11 |
-
:root {
|
| 12 |
-
--dark-bg: #1e1e1e; /* Fond principal (très sombre) */
|
| 13 |
-
--main-bg: #2d2d30; /* Arrière-plan de la plateforme */
|
| 14 |
-
--bar-color: #3e3e42; /* Couleur de la barre horizontale (gris foncé) */
|
| 15 |
-
--text-color: #f0f0f0;
|
| 16 |
-
--button-hover: #007acc; /* Bleu pour le survol (standard dark theme) */
|
| 17 |
-
--button-icon: #cccccc;
|
| 18 |
-
--border-color: #444444;
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
* {
|
| 22 |
-
box-sizing: border-box;
|
| 23 |
-
}
|
| 24 |
-
|
| 25 |
-
body {
|
| 26 |
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 27 |
-
background-color: var(--dark-bg);
|
| 28 |
-
color: var(--text-color);
|
| 29 |
-
margin: 0;
|
| 30 |
-
display: flex;
|
| 31 |
-
flex-direction: column;
|
| 32 |
-
height: 100vh;
|
| 33 |
-
overflow: hidden; /* Empêche le défilement global */
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
.header-bar {
|
| 37 |
-
background-color: var(--bar-color);
|
| 38 |
-
display: flex;
|
| 39 |
-
align-items: center;
|
| 40 |
-
padding: 8px 20px;
|
| 41 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
| 42 |
-
flex-shrink: 0;
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
.header-bar button, .header-bar input[type="file"] {
|
| 46 |
-
margin-right: 10px;
|
| 47 |
-
}
|
| 48 |
-
|
| 49 |
-
.btn {
|
| 50 |
-
background-color: transparent;
|
| 51 |
-
color: var(--button-icon);
|
| 52 |
-
border: none;
|
| 53 |
-
padding: 8px 12px;
|
| 54 |
-
border-radius: 4px;
|
| 55 |
-
cursor: pointer;
|
| 56 |
-
transition: background-color 0.2s;
|
| 57 |
-
display: flex;
|
| 58 |
-
align-items: center;
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
.btn:hover:not(:disabled) {
|
| 62 |
-
background-color: var(--button-hover);
|
| 63 |
-
color: var(--text-color);
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
-
.btn:disabled {
|
| 67 |
-
opacity: 0.5;
|
| 68 |
-
cursor: not-allowed;
|
| 69 |
-
}
|
| 70 |
-
|
| 71 |
-
.iframe-container {
|
| 72 |
-
flex-grow: 1;
|
| 73 |
-
padding: 0;
|
| 74 |
-
background-color: white; /* Fond blanc pour le contenu HTML */
|
| 75 |
-
position: relative;
|
| 76 |
-
}
|
| 77 |
-
|
| 78 |
-
.iframe-container iframe {
|
| 79 |
-
width: 100%;
|
| 80 |
-
height: 100%;
|
| 81 |
-
border: none;
|
| 82 |
-
}
|
| 83 |
-
|
| 84 |
-
#status-message {
|
| 85 |
-
margin-left: auto;
|
| 86 |
-
font-size: 0.9em;
|
| 87 |
-
color: #ccc;
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
#html-file-input {
|
| 91 |
-
display: none;
|
| 92 |
-
}
|
| 93 |
-
</style>
|
| 94 |
-
</head>
|
| 95 |
-
<body>
|
| 96 |
-
|
| 97 |
-
<div class="header-bar">
|
| 98 |
-
<button id="import-btn" class="btn">
|
| 99 |
-
<span class="material-symbols-rounded text-xl mr-1">folder_open</span>
|
| 100 |
-
Importer Fichier HTML
|
| 101 |
-
</button>
|
| 102 |
-
<input type="file" id="html-file-input" accept=".html,.htm">
|
| 103 |
-
|
| 104 |
-
<button id="run-btn" class="btn" disabled>
|
| 105 |
-
<span class="material-symbols-rounded text-xl mr-1">play_arrow</span>
|
| 106 |
-
Lancer (▶)
|
| 107 |
-
</button>
|
| 108 |
-
|
| 109 |
-
<button id="static-deploy-btn" class="btn">
|
| 110 |
-
<span class="material-symbols-rounded text-xl mr-1">web</span>
|
| 111 |
-
Déploiement Statique
|
| 112 |
-
</button>
|
| 113 |
-
|
| 114 |
-
<span id="status-message"></span>
|
| 115 |
-
</div>
|
| 116 |
-
|
| 117 |
-
<div class="iframe-container">
|
| 118 |
-
<iframe id="html-iframe" title="HTML Renderer"></iframe>
|
| 119 |
-
</div>
|
| 120 |
-
|
| 121 |
-
<script>
|
| 122 |
-
const fileInput = document.getElementById('html-file-input');
|
| 123 |
-
const importBtn = document.getElementById('import-btn');
|
| 124 |
-
const runBtn = document.getElementById('run-btn');
|
| 125 |
-
const iframe = document.getElementById('html-iframe');
|
| 126 |
-
const statusMessage = document.getElementById('status-message');
|
| 127 |
-
const staticDeployBtn = document.getElementById('static-deploy-btn');
|
| 128 |
-
|
| 129 |
-
let uploadedFileUrl = null;
|
| 130 |
-
|
| 131 |
-
// --- NOUVELLE LOGIQUE : GESTION DE L'URL PASSÉE EN PARAMÈTRE ---
|
| 132 |
-
const urlParams = new URLSearchParams(window.location.search);
|
| 133 |
-
const initialLaunchUrl = urlParams.get('url');
|
| 134 |
-
|
| 135 |
-
if (initialLaunchUrl) {
|
| 136 |
-
// Mode "Déploiement Statique" activé
|
| 137 |
-
// Décoder l'URL et l'injecter directement dans l'iframe
|
| 138 |
-
const decodedUrl = decodeURIComponent(initialLaunchUrl);
|
| 139 |
-
iframe.src = decodedUrl;
|
| 140 |
-
|
| 141 |
-
uploadedFileUrl = decodedUrl; // Mettre à jour l'URL pour la fonction Run
|
| 142 |
-
|
| 143 |
-
// Mettre à jour l'interface
|
| 144 |
-
importBtn.disabled = true; // Désactiver l'importation de fichier simple
|
| 145 |
-
runBtn.disabled = false;
|
| 146 |
-
statusMessage.textContent = "Site statique lancé depuis l'URL: " + decodedUrl.split('/').pop();
|
| 147 |
-
|
| 148 |
-
} else {
|
| 149 |
-
// Mode "Importation de Fichier Simple"
|
| 150 |
-
statusMessage.textContent = "Importez un fichier HTML pour commencer.";
|
| 151 |
-
}
|
| 152 |
-
// ------------------------------------------------------------------------
|
| 153 |
-
|
| 154 |
-
// 1. Ouvrir le dialogue de fichier lorsque le bouton 'Import' est cliqué
|
| 155 |
-
importBtn.addEventListener('click', () => {
|
| 156 |
-
// Seulement si nous ne sommes PAS en mode site statique lancé
|
| 157 |
-
if (!initialLaunchUrl) {
|
| 158 |
-
fileInput.click();
|
| 159 |
-
}
|
| 160 |
-
});
|
| 161 |
-
|
| 162 |
-
// 2. Gérer la sélection du fichier et l'upload (ancienne logique pour un seul fichier)
|
| 163 |
-
fileInput.addEventListener('change', async (event) => {
|
| 164 |
-
const files = event.target.files;
|
| 165 |
-
if (files.length === 0) return;
|
| 166 |
-
|
| 167 |
-
const file = files[0];
|
| 168 |
-
statusMessage.textContent = `Téléversement de ${file.name}...`;
|
| 169 |
-
runBtn.disabled = true;
|
| 170 |
-
|
| 171 |
-
const formData = new FormData();
|
| 172 |
-
formData.append('file', file);
|
| 173 |
-
|
| 174 |
-
try {
|
| 175 |
-
// Utiliser l'ancienne route pour l'upload d'un seul fichier (si elle existe toujours)
|
| 176 |
-
const response = await fetch('/upload-html', {
|
| 177 |
-
method: 'POST',
|
| 178 |
-
body: formData
|
| 179 |
-
});
|
| 180 |
-
|
| 181 |
-
const data = await response.json();
|
| 182 |
-
|
| 183 |
-
if (response.ok && data.status === 'success') {
|
| 184 |
-
uploadedFileUrl = data.file_url;
|
| 185 |
-
statusMessage.textContent = `Fichier prêt: ${file.name}. Cliquez sur Lancer (▶).`;
|
| 186 |
-
runBtn.disabled = false; // Activer le bouton Run
|
| 187 |
-
} else {
|
| 188 |
-
// Afficher l'erreur du backend
|
| 189 |
-
throw new Error(data.message || "Erreur de téléversement.");
|
| 190 |
-
}
|
| 191 |
-
|
| 192 |
-
} catch (error) {
|
| 193 |
-
console.error("Erreur d'upload:", error);
|
| 194 |
-
statusMessage.textContent = `Erreur: ${error.message}`;
|
| 195 |
-
runBtn.disabled = true;
|
| 196 |
-
uploadedFileUrl = null;
|
| 197 |
-
}
|
| 198 |
-
|
| 199 |
-
// Réinitialiser l'input file pour permettre l'upload du même fichier
|
| 200 |
-
fileInput.value = "";
|
| 201 |
-
});
|
| 202 |
-
|
| 203 |
-
// 3. Gérer le clic sur le bouton 'Run'
|
| 204 |
-
runBtn.addEventListener('click', () => {
|
| 205 |
-
if (uploadedFileUrl) {
|
| 206 |
-
// Charger l'URL temporaire dans l'iframe
|
| 207 |
-
iframe.src = uploadedFileUrl;
|
| 208 |
-
statusMessage.textContent = "Contenu lancé ou rechargé.";
|
| 209 |
-
} else {
|
| 210 |
-
statusMessage.textContent = "Veuillez d'abord importer un fichier ou un site statique.";
|
| 211 |
-
}
|
| 212 |
-
});
|
| 213 |
-
|
| 214 |
-
// 4. Redirection vers la nouvelle page de déploiement statique
|
| 215 |
-
staticDeployBtn.addEventListener('click', () => {
|
| 216 |
-
window.location.href = '/static-deploy';
|
| 217 |
-
});
|
| 218 |
-
</script>
|
| 219 |
-
|
| 220 |
-
</body>
|
| 221 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/mot_de_passe_oublie.html
DELETED
|
@@ -1,201 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="fr" class="light">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Mot de passe oublié - GitForge</title>
|
| 7 |
-
<link rel="icon" type="image/png" href="https://i.imgur.com/7Gn3toV.png">
|
| 8 |
-
<link rel="stylesheet"
|
| 9 |
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 10 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 11 |
-
<style>
|
| 12 |
-
body { font-family: 'Inter', sans-serif; }
|
| 13 |
-
|
| 14 |
-
/* Définir les Variables de Thème (Mode Clair uniquement) */
|
| 15 |
-
:root {
|
| 16 |
-
--bg-page: #f9fafb;
|
| 17 |
-
--bg-card: #ffffff;
|
| 18 |
-
--text-primary: #1f2937;
|
| 19 |
-
--text-secondary: #6b7280;
|
| 20 |
-
--border-color: #d1d5db;
|
| 21 |
-
--bg-input: #ffffff;
|
| 22 |
-
--ring-color: #a78bfa; /* Violet clair pour le focus */
|
| 23 |
-
--ring-offset-color: #f9fafb;
|
| 24 |
-
}
|
| 25 |
-
</style>
|
| 26 |
-
</head>
|
| 27 |
-
<body class="bg-[--bg-page] text-[--text-primary] min-h-screen flex items-center justify-center p-4 py-8">
|
| 28 |
-
|
| 29 |
-
<div class="w-full max-w-lg">
|
| 30 |
-
<div class="bg-[--bg-card] p-8 rounded-xl shadow-2xl border border-[--border-color]">
|
| 31 |
-
<h2 class="text-3xl font-extrabold text-center mb-6">Réinitialiser le mot de passe</h2>
|
| 32 |
-
<p class="text-center text-[--text-secondary] mb-6">Veuillez fournir votre e-mail et répondre à votre question de sécurité pour réinitialiser votre mot de passe.</p>
|
| 33 |
-
<p id="message" class="text-center mb-4"></p>
|
| 34 |
-
|
| 35 |
-
<form id="reset-password-form" class="space-y-5">
|
| 36 |
-
|
| 37 |
-
<div>
|
| 38 |
-
<label for="email" class="block text-sm font-medium text-[--text-secondary] mb-1">Adresse E-mail</label>
|
| 39 |
-
<input type="email" id="email" name="email" required
|
| 40 |
-
class="w-full px-4 py-2 border border-[--border-color] rounded-lg bg-[--bg-input] text-[--text-primary] focus:ring-2 focus:ring-[--ring-color] focus:border-transparent outline-none"
|
| 41 |
-
placeholder="Votre adresse e-mail de compte">
|
| 42 |
-
</div>
|
| 43 |
-
|
| 44 |
-
<div>
|
| 45 |
-
<label for="security_question" class="block text-sm font-medium text-[--text-secondary] mb-1">Question de sécurité</label>
|
| 46 |
-
<select id="security_question" name="security_question" required
|
| 47 |
-
class="w-full px-4 py-2 border border-[--border-color] rounded-lg bg-[--bg-input] text-[--text-primary] focus:ring-2 focus:ring-[--ring-color] focus:border-transparent outline-none">
|
| 48 |
-
<option value="">Sélectionnez la question utilisée lors de l'inscription...</option>
|
| 49 |
-
<option value="nom_animal">Quel est le nom de votre premier animal de compagnie ?</option>
|
| 50 |
-
<option value="ville_naissance">Quelle est la ville où vous êtes né(e) ?</option>
|
| 51 |
-
<option value="plat_prefere">Quel est votre plat préféré ?</option>
|
| 52 |
-
</select>
|
| 53 |
-
</div>
|
| 54 |
-
|
| 55 |
-
<div>
|
| 56 |
-
<label for="security_answer" class="block text-sm font-medium text-[--text-secondary] mb-1">Réponse de sécurité</label>
|
| 57 |
-
<input type="text" id="security_answer" name="security_answer" required
|
| 58 |
-
class="w-full px-4 py-2 border border-[--border-color] rounded-lg bg-[--bg-input] text-[--text-primary] focus:ring-2 focus:ring-[--ring-color] focus:border-transparent outline-none"
|
| 59 |
-
placeholder="Votre réponse secrète">
|
| 60 |
-
</div>
|
| 61 |
-
|
| 62 |
-
<div>
|
| 63 |
-
<label for="new_password" class="block text-sm font-medium text-[--text-secondary] mb-1">Nouveau Mot de passe</label>
|
| 64 |
-
<div class="relative">
|
| 65 |
-
<input type="password" id="new_password" name="new_password" required minlength="8"
|
| 66 |
-
class="w-full px-4 py-2 border border-[--border-color] rounded-lg bg-[--bg-input] text-[--text-primary] focus:ring-2 focus:ring-[--ring-color] focus:border-transparent outline-none pr-10"
|
| 67 |
-
placeholder="Minimum 8 caractères">
|
| 68 |
-
<button type="button" id="toggle-new-password" class="absolute inset-y-0 right-0 pr-3 flex items-center text-[--text-secondary] hover:text-[--text-primary]" aria-label="Afficher/Masquer le mot de passe">
|
| 69 |
-
<span class="material-symbols-rounded text-xl">visibility</span>
|
| 70 |
-
</button>
|
| 71 |
-
</div>
|
| 72 |
-
</div>
|
| 73 |
-
|
| 74 |
-
<div>
|
| 75 |
-
<label for="confirm_password" class="block text-sm font-medium text-[--text-secondary] mb-1">Confirmer le nouveau mot de passe</label>
|
| 76 |
-
<div class="relative">
|
| 77 |
-
<input type="password" id="confirm_password" name="confirm_password" required minlength="8"
|
| 78 |
-
class="w-full px-4 py-2 border border-[--border-color] rounded-lg bg-[--bg-input] text-[--text-primary] focus:ring-2 focus:ring-[--ring-color] focus:border-transparent outline-none pr-10"
|
| 79 |
-
placeholder="Confirmez le nouveau mot de passe">
|
| 80 |
-
<button type="button" id="toggle-confirm-password" class="absolute inset-y-0 right-0 pr-3 flex items-center text-[--text-secondary] hover:text-[--text-primary]" aria-label="Afficher/Masquer le mot de passe">
|
| 81 |
-
<span class="material-symbols-rounded text-xl">visibility</span>
|
| 82 |
-
</button>
|
| 83 |
-
</div>
|
| 84 |
-
</div>
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
<button type="submit" id="submit-button"
|
| 88 |
-
class="w-full py-2 px-4 border border-transparent rounded-lg shadow-sm text-lg font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 focus:ring-offset-[--ring-offset-color] disabled:opacity-50 transition duration-150 mt-6">
|
| 89 |
-
Réinitialiser le mot de passe
|
| 90 |
-
</button>
|
| 91 |
-
</form>
|
| 92 |
-
|
| 93 |
-
<div class="mt-6 text-center text-sm">
|
| 94 |
-
<p class="text-[--text-secondary]">
|
| 95 |
-
Retour à la
|
| 96 |
-
<a href="/mindus/nexus/connexion" class="font-medium text-indigo-600 hover:text-indigo-500">
|
| 97 |
-
page de connexion
|
| 98 |
-
</a>.
|
| 99 |
-
</p>
|
| 100 |
-
</div>
|
| 101 |
-
</div>
|
| 102 |
-
</div>
|
| 103 |
-
|
| 104 |
-
<script>
|
| 105 |
-
// L'URL de l'API pointe directement vers l'endpoint local du backend Flask
|
| 106 |
-
const RESET_PASSWORD_ENDPOINT = "/api/reset_password";
|
| 107 |
-
|
| 108 |
-
const form = document.getElementById('reset-password-form');
|
| 109 |
-
const messageElement = document.getElementById('message');
|
| 110 |
-
const submitButton = document.getElementById('submit-button');
|
| 111 |
-
|
| 112 |
-
// --- LOGIQUE D'AFFICHAGE/MASQUAGE DU MOT DE PASSE (pour les deux champs) ---
|
| 113 |
-
function setupPasswordToggle(inputId, toggleId) {
|
| 114 |
-
const passwordInput = document.getElementById(inputId);
|
| 115 |
-
const toggleButton = document.getElementById(toggleId);
|
| 116 |
-
const icon = toggleButton.querySelector('.material-symbols-rounded');
|
| 117 |
-
|
| 118 |
-
toggleButton.addEventListener('click', () => {
|
| 119 |
-
const isPassword = passwordInput.type === 'password';
|
| 120 |
-
passwordInput.type = isPassword ? 'text' : 'password';
|
| 121 |
-
icon.textContent = isPassword ? 'visibility_off' : 'visibility';
|
| 122 |
-
});
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
-
setupPasswordToggle('new_password', 'toggle-new-password');
|
| 126 |
-
setupPasswordToggle('confirm_password', 'toggle-confirm-password');
|
| 127 |
-
// ---------------------------------------------------
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
form.addEventListener('submit', async (e) => {
|
| 131 |
-
e.preventDefault();
|
| 132 |
-
messageElement.textContent = ''; // Réinitialiser le message
|
| 133 |
-
messageElement.className = 'text-center mb-4'; // Réinitialiser les classes
|
| 134 |
-
submitButton.disabled = true;
|
| 135 |
-
submitButton.textContent = 'Réinitialisation en cours...';
|
| 136 |
-
|
| 137 |
-
// Validation des mots de passe
|
| 138 |
-
const newPassword = document.getElementById('new_password').value;
|
| 139 |
-
const confirmPassword = document.getElementById('confirm_password').value;
|
| 140 |
-
|
| 141 |
-
if (newPassword !== confirmPassword) {
|
| 142 |
-
messageElement.textContent = 'Le nouveau mot de passe et la confirmation ne correspondent pas.';
|
| 143 |
-
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 144 |
-
submitButton.disabled = false;
|
| 145 |
-
submitButton.textContent = "Réinitialiser le mot de passe";
|
| 146 |
-
return;
|
| 147 |
-
}
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
const formData = new FormData(form);
|
| 151 |
-
const data = Object.fromEntries(formData.entries());
|
| 152 |
-
// Ajouter les deux mots de passe au payload JSON
|
| 153 |
-
data.new_password = newPassword;
|
| 154 |
-
data.confirm_password = confirmPassword;
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
try {
|
| 158 |
-
const response = await fetch(RESET_PASSWORD_ENDPOINT, {
|
| 159 |
-
method: 'POST',
|
| 160 |
-
headers: {
|
| 161 |
-
'Content-Type': 'application/json',
|
| 162 |
-
},
|
| 163 |
-
body: JSON.stringify(data)
|
| 164 |
-
});
|
| 165 |
-
|
| 166 |
-
const result = await response.json();
|
| 167 |
-
|
| 168 |
-
if (response.ok && result.success) {
|
| 169 |
-
messageElement.textContent = result.message || 'Mot de passe réinitialisé avec succès ! Redirection vers la connexion...';
|
| 170 |
-
messageElement.className = 'text-green-600 mb-4 font-bold';
|
| 171 |
-
|
| 172 |
-
// Redirection vers la page de connexion
|
| 173 |
-
setTimeout(() => {
|
| 174 |
-
// Utilise l'URL codée en dur ou celle fournie par le backend
|
| 175 |
-
const redirectUrl = result.redirect || '/mindus/nexus/connexion';
|
| 176 |
-
window.location.href = redirectUrl;
|
| 177 |
-
}, 1500);
|
| 178 |
-
|
| 179 |
-
} else {
|
| 180 |
-
// Afficher le message d'erreur du backend
|
| 181 |
-
messageElement.textContent = result.message || 'Échec de la réinitialisation. Veuillez vérifier les informations (Email/Question/Réponse).';
|
| 182 |
-
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
} catch (error) {
|
| 186 |
-
console.error('Erreur lors de la communication avec le backend:', error);
|
| 187 |
-
messageElement.textContent = 'Erreur de connexion au serveur ou réseau indisponible.';
|
| 188 |
-
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 189 |
-
} finally {
|
| 190 |
-
// Réactiver le bouton si la redirection n'a pas eu lieu
|
| 191 |
-
if (messageElement.className.indexOf('text-green-600') === -1) {
|
| 192 |
-
submitButton.disabled = false;
|
| 193 |
-
submitButton.textContent = "Réinitialiser le mot de passe";
|
| 194 |
-
}
|
| 195 |
-
}
|
| 196 |
-
});
|
| 197 |
-
|
| 198 |
-
// --- LOGIQUE DU THÈME ENLEVÉE ---
|
| 199 |
-
</script>
|
| 200 |
-
</body>
|
| 201 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/politique_confidentialite.html
DELETED
|
@@ -1,370 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="fr">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Politique de Confidentialité - Nexus</title>
|
| 7 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.21.0/tocbot.css">
|
| 9 |
-
<link rel="stylesheet"
|
| 10 |
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
-
<style>
|
| 12 |
-
body { font-family: 'Inter', sans-serif; }
|
| 13 |
-
|
| 14 |
-
/* Styles pour un noir très foncé et le mode clair */
|
| 15 |
-
/* Mode Sombre (Défaut, ajusté pour un noir très foncé) */
|
| 16 |
-
:root {
|
| 17 |
-
/* Couleurs par défaut (sombre) - Ajustées pour être plus noires que le gris/bleu de Tailwind */
|
| 18 |
-
--bg-page: #0A0A0A; /* Noir très foncé pour le fond principal */
|
| 19 |
-
--bg-card: #151515; /* Noir foncé pour les éléments/conteneurs */
|
| 20 |
-
--text-main: #E5E7EB; /* Gris très clair pour le texte principal (gray-200) */
|
| 21 |
-
--text-secondary: #9CA3AF; /* Gris moyen pour le texte secondaire (gray-400) */
|
| 22 |
-
--border-color: #374151; /* Gris foncé pour les bordures (gray-700) */
|
| 23 |
-
--blue-main: #3B82F6; /* Bleu Vif (blue-500) */
|
| 24 |
-
--blue-light: #60A5FA; /* Bleu Clair (blue-400) */
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
/* Mode Clair */
|
| 28 |
-
html.light {
|
| 29 |
-
--bg-page: #F3F4F6; /* Gris très clair pour le fond principal (gray-100) */
|
| 30 |
-
--bg-card: #FFFFFF; /* Blanc pour les éléments/conteneurs */
|
| 31 |
-
--text-main: #1F2937; /* Gris très foncé pour le texte principal (gray-800) */
|
| 32 |
-
--text-secondary: #4B5563; /* Gris foncé pour le texte secondaire (gray-600) */
|
| 33 |
-
--border-color: #D1D5DB; /* Gris clair pour les bordures (gray-300) */
|
| 34 |
-
--blue-main: #2563EB; /* Bleu Vif (blue-600) */
|
| 35 |
-
--blue-light: #1D4ED8; /* Bleu Clair (blue-700) */
|
| 36 |
-
}
|
| 37 |
-
|
| 38 |
-
/* Application des variables aux éléments de base */
|
| 39 |
-
body {
|
| 40 |
-
background-color: var(--bg-page);
|
| 41 |
-
color: var(--text-main);
|
| 42 |
-
transition: background-color 0.3s, color 0.3s;
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
/* Remplacement des classes Tailwind par des variables CSS */
|
| 46 |
-
.bg-gray-900 { background-color: var(--bg-page) !important; }
|
| 47 |
-
.bg-gray-800\/50, .bg-gray-800 { background-color: var(--bg-card) !important; }
|
| 48 |
-
.text-white { color: var(--text-main) !important; }
|
| 49 |
-
.text-gray-400 { color: var(--text-secondary) !important; }
|
| 50 |
-
.text-gray-300 { color: var(--text-secondary) !important; }
|
| 51 |
-
.border-gray-700 { border-color: var(--border-color) !important; }
|
| 52 |
-
.border-gray-800 { border-color: var(--border-color) !important; }
|
| 53 |
-
.border-blue-500\/50 { border-color: var(--blue-main) !important; }
|
| 54 |
-
.text-blue-500 { color: var(--blue-main) !important; }
|
| 55 |
-
.text-blue-400 { color: var(--blue-light) !important; }
|
| 56 |
-
|
| 57 |
-
/* Style pour les boutons carrés */
|
| 58 |
-
.btn-square {
|
| 59 |
-
border-radius: 0; /* Supprime l'arrondi */
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
/* Styles personnalisés pour intégrer Tocbot au thème "chat-like" */
|
| 63 |
-
.toc-list {
|
| 64 |
-
list-style: none;
|
| 65 |
-
padding-left: 0;
|
| 66 |
-
margin: 0;
|
| 67 |
-
}
|
| 68 |
-
.toc-list-item {
|
| 69 |
-
margin-bottom: 0.25rem;
|
| 70 |
-
}
|
| 71 |
-
.toc-list-item a {
|
| 72 |
-
display: block;
|
| 73 |
-
padding: 0.5rem 0.75rem;
|
| 74 |
-
color: var(--text-secondary); /* gray-400 */
|
| 75 |
-
border-left: 2px solid transparent;
|
| 76 |
-
transition: all 0.2s;
|
| 77 |
-
font-size: 0.9rem;
|
| 78 |
-
}
|
| 79 |
-
.toc-list-item a:hover {
|
| 80 |
-
color: var(--text-main); /* white */
|
| 81 |
-
border-left-color: var(--blue-main); /* blue-500 */
|
| 82 |
-
}
|
| 83 |
-
.is-active-link {
|
| 84 |
-
font-weight: 700;
|
| 85 |
-
color: var(--blue-main) !important; /* blue-500 */
|
| 86 |
-
border-left-color: var(--blue-main) !important;
|
| 87 |
-
background-color: var(--bg-card); /* gray-800 */
|
| 88 |
-
border-radius: 0; /* Style carré */
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
/* Style du bouton theme-switch (Étape 2) */
|
| 92 |
-
.theme-switch {
|
| 93 |
-
background: none;
|
| 94 |
-
border: none;
|
| 95 |
-
cursor: pointer;
|
| 96 |
-
color: var(--text-main);
|
| 97 |
-
font-size: 28px; /* Rendu légèrement plus grand */
|
| 98 |
-
transition: color 0.2s;
|
| 99 |
-
margin-left: 1rem;
|
| 100 |
-
}
|
| 101 |
-
.theme-switch:hover {
|
| 102 |
-
color: var(--blue-main);
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
/* Fixer la barre latérale pour la rendre moins large (verticalement) et la cacher sur mobile */
|
| 106 |
-
/* Ajustement de la largeur de la barre latérale (lg:w-1/4 est conservé pour la structure) */
|
| 107 |
-
.lg\:w-1\/4 {
|
| 108 |
-
max-width: 300px; /* Limiter la largeur r��elle de la barre latérale sur grand écran */
|
| 109 |
-
width: 100%; /* S'assurer qu'il utilise l'espace disponible */
|
| 110 |
-
}
|
| 111 |
-
@media (max-width: 1023px) {
|
| 112 |
-
.js-toc-container { display: none; }
|
| 113 |
-
}
|
| 114 |
-
|
| 115 |
-
/* Ajustement pour l'en-tête fixe */
|
| 116 |
-
.header-fixed {
|
| 117 |
-
background-color: var(--bg-page);
|
| 118 |
-
z-index: 50;
|
| 119 |
-
padding-top: 1rem;
|
| 120 |
-
padding-bottom: 1rem;
|
| 121 |
-
}
|
| 122 |
-
</style>
|
| 123 |
-
</head>
|
| 124 |
-
<body class="min-h-screen">
|
| 125 |
-
|
| 126 |
-
<div class="max-w-7xl mx-auto p-4 sm:p-6 lg:p-8">
|
| 127 |
-
|
| 128 |
-
<header class="header-fixed fixed top-0 w-full flex flex-col sm:flex-row justify-between items-center py-4 border-b border-blue-500/50 mb-8">
|
| 129 |
-
<div class="flex justify-between items-center w-full sm:w-auto">
|
| 130 |
-
<a href="/" class="text-4xl font-extrabold text-blue-500 tracking-wider mb-4 sm:mb-0">
|
| 131 |
-
GitForge
|
| 132 |
-
</a>
|
| 133 |
-
<nav class="flex items-center space-x-4">
|
| 134 |
-
<a href="/support" class="px-6 py-3 bg-teal-600 text-white font-bold hover:bg-teal-700 transition duration-300 btn-square shadow-md">
|
| 135 |
-
Contacter le Support
|
| 136 |
-
</a>
|
| 137 |
-
<button id="theme-toggle" class="theme-switch" aria-label="Basculer le thème">
|
| 138 |
-
<span class="material-symbols-rounded">light_mode</span>
|
| 139 |
-
</button>
|
| 140 |
-
</nav>
|
| 141 |
-
</div>
|
| 142 |
-
</header>
|
| 143 |
-
|
| 144 |
-
<div class="pt-28">
|
| 145 |
-
|
| 146 |
-
<main class="flex flex-col lg:flex-row lg:space-x-8">
|
| 147 |
-
|
| 148 |
-
<div class="lg:w-3/4 js-toc-content">
|
| 149 |
-
|
| 150 |
-
<h1 class="text-4xl font-extrabold text-white mb-6">
|
| 151 |
-
Politique de Confidentialité
|
| 152 |
-
</h1>
|
| 153 |
-
<p class="text-gray-400 text-lg mb-10 border-l-4 border-blue-500 pl-4 italic">
|
| 154 |
-
Dernière mise à jour : 28 Novembre 2025. Veuillez lire attentivement avant d'utiliser la plateforme Nexus.
|
| 155 |
-
</p>
|
| 156 |
-
|
| 157 |
-
<h2 id="champ-application" class="text-3xl font-bold text-blue-400 mt-10 mb-4 pt-2">
|
| 158 |
-
1. Champ d'Application
|
| 159 |
-
</h2>
|
| 160 |
-
<p class="text-gray-300 mb-6">
|
| 161 |
-
La présente Politique de Confidentialité régit la manière dont Nexus collecte, utilise, maintient et divulgue les informations collectées auprès des utilisateurs (chacun, un "Utilisateur") du site web, de l'application et de l'API Nexus (la "Plateforme"). Elle s'applique à la Plateforme et à tous les produits et services proposés par Nexus.
|
| 162 |
-
</p>
|
| 163 |
-
|
| 164 |
-
<h2 id="collecte-donnees" class="text-3xl font-bold text-blue-400 mt-10 mb-4 pt-2">
|
| 165 |
-
2. Collecte des Données Personnelles
|
| 166 |
-
</h2>
|
| 167 |
-
<p class="text-gray-300 mb-4">
|
| 168 |
-
Nous collectons des informations d'identification personnelle auprès des Utilisateurs de diverses manières, y compris, mais sans s'y limiter, lorsque les Utilisateurs visitent notre site, s'inscrivent sur la Plateforme, passent une commande d'API, remplissent un formulaire, et en relation avec d'autres activités, services, fonctionnalités ou ressources que nous mettons à disposition.
|
| 169 |
-
</p>
|
| 170 |
-
|
| 171 |
-
<h3 id="donnees-fournies" class="text-2xl font-semibold text-white mt-8 mb-3 pt-2">
|
| 172 |
-
2.1. Données que vous nous fournissez directement
|
| 173 |
-
</h3>
|
| 174 |
-
<ul class="list-disc list-inside text-gray-300 space-y-2 ml-4 mb-6">
|
| 175 |
-
<li>Informations de Compte : Nom, adresse e-mail, mot de passe chiffré.</li>
|
| 176 |
-
<li>Informations de Facturation : Adresse de facturation, informations de paiement (traitées par un prestataire tiers sécurisé et non stockées par Nexus).</li>
|
| 177 |
-
<li>Communications : Enregistrements de correspondance lorsque vous contactez notre support.</li>
|
| 178 |
-
</ul>
|
| 179 |
-
|
| 180 |
-
<h3 id="donnees-automatiques" class="text-2xl font-semibold text-white mt-8 mb-3 pt-2">
|
| 181 |
-
2.2. Données collectées automatiquement (Logs API)
|
| 182 |
-
</h3>
|
| 183 |
-
<p class="text-gray-300 mb-6">
|
| 184 |
-
Lors de l'utilisation de notre API, nous enregistrons automatiquement des informations dans nos logs serveurs pour la sécurité, le dépannage et la facturation.
|
| 185 |
-
</p>
|
| 186 |
-
<ul class="list-disc list-inside text-gray-300 space-y-2 ml-4 mb-6">
|
| 187 |
-
<li>Adresses IP des requêtes.</li>
|
| 188 |
-
<li>Horodatage, méthode et statut de l'appel API.</li>
|
| 189 |
-
<li>Erreurs et avertissements générés.</li>
|
| 190 |
-
<li>Clé API partiellement masquée (pour l'identification du compte).</li>
|
| 191 |
-
</ul>
|
| 192 |
-
|
| 193 |
-
<h2 id="utilisation-donnees" class="text-3xl font-bold text-blue-400 mt-10 mb-4 pt-2">
|
| 194 |
-
3. Comment nous utilisons les informations collectées
|
| 195 |
-
</h2>
|
| 196 |
-
<p class="text-gray-300 mb-4">
|
| 197 |
-
Nexus utilise les données collectées aux fins suivantes :
|
| 198 |
-
</p>
|
| 199 |
-
<ul class="list-decimal list-inside text-gray-300 space-y-2 ml-4 mb-6">
|
| 200 |
-
<li>Pour fournir et maintenir le service : Assurer le bon fonctionnement de l'API et du Dashboard.</li>
|
| 201 |
-
<li>Pour la facturation : Calculer et traiter les frais d'utilisation de l'API.</li>
|
| 202 |
-
<li>Pour la sécurité : Détecter et prévenir les fraudes et les abus.</li>
|
| 203 |
-
<li>Pour l'amélioration : Améliorer nos produits et services API en fonction des données d'utilisation agrégées.</li>
|
| 204 |
-
<li>Pour la communication : Envoyer des notifications de service importantes et des informations de sécurité.</li>
|
| 205 |
-
</ul>
|
| 206 |
-
|
| 207 |
-
<h2 id="protection-donnees" class="text-3xl font-bold text-blue-400 mt-10 mb-4 pt-2">
|
| 208 |
-
4. Protection et Partage des Données
|
| 209 |
-
</h2>
|
| 210 |
-
<h3 id="mesures-securite" class="text-2xl font-semibold text-white mt-8 mb-3 pt-2">
|
| 211 |
-
4.1. Mesures de Sécurité
|
| 212 |
-
</h3>
|
| 213 |
-
<p class="text-gray-300 mb-6">
|
| 214 |
-
Nous adoptons des pratiques de collecte, de stockage et de traitement des données et des mesures de sécurité appropriées pour protéger contre l'accès non autorisé, la modification, la divulgation ou la destruction de vos informations personnelles et des données stockées sur notre Plateforme. Les informations sensibles et privées sont échangées via un canal de communication sécurisé SSL et sont chiffrées.
|
| 215 |
-
</p>
|
| 216 |
-
|
| 217 |
-
<h3 id="partage-tiers" class="text-2xl font-semibold text-white mt-8 mb-3 pt-2">
|
| 218 |
-
4.2. Partage avec des Tiers
|
| 219 |
-
</h3>
|
| 220 |
-
<p class="text-gray-300 mb-6">
|
| 221 |
-
Nous ne vendons, n'échangeons ni ne louons les informations d'identification personnelle des Utilisateurs à des tiers. Nous pouvons partager des informations démographiques agrégées et génériques non liées à des informations d'identification personnelle concernant les visiteurs et les Utilisateurs avec nos partenaires commerciaux, affiliés de confiance et annonceurs à des fins de marketing. Nous utilisons des fournisseurs de services tiers pour nous aider à exploiter notre activité (ex: traitement des paiements), mais ils sont contractuellement obligés de garder vos informations confidentielles.
|
| 222 |
-
</p>
|
| 223 |
-
|
| 224 |
-
<h2 id="droits-utilisateur" class="text-3xl font-bold text-blue-400 mt-10 mb-4 pt-2">
|
| 225 |
-
5. Droits des Utilisateurs (RGPD et autres)
|
| 226 |
-
</h2>
|
| 227 |
-
<p class="text-gray-300 mb-6">
|
| 228 |
-
Conformément aux réglementations applicables (comme le RGPD), vous disposez de droits concernant vos données personnelles :
|
| 229 |
-
</p>
|
| 230 |
-
<ul class="list-disc list-inside text-gray-300 space-y-2 ml-4 mb-6">
|
| 231 |
-
<li>Droit d'accès : Demander une copie des données que nous détenons sur vous.</li>
|
| 232 |
-
<li>Droit de rectification : Demander la correction de données inexactes.</li>
|
| 233 |
-
<li>Droit à l'oubli : Demander la suppression de vos données dans certaines conditions.</li>
|
| 234 |
-
<li>Droit à la limitation : Demander la limitation du traitement.</li>
|
| 235 |
-
</ul>
|
| 236 |
-
<p class="text-gray-300 mb-6">
|
| 237 |
-
Pour exercer l'un de ces droits, veuillez nous contacter via notre page de support. Nous répondrons à votre demande dans un délai légal.
|
| 238 |
-
</p>
|
| 239 |
-
|
| 240 |
-
<h2 id="modifications-politique" class="text-3xl font-bold text-blue-400 mt-10 mb-4 pt-2">
|
| 241 |
-
6. Modifications de cette politique
|
| 242 |
-
</h2>
|
| 243 |
-
<p class="text-gray-300 mb-6">
|
| 244 |
-
Nexus a la discrétion de mettre à jour cette politique de confidentialité à tout moment. Lorsque nous le ferons, nous réviserons la date de "Dernière mise à jour" au début de cette page. Nous encourageons les Utilisateurs à consulter fréquemment cette page pour tout changement. Vous reconnaissez et acceptez qu'il est de votre responsabilité de consulter périodiquement cette politique de confidentialité et de prendre connaissance des modifications.
|
| 245 |
-
</p>
|
| 246 |
-
|
| 247 |
-
<div class="mt-12 text-center">
|
| 248 |
-
<a href="/" class="px-6 py-3 bg-blue-600 text-white text-lg font-bold hover:bg-blue-700 transition duration-300 btn-square shadow-xl">
|
| 249 |
-
Retour à l'Accueil
|
| 250 |
-
</a>
|
| 251 |
-
</div>
|
| 252 |
-
|
| 253 |
-
</div>
|
| 254 |
-
|
| 255 |
-
<div class="lg:w-1/4 pt-4 sticky top-0 h-full lg:h-screen lg:overflow-y-auto js-toc-container">
|
| 256 |
-
<div class="lg:sticky lg:top-24 p-4 border border-gray-700 bg-gray-800/50">
|
| 257 |
-
<h3 class="text-xl font-semibold mb-4 text-blue-500">Navigation Rapide</h3>
|
| 258 |
-
<div class="js-toc"></div>
|
| 259 |
-
</div>
|
| 260 |
-
</div>
|
| 261 |
-
|
| 262 |
-
</main>
|
| 263 |
-
|
| 264 |
-
</div>
|
| 265 |
-
|
| 266 |
-
</div>
|
| 267 |
-
|
| 268 |
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.21.0/tocbot.min.js"></script>
|
| 269 |
-
<script>
|
| 270 |
-
document.addEventListener('DOMContentLoaded', function() {
|
| 271 |
-
tocbot.init({
|
| 272 |
-
tocSelector: '.js-toc',
|
| 273 |
-
contentSelector: '.js-toc-content',
|
| 274 |
-
headingSelector: 'h2, h3',
|
| 275 |
-
hasSmoothScroll: true,
|
| 276 |
-
headingsOffset: 120, // Ajusté pour le header fixe
|
| 277 |
-
scrollSmoothOffset: -120, // Ajusté pour le header fixe
|
| 278 |
-
});
|
| 279 |
-
});
|
| 280 |
-
|
| 281 |
-
// Étape 3 : Logique de bascule du mode sombre/clair
|
| 282 |
-
const themeToggle = document.getElementById('theme-toggle');
|
| 283 |
-
const htmlElement = document.documentElement;
|
| 284 |
-
const iconElement = themeToggle.querySelector('.material-symbols-rounded');
|
| 285 |
-
|
| 286 |
-
// Charger le thème depuis le localStorage
|
| 287 |
-
const savedTheme = localStorage.getItem('theme');
|
| 288 |
-
if (savedTheme === 'light') {
|
| 289 |
-
htmlElement.classList.add('light');
|
| 290 |
-
iconElement.textContent = 'dark_mode'; // Afficher l'icône sombre
|
| 291 |
-
} else {
|
| 292 |
-
// Thème sombre par défaut
|
| 293 |
-
iconElement.textContent = 'light_mode'; // Afficher l'icône claire
|
| 294 |
-
if (!savedTheme) {
|
| 295 |
-
// S'assurer que le mode sombre est appliqué au chargement si aucun thème n'est sauvegardé
|
| 296 |
-
htmlElement.classList.remove('light');
|
| 297 |
-
localStorage.setItem('theme', 'dark');
|
| 298 |
-
}
|
| 299 |
-
}
|
| 300 |
-
|
| 301 |
-
themeToggle.addEventListener('click', () => {
|
| 302 |
-
if (htmlElement.classList.contains('light')) {
|
| 303 |
-
// Passer au mode sombre
|
| 304 |
-
htmlElement.classList.remove('light');
|
| 305 |
-
localStorage.setItem('theme', 'dark');
|
| 306 |
-
iconElement.textContent = 'light_mode'; // Afficher l'icône claire
|
| 307 |
-
} else {
|
| 308 |
-
// Passer au mode clair
|
| 309 |
-
htmlElement.classList.add('light');
|
| 310 |
-
localStorage.setItem('theme', 'light');
|
| 311 |
-
iconElement.textContent = 'dark_mode'; // Afficher l'icône sombre
|
| 312 |
-
}
|
| 313 |
-
});
|
| 314 |
-
</script>
|
| 315 |
-
|
| 316 |
-
<footer class="mt-16 border-t border-gray-700">
|
| 317 |
-
<div class="container mx-auto p-4 sm:p-6 lg:p-8 max-w-7xl">
|
| 318 |
-
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 text-sm">
|
| 319 |
-
|
| 320 |
-
<div class="col-span-2 lg:col-span-1">
|
| 321 |
-
<a href="/" class="text-3xl font-extrabold text-blue-500 tracking-wider">NEXUS</a>
|
| 322 |
-
<p class="mt-3 text-gray-400">
|
| 323 |
-
L'infrastructure API qui propulse votre avenir technologique.
|
| 324 |
-
</p>
|
| 325 |
-
<div class="mt-4 flex space-x-4">
|
| 326 |
-
<a href="#" class="text-gray-400 hover:text-blue-500 transition duration-200">
|
| 327 |
-
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2.163c3.204 0 3.584.014 4.85.07c3.275.146 4.47 1.583 4.61 4.85.056 1.266.07 1.646.07 4.85s-.014 3.584-.07 4.85c-.14 3.267-1.335 4.704-4.61 4.85-1.266.056-1.646.07-4.85.07s-3.584-.014-4.85-.07c-3.275-.146-4.47-1.583-4.61-4.85-.056-1.266-.07-1.646-.07-4.85s.014-3.584.07-4.85c.14-3.267 1.335-4.704 4.61-4.85 1.266-.056 1.646-.07 4.85-.07zM12 0c-3.784 0-4.285.016-5.773.083-4.722.211-6.755 2.24-6.965 6.965C.016 7.715 0 8.216 0 12s.016 4.285.083 5.773c.21 4.721 2.239 6.755 6.965 6.965 1.488.067 1.99.083 5.773.083s4.285-.016 5.773-.083c4.721-.21 6.755-2.239 6.965-6.965.067-1.488.083-1.99.083-5.773s-.016-4.285-.083-5.773c-.21-4.722-2.239-6.755-6.965-6.965C16.285.016 15.784 0 12 0zm0 14.5c-1.381 0-2.5-1.119-2.5-2.5s1.119-2.5 2.5-2.5 2.5 1.119 2.5 2.5-1.119 2.5-2.5 2.5z"/></svg>
|
| 328 |
-
</a>
|
| 329 |
-
</div>
|
| 330 |
-
</div>
|
| 331 |
-
|
| 332 |
-
<div>
|
| 333 |
-
<h3 class="text-lg font-semibold text-white mb-4">Plateforme</h3>
|
| 334 |
-
<ul class="space-y-3 text-gray-400">
|
| 335 |
-
<li><a href="/mindus/nexus/tarifs" class="hover:text-blue-500 transition duration-200">Tarifs</a></li>
|
| 336 |
-
<li><a href="/mindus/nexus/documentation" class="hover:text-blue-500 transition duration-200">Documentation</a></li>
|
| 337 |
-
<li><a href="/mindus/nexus/connexion" class="hover:text-blue-500 transition duration-200">Connexion</a></li>
|
| 338 |
-
<li><a href="/mindus/nexus/support" class="hover:text-blue-500 transition duration-200">Support</a></li>
|
| 339 |
-
</ul>
|
| 340 |
-
</div>
|
| 341 |
-
|
| 342 |
-
<div>
|
| 343 |
-
<h3 class="text-lg font-semibold text-white mb-4">Légal</h3>
|
| 344 |
-
<ul class="space-y-3 text-gray-400">
|
| 345 |
-
<li><a href="/mindus/nexus/politique-confidentialite" class="hover:text-blue-500 transition duration-200">Politique de Confidentialité</a></li>
|
| 346 |
-
<li><a href="/mindus/nexus/mentions-legales" class="hover:text-blue-500 transition duration-200">Mentions Légales</a></li>
|
| 347 |
-
<li><a href="/mindus/nexus/conditions-utilisation" class="hover:text-blue-500 transition duration-200">Conditions d'Utilisation</a></li>
|
| 348 |
-
<li><a href="/mindus/nexus/a-propos" class="hover:text-blue-500 transition duration-200">À Propos</a></li>
|
| 349 |
-
</ul>
|
| 350 |
-
</div>
|
| 351 |
-
|
| 352 |
-
<div class="col-span-2 md:col-span-1">
|
| 353 |
-
<h3 class="text-lg font-semibold text-white mb-4">Ressources</h3>
|
| 354 |
-
<ul class="space-y-3 text-gray-400">
|
| 355 |
-
<li><a href="mailto:support@nexus.com" class="hover:text-blue-500 transition duration-200">Contact Email</a></li>
|
| 356 |
-
<li><a href="/mindus/nexus/dashboard" class="hover:text-blue-500 transition duration-200">Espace Client</a></li>
|
| 357 |
-
<li><a href="/mindus/nexus/api-logs" class="hover:text-blue-500 transition duration-200">Statut API</a></li>
|
| 358 |
-
</ul>
|
| 359 |
-
</div>
|
| 360 |
-
|
| 361 |
-
</div>
|
| 362 |
-
|
| 363 |
-
<div class="mt-10 pt-6 border-t border-gray-800 text-center text-gray-500 text-sm">
|
| 364 |
-
© 2025 GitForge. Tous droits réservés. Construit pour l'ère des microservices.
|
| 365 |
-
</div>
|
| 366 |
-
</div>
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/fredo/branch/eai/upload_file.html
DELETED
|
@@ -1,463 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="fr">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>GitForge | Importer des Fichiers</title>
|
| 7 |
-
<link rel="icon" type="image/png" href="https://i.imgur.com/7Gn3toV.png">
|
| 8 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
|
| 10 |
-
<link rel="stylesheet"
|
| 11 |
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 12 |
-
<style>
|
| 13 |
-
/* Configuration de la police Inter */
|
| 14 |
-
body { font-family: 'Inter', sans-serif; }
|
| 15 |
-
|
| 16 |
-
/* Variables de Thème (Mode Clair forcé pour cette page) */
|
| 17 |
-
:root {
|
| 18 |
-
--bg-page: #FFFFFF;
|
| 19 |
-
--bg-header: #F6F8FA;
|
| 20 |
-
--bg-card: #FFFFFF;
|
| 21 |
-
--bg-active: #F3F4F6;
|
| 22 |
-
--border-color: #D0D7DE;
|
| 23 |
-
--text-color: #24292F;
|
| 24 |
-
--text-secondary: #57606A;
|
| 25 |
-
--text-link: #0969DA;
|
| 26 |
-
--primary-color: #2DA44E; /* Bouton Commit (Vert) */
|
| 27 |
-
--primary-hover: #2C974B;
|
| 28 |
-
--dropzone-bg: #F6F8FA;
|
| 29 |
-
}
|
| 30 |
-
|
| 31 |
-
/* Classes utilitaires pour les variables */
|
| 32 |
-
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 33 |
-
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 34 |
-
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 35 |
-
.text-link-var { color: var(--text-link); } .hover\:text-link-hover-var:hover { color: var(--text-link); }
|
| 36 |
-
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 37 |
-
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 38 |
-
.bg-dropzone-var { background-color: var(--dropzone-bg); }
|
| 39 |
-
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 40 |
-
|
| 41 |
-
/* Style spécifique pour la barre de navigation */
|
| 42 |
-
.repo-nav-link { padding: 0.5rem 1rem; border-bottom: 2px solid transparent; margin-right: 0.5rem; }
|
| 43 |
-
.repo-nav-link.active { border-bottom-color: var(--text-link); color: var(--text-color) !important; font-weight: 600; }
|
| 44 |
-
|
| 45 |
-
/* Styles pour la zone de glisser-déposer */
|
| 46 |
-
#drop-area { transition: border-color 0.2s, background-color 0.2s; }
|
| 47 |
-
.drag-over { border-color: var(--text-link) !important; background-color: var(--bg-active) !important; }
|
| 48 |
-
|
| 49 |
-
/* Style du loader (cercle tournant) */
|
| 50 |
-
.loader {
|
| 51 |
-
border: 4px solid rgba(255, 255, 255, 0.3);
|
| 52 |
-
border-top: 4px solid #ffffff; /* Couleur du cercle tournant */
|
| 53 |
-
border-radius: 50%;
|
| 54 |
-
width: 20px;
|
| 55 |
-
height: 20px;
|
| 56 |
-
animation: spin 1s linear infinite;
|
| 57 |
-
}
|
| 58 |
-
|
| 59 |
-
@keyframes spin {
|
| 60 |
-
0% { transform: rotate(0deg); }
|
| 61 |
-
100% { transform: rotate(360deg); }
|
| 62 |
-
}
|
| 63 |
-
</style>
|
| 64 |
-
</head>
|
| 65 |
-
|
| 66 |
-
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 67 |
-
|
| 68 |
-
<header class="w-full bg-header-var border-b border-color-var">
|
| 69 |
-
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 70 |
-
<div class="flex justify-between items-center h-16">
|
| 71 |
-
<div class="flex items-center space-x-4">
|
| 72 |
-
<img src="https://i.imgur.com/7Gn3toV.png" alt="GitForge Logo" class="h-6">
|
| 73 |
-
<span class="text-xl font-bold text-color-var">GitForge</span>
|
| 74 |
-
<span class="text-secondary-var">/</span>
|
| 75 |
-
<a id="repo-link" href="/mindus/nexus/repo_files?repo={{ repo_slug }}" class="text-color-var hover:text-link-var text-lg font-semibold">
|
| 76 |
-
<span id="repo-user">{{ user.username if user.username else 'current_user' }}</span> / <span id="repo-name">{{ repo_name if repo_name else repo_slug }}</span>
|
| 77 |
-
</a>
|
| 78 |
-
</div>
|
| 79 |
-
|
| 80 |
-
<div class="flex items-center space-x-3">
|
| 81 |
-
<div class="hidden sm:block">
|
| 82 |
-
<input type="text" placeholder="Type / to search"
|
| 83 |
-
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 84 |
-
</div>
|
| 85 |
-
<button class="p-2 rounded-lg text-secondary-var hover:text-color-var">
|
| 86 |
-
<span class="material-symbols-rounded">notifications</span>
|
| 87 |
-
</button>
|
| 88 |
-
<button class="p-2 rounded-lg text-secondary-var hover:text-color-var">
|
| 89 |
-
<span class="material-symbols-rounded">add</span>
|
| 90 |
-
</button>
|
| 91 |
-
<button onclick="document.getElementById('logout-form').submit();" class="p-2 rounded-full text-secondary-var hover:text-color-var cursor-pointer">
|
| 92 |
-
<span class="material-symbols-rounded">account_circle</span>
|
| 93 |
-
</button>
|
| 94 |
-
<form id="logout-form" action="/api/logout" method="POST" style="display: none;"></form>
|
| 95 |
-
</div>
|
| 96 |
-
</div>
|
| 97 |
-
</div>
|
| 98 |
-
|
| 99 |
-
<div class="w-full border-b border-color-var bg-page-var">
|
| 100 |
-
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 101 |
-
<nav id="repo-nav" class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 102 |
-
<a href="/mindus/nexus/repo_files?repo={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var">
|
| 103 |
-
<span class="material-symbols-rounded text-base align-bottom mr-1">code</span> Code
|
| 104 |
-
</a>
|
| 105 |
-
<a href="/mindus/nexus/upload_file?repo={{ repo_slug }}" class="repo-nav-link active text-color-var">
|
| 106 |
-
<span class="material-symbols-rounded text-base align-bottom mr-1">cloud_upload</span> Importer
|
| 107 |
-
</a>
|
| 108 |
-
</nav>
|
| 109 |
-
</div>
|
| 110 |
-
</div>
|
| 111 |
-
</header>
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
<div id="main-content" class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
| 115 |
-
|
| 116 |
-
<div id="flash-container" class="mb-4">
|
| 117 |
-
</div>
|
| 118 |
-
|
| 119 |
-
<h1 class="text-xl font-light text-secondary-var mb-6">
|
| 120 |
-
<a id="breadcrumb-repo-link" href="/mindus/nexus/repo_files?repo={{ repo_slug }}" class="text-link-var hover:text-link-hover-var">{{ repo_name if repo_name else repo_slug }}</a> /
|
| 121 |
-
<span class="text-color-var">Ajouter des fichiers via import</span>
|
| 122 |
-
</h1>
|
| 123 |
-
|
| 124 |
-
<div id="drop-area" class="bg-dropzone-var border-2 border-dashed border-color-var rounded-lg p-16 text-center mb-8 hover:border-text-link hover:bg-active-var transition-colors-theme">
|
| 125 |
-
<span class="material-symbols-rounded text-6xl text-secondary-var mx-auto mb-4">description</span>
|
| 126 |
-
<p class="text-lg font-semibold text-color-var mb-2">
|
| 127 |
-
Glissez des fichiers additionnels ici pour les ajouter à votre dépôt
|
| 128 |
-
</p>
|
| 129 |
-
<p class="text-sm text-secondary-var">
|
| 130 |
-
Ou <label for="file-upload" class="text-link-var cursor-pointer hover:underline">choisissez vos fichiers (Max 50 à la fois)</label>
|
| 131 |
-
</p>
|
| 132 |
-
<input type="file" id="file-upload" multiple class="hidden" accept="*/*">
|
| 133 |
-
</div>
|
| 134 |
-
|
| 135 |
-
<div id="file-list-header" class="hidden text-sm font-semibold text-secondary-var mb-2 ml-1">Fichiers en attente: <span id="file-count">0</span></div>
|
| 136 |
-
<div id="file-list" class="space-y-4 mb-10">
|
| 137 |
-
</div>
|
| 138 |
-
|
| 139 |
-
<form id="commit-form" class="bg-card-var p-6 rounded-lg border border-color-var shadow-lg">
|
| 140 |
-
<h2 class="text-lg font-semibold text-color-var mb-4">Commit changes</h2>
|
| 141 |
-
|
| 142 |
-
<input type="text" id="commit-title" placeholder="Add files via upload"
|
| 143 |
-
class="w-full p-2 mb-3 border border-color-var rounded-lg focus:outline-none focus:ring-2 focus:ring-link-var bg-page-var text-color-var transition-colors-theme"
|
| 144 |
-
value="Add files via upload"
|
| 145 |
-
required>
|
| 146 |
-
|
| 147 |
-
<textarea id="commit-description" placeholder="Add an optional extended description..." rows="4"
|
| 148 |
-
class="w-full p-2 mb-6 border border-color-var rounded-lg focus:outline-none focus:ring-2 focus:ring-link-var bg-page-var text-color-var transition-colors-theme resize-none"></textarea>
|
| 149 |
-
|
| 150 |
-
<div class="space-y-3 mb-6">
|
| 151 |
-
<div class="flex items-start">
|
| 152 |
-
<input type="radio" id="commit-main" name="branch-option" value="main" checked
|
| 153 |
-
class="mt-1 mr-2 text-link-var focus:ring-link-var border-color-var">
|
| 154 |
-
<label for="commit-main" class="text-sm text-color-var">
|
| 155 |
-
<span class="material-symbols-rounded text-base mr-1 align-bottom">subdirectory_arrow_right</span>
|
| 156 |
-
Commit directly to the <span class="font-semibold">main</span> branch.
|
| 157 |
-
</label>
|
| 158 |
-
</div>
|
| 159 |
-
|
| 160 |
-
<div class="flex items-start">
|
| 161 |
-
<input type="radio" id="commit-new-branch" name="branch-option" value="new"
|
| 162 |
-
class="mt-1 mr-2 text-link-var focus:ring-link-var border-color-var">
|
| 163 |
-
<label for="commit-new-branch" class="text-sm text-color-var">
|
| 164 |
-
Commit to a <span class="font-semibold">new branch</span> and start a pull request.
|
| 165 |
-
</label>
|
| 166 |
-
</div>
|
| 167 |
-
</div>
|
| 168 |
-
|
| 169 |
-
<div id="new-branch-input" class="mb-6 hidden">
|
| 170 |
-
<input type="text" id="new-branch-name" placeholder="Branch name (ex: add-upload-files)"
|
| 171 |
-
class="w-full p-2 border border-color-var rounded-lg focus:outline-none focus:ring-2 focus:ring-link-var bg-page-var text-color-var transition-colors-theme">
|
| 172 |
-
</div>
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
<button type="submit" id="commit-button"
|
| 176 |
-
class="bg-primary-color-var hover:bg-primary-hover-var text-white font-semibold py-2 px-4 rounded-lg transition-colors duration-200 flex items-center justify-center w-full disabled:opacity-50"
|
| 177 |
-
disabled>
|
| 178 |
-
<span id="loader" class="loader mr-2 hidden"></span>
|
| 179 |
-
<span id="button-text">Commit changes</span>
|
| 180 |
-
</button>
|
| 181 |
-
</form>
|
| 182 |
-
|
| 183 |
-
</div>
|
| 184 |
-
|
| 185 |
-
<footer class="mt-12 py-8 border-t border-color-var text-sm text-secondary-var bg-header-var">
|
| 186 |
-
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 187 |
-
<p class="text-center sm:text-left">
|
| 188 |
-
© 2024 GitForge (Mindus Framework).
|
| 189 |
-
<span class="hidden sm:inline">All rights reserved.</span>
|
| 190 |
-
</p>
|
| 191 |
-
<p class="text-center sm:text-right mt-2 sm:mt-0 space-x-3">
|
| 192 |
-
<a href="#" class="hover:text-link-var">Docs</a> · <a href="#" class="hover:text-link-var">Contact</a> · <a href="#" class="hover:text-link-var">Terms</a> · <a href="#" class="hover:text-link-var">Privacy</a> · <a href="#" class="hover:text-link-var">Security</a> · <a href="#" class="hover:text-link-var">Status</a>
|
| 193 |
-
</p>
|
| 194 |
-
</div>
|
| 195 |
-
</footer>
|
| 196 |
-
|
| 197 |
-
<script>
|
| 198 |
-
// --- VARIABLES GLOBALES ET SETUP ---
|
| 199 |
-
const dropArea = document.getElementById('drop-area');
|
| 200 |
-
const fileUpload = document.getElementById('file-upload');
|
| 201 |
-
const fileListContainer = document.getElementById('file-list');
|
| 202 |
-
const commitForm = document.getElementById('commit-form');
|
| 203 |
-
const commitButton = document.getElementById('commit-button');
|
| 204 |
-
const buttonText = document.getElementById('button-text');
|
| 205 |
-
const loader = document.getElementById('loader');
|
| 206 |
-
const fileCountSpan = document.getElementById('file-count');
|
| 207 |
-
const fileListHeader = document.getElementById('file-list-header');
|
| 208 |
-
|
| 209 |
-
// VARIABLES INJECTÉES PAR JINJA2 DEPUIS LE SERVEUR
|
| 210 |
-
const REPO_SLUG = "{{ repo_slug }}"; // Clé pour l'API
|
| 211 |
-
const USER_SLUG = "{{ user.username if user.username else 'current_user' }}";
|
| 212 |
-
|
| 213 |
-
// État de la liste de fichiers: contient le File Object réel
|
| 214 |
-
let pendingFiles = [];
|
| 215 |
-
|
| 216 |
-
// --- Fonctions d'interface ---
|
| 217 |
-
|
| 218 |
-
/** Affiche un message d'alerte (succès ou erreur). */
|
| 219 |
-
const displayFlashMessage = (message, type = 'error') => {
|
| 220 |
-
const container = document.getElementById('flash-container');
|
| 221 |
-
const color = type === 'success' ? 'bg-green-100 border-green-400 text-green-700' : 'bg-red-100 border-red-400 text-red-700';
|
| 222 |
-
container.innerHTML = `
|
| 223 |
-
<div class="p-4 border rounded-md ${color}" role="alert">
|
| 224 |
-
<p class="font-bold">${type.toUpperCase()}:</p>
|
| 225 |
-
<p>${message}</p>
|
| 226 |
-
</div>
|
| 227 |
-
`;
|
| 228 |
-
// Supprimer le message après 5 secondes
|
| 229 |
-
setTimeout(() => container.innerHTML = '', 5000);
|
| 230 |
-
};
|
| 231 |
-
|
| 232 |
-
// NOTE: updateHeaderAndLinks n'est plus nécessaire car les valeurs sont injectées par Jinja2.
|
| 233 |
-
// L'ancienne logique a été retirée.
|
| 234 |
-
|
| 235 |
-
/** Formate la taille en octets de manière lisible. */
|
| 236 |
-
const formatBytes = (bytes, decimals = 2) => {
|
| 237 |
-
if (bytes === 0) return '0 Bytes';
|
| 238 |
-
const k = 1024;
|
| 239 |
-
const dm = decimals < 0 ? 0 : decimals;
|
| 240 |
-
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
| 241 |
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
| 242 |
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
| 243 |
-
};
|
| 244 |
-
|
| 245 |
-
/** Retire un fichier de la liste d'attente et met à jour l'affichage. */
|
| 246 |
-
const removeFile = (e) => {
|
| 247 |
-
e.preventDefault();
|
| 248 |
-
const button = e.currentTarget;
|
| 249 |
-
const fileId = button.getAttribute('data-file-id');
|
| 250 |
-
|
| 251 |
-
pendingFiles = pendingFiles.filter(file => file.id !== fileId);
|
| 252 |
-
|
| 253 |
-
// Supprimer l'élément HTML
|
| 254 |
-
document.getElementById(fileId).remove();
|
| 255 |
-
|
| 256 |
-
renderFileList(); // Met à jour le compteur et l'état du bouton
|
| 257 |
-
};
|
| 258 |
-
|
| 259 |
-
/** Met à jour l'affichage de la liste de fichiers et l'état du bouton de commit. */
|
| 260 |
-
const renderFileList = () => {
|
| 261 |
-
fileListContainer.innerHTML = '';
|
| 262 |
-
fileCountSpan.textContent = pendingFiles.length;
|
| 263 |
-
|
| 264 |
-
if (pendingFiles.length > 0) {
|
| 265 |
-
commitButton.removeAttribute('disabled');
|
| 266 |
-
fileListHeader.classList.remove('hidden');
|
| 267 |
-
} else {
|
| 268 |
-
commitButton.setAttribute('disabled', 'disabled');
|
| 269 |
-
fileListHeader.classList.add('hidden');
|
| 270 |
-
}
|
| 271 |
-
|
| 272 |
-
pendingFiles.forEach(file => {
|
| 273 |
-
const fileItem = document.createElement('div');
|
| 274 |
-
fileItem.id = file.id;
|
| 275 |
-
fileItem.className = 'file-item flex justify-between items-center p-4 border border-color-var rounded-lg bg-card-var shadow-sm';
|
| 276 |
-
fileItem.innerHTML = `
|
| 277 |
-
<div class="flex items-center text-sm font-medium truncate">
|
| 278 |
-
<span class="material-symbols-rounded text-lg mr-3 text-secondary-var">description</span>
|
| 279 |
-
<span class="text-color-var">${file.name}</span>
|
| 280 |
-
<span class="text-secondary-var ml-3 text-xs">(${formatBytes(file.fileObject.size)})</span>
|
| 281 |
-
</div>
|
| 282 |
-
<button data-file-id="${file.id}" class="remove-file-btn text-secondary-var hover:text-red-600 transition flex-shrink-0">
|
| 283 |
-
<span class="material-symbols-rounded text-lg">close</span>
|
| 284 |
-
</button>
|
| 285 |
-
`;
|
| 286 |
-
fileListContainer.appendChild(fileItem);
|
| 287 |
-
});
|
| 288 |
-
|
| 289 |
-
// Rattacher les écouteurs de suppression
|
| 290 |
-
document.querySelectorAll('.remove-file-btn').forEach(button => {
|
| 291 |
-
button.addEventListener('click', removeFile);
|
| 292 |
-
});
|
| 293 |
-
};
|
| 294 |
-
|
| 295 |
-
/** Ajoute les fichiers validés à la liste d'attente. */
|
| 296 |
-
const addFiles = (files) => {
|
| 297 |
-
const filesToAdd = Array.from(files).slice(0, 50 - pendingFiles.length); // Limite à 50
|
| 298 |
-
|
| 299 |
-
if (filesToAdd.length === 0 && files.length > 0) {
|
| 300 |
-
displayFlashMessage("Limite de 50 fichiers atteinte. Veuillez commiter ou retirer des fichiers.");
|
| 301 |
-
return;
|
| 302 |
-
}
|
| 303 |
-
|
| 304 |
-
filesToAdd.forEach(file => {
|
| 305 |
-
// Créer un ID unique pour le suivi
|
| 306 |
-
const fileId = 'file-' + Date.now() + '-' + Math.random().toString(36).substring(2, 9);
|
| 307 |
-
|
| 308 |
-
// Vérification de doublons (par nom)
|
| 309 |
-
if (pendingFiles.some(f => f.name === file.name)) {
|
| 310 |
-
displayFlashMessage(`Le fichier "${file.name}" a déjà été sélectionné.`, 'error');
|
| 311 |
-
return;
|
| 312 |
-
}
|
| 313 |
-
|
| 314 |
-
// Ajouter à la liste d'attente
|
| 315 |
-
pendingFiles.push({
|
| 316 |
-
id: fileId,
|
| 317 |
-
name: file.name,
|
| 318 |
-
fileObject: file
|
| 319 |
-
});
|
| 320 |
-
});
|
| 321 |
-
|
| 322 |
-
renderFileList();
|
| 323 |
-
|
| 324 |
-
if (filesToAdd.length < files.length) {
|
| 325 |
-
displayFlashMessage("Attention : La limite de 50 fichiers en attente a été atteinte. Les fichiers restants n'ont pas été ajoutés.", 'error');
|
| 326 |
-
}
|
| 327 |
-
};
|
| 328 |
-
|
| 329 |
-
// --- Gestion du Drag and Drop ---
|
| 330 |
-
|
| 331 |
-
// Prévenir le comportement par défaut (ouverture du fichier)
|
| 332 |
-
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 333 |
-
dropArea.addEventListener(eventName, e => {
|
| 334 |
-
e.preventDefault();
|
| 335 |
-
e.stopPropagation();
|
| 336 |
-
}, false);
|
| 337 |
-
});
|
| 338 |
-
|
| 339 |
-
// Mettre en évidence la zone de dépôt
|
| 340 |
-
['dragenter', 'dragover'].forEach(eventName => {
|
| 341 |
-
dropArea.addEventListener(eventName, () => dropArea.classList.add('drag-over'), false);
|
| 342 |
-
});
|
| 343 |
-
|
| 344 |
-
// Retirer la mise en évidence
|
| 345 |
-
['dragleave', 'drop'].forEach(eventName => {
|
| 346 |
-
dropArea.addEventListener(eventName, () => dropArea.classList.remove('drag-over'), false);
|
| 347 |
-
});
|
| 348 |
-
|
| 349 |
-
// Gérer le dépôt des fichiers
|
| 350 |
-
dropArea.addEventListener('drop', handleDrop, false);
|
| 351 |
-
|
| 352 |
-
function handleDrop(e) {
|
| 353 |
-
const dt = e.dataTransfer;
|
| 354 |
-
const files = dt.files;
|
| 355 |
-
addFiles(files);
|
| 356 |
-
}
|
| 357 |
-
|
| 358 |
-
// Gérer l'ajout via le clic sur "choisissez vos fichiers"
|
| 359 |
-
fileUpload.addEventListener('change', (e) => {
|
| 360 |
-
addFiles(e.target.files);
|
| 361 |
-
// Réinitialiser l'input pour pouvoir re-sélectionner le même fichier
|
| 362 |
-
e.target.value = null;
|
| 363 |
-
});
|
| 364 |
-
|
| 365 |
-
// --- Logique de Soumission (Commit) ---
|
| 366 |
-
|
| 367 |
-
/** Active/désactive l'état de chargement du bouton. */
|
| 368 |
-
const setCommitLoading = (isLoading) => {
|
| 369 |
-
commitButton.disabled = isLoading || pendingFiles.length === 0;
|
| 370 |
-
loader.classList.toggle('hidden', !isLoading);
|
| 371 |
-
buttonText.textContent = isLoading ? 'Commit en cours...' : 'Commit changes';
|
| 372 |
-
};
|
| 373 |
-
|
| 374 |
-
// Gérer l'affichage du champ de nouvelle branche
|
| 375 |
-
document.querySelectorAll('input[name="branch-option"]').forEach(radio => {
|
| 376 |
-
radio.addEventListener('change', () => {
|
| 377 |
-
const newBranchInput = document.getElementById('new-branch-input');
|
| 378 |
-
const newBranchName = document.getElementById('new-branch-name');
|
| 379 |
-
if (radio.value === 'new') {
|
| 380 |
-
newBranchInput.classList.remove('hidden');
|
| 381 |
-
newBranchName.setAttribute('required', 'required');
|
| 382 |
-
} else {
|
| 383 |
-
newBranchInput.classList.add('hidden');
|
| 384 |
-
newBranchName.removeAttribute('required');
|
| 385 |
-
}
|
| 386 |
-
});
|
| 387 |
-
});
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
// Gérer la soumission du formulaire de commit
|
| 391 |
-
commitForm.addEventListener('submit', async (e) => {
|
| 392 |
-
e.preventDefault();
|
| 393 |
-
|
| 394 |
-
if (pendingFiles.length === 0) {
|
| 395 |
-
displayFlashMessage("Veuillez sélectionner au moins un fichier à uploader.", 'error');
|
| 396 |
-
return;
|
| 397 |
-
}
|
| 398 |
-
|
| 399 |
-
setCommitLoading(true);
|
| 400 |
-
|
| 401 |
-
// 1. Collecter les données du formulaire
|
| 402 |
-
const commitTitle = document.getElementById('commit-title').value;
|
| 403 |
-
const commitDescription = document.getElementById('commit-description').value;
|
| 404 |
-
const branchOption = document.querySelector('input[name="branch-option"]:checked').value;
|
| 405 |
-
let branchName = 'main';
|
| 406 |
-
|
| 407 |
-
if (branchOption === 'new') {
|
| 408 |
-
branchName = document.getElementById('new-branch-name').value.trim();
|
| 409 |
-
if (!branchName) {
|
| 410 |
-
displayFlashMessage("Veuillez fournir un nom pour la nouvelle branche.", 'error');
|
| 411 |
-
setCommitLoading(false);
|
| 412 |
-
return;
|
| 413 |
-
}
|
| 414 |
-
}
|
| 415 |
-
|
| 416 |
-
// 2. Construire l'objet FormData
|
| 417 |
-
const formData = new FormData();
|
| 418 |
-
formData.append('commit_title', commitTitle);
|
| 419 |
-
formData.append('commit_description', commitDescription);
|
| 420 |
-
formData.append('branch_name', branchName);
|
| 421 |
-
|
| 422 |
-
// Ajouter tous les fichiers
|
| 423 |
-
pendingFiles.forEach(file => {
|
| 424 |
-
formData.append('files', file.fileObject, file.name);
|
| 425 |
-
});
|
| 426 |
-
|
| 427 |
-
// 3. Envoyer la requête à l'API
|
| 428 |
-
try {
|
| 429 |
-
// Utilise le REPO_SLUG injecté
|
| 430 |
-
const response = await fetch(`/api/files/${REPO_SLUG}/upload`, {
|
| 431 |
-
method: 'POST',
|
| 432 |
-
// Ne PAS définir 'Content-Type': 'multipart/form-data', le navigateur le fait avec le boundary
|
| 433 |
-
body: formData
|
| 434 |
-
});
|
| 435 |
-
|
| 436 |
-
const result = await response.json();
|
| 437 |
-
|
| 438 |
-
if (response.ok) {
|
| 439 |
-
// Succès: Afficher le message de succès et rediriger
|
| 440 |
-
displayFlashMessage(result.message || `Fichiers ajoutés et commités avec succès au dépôt ${REPO_SLUG}!`, 'success');
|
| 441 |
-
// Redirection vers la page du dépôt
|
| 442 |
-
setTimeout(() => {
|
| 443 |
-
window.location.href = `/mindus/nexus/repo_files?repo=${REPO_SLUG}`;
|
| 444 |
-
}, 1000);
|
| 445 |
-
} else {
|
| 446 |
-
// Échec de l'API
|
| 447 |
-
const errorMessage = result.message || "Erreur inconnue lors du commit.";
|
| 448 |
-
displayFlashMessage(errorMessage, 'error');
|
| 449 |
-
}
|
| 450 |
-
} catch (error) {
|
| 451 |
-
console.error('Erreur réseau ou interne:', error);
|
| 452 |
-
displayFlashMessage("Erreur réseau ou interne lors du commit. Veuillez réessayer.", 'error');
|
| 453 |
-
} finally {
|
| 454 |
-
setCommitLoading(false); // Arrêter l'animation même en cas d'erreur
|
| 455 |
-
}
|
| 456 |
-
});
|
| 457 |
-
|
| 458 |
-
// Initialisation
|
| 459 |
-
// updateHeaderAndLinks() est retiré car Jinja2 le gère.
|
| 460 |
-
renderFileList(); // Afficher la liste vide au démarrage (pas de fichiers par défaut)
|
| 461 |
-
</script>
|
| 462 |
-
</body>
|
| 463 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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