Add files via upload
Browse files- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/a_propos.html +843 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/all_stories.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/api_create_key.html +582 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/blog.html +768 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/careers.html +625 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/chat.html +1799 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/checkout.html +278 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/conditions_utilisation.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/connexion.html +157 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/create_new_issue.html +408 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/customers_stories.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/dashboard.html +381 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/dependencies.html +371 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/devops.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/devsecops.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/documentation.html +285 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/dynamic_and_static.html +484 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/editor.html +1004 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/form_gitforge.html +650 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/gitforge_copilot.html +2082 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/index.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/inscription.html +204 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/media_image.html +600 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/mentions_legales.html +739 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/mot_de_passe_oublie.html +201 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/new_branch.html +564 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/new_issue.html +853 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/new_pull_requests.html +632 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/nouveau_project.html +379 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/phtnjdjbejeuefwkq.html +98 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/politique_confidentialite.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/profile.html +335 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/pull_requests.html +562 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/repo_files.html +446 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/repo_files_branch.html +760 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/resources.html +0 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/script.js +373 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/security.html +358 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/settings.html +1105 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/statut.html +457 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/support.html +303 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/tarifs.html +826 -0
- a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/upload_file.html +474 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
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title data-translate="page-title">GitForge: Navigation Hub</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
+
<style>
|
| 12 |
+
/* Custom Tailwind Configuration */
|
| 13 |
+
.bg-header { background-color: #f7f9fc; }
|
| 14 |
+
.header-border { border-color: #e5e7eb; }
|
| 15 |
+
.text-blue-600-var { color: #2563eb; }
|
| 16 |
+
.border-blue-600-var { border-color: #2563eb; }
|
| 17 |
+
.bg-blue-600-var { background-color: #2563eb; }
|
| 18 |
+
.hover\:bg-blue-700-var:hover { background-color: #1d4ed8; }
|
| 19 |
+
.text-gray-900-var { color: #1f2937; }
|
| 20 |
+
|
| 21 |
+
/* Updated Hero Section Style with new image */
|
| 22 |
+
.hero {
|
| 23 |
+
background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1600&q=80') no-repeat center center/cover;
|
| 24 |
+
height: 80vh;
|
| 25 |
+
color: white;
|
| 26 |
+
display: flex;
|
| 27 |
+
flex-direction: column;
|
| 28 |
+
justify-content: center;
|
| 29 |
+
align-items: center;
|
| 30 |
+
text-align: center;
|
| 31 |
+
padding-top: 5em;
|
| 32 |
+
text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
|
| 33 |
+
transition: background-image 0.3s;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
/* Ensure the language dropdown is visible and styled for the new dark footer */
|
| 37 |
+
.lang-dropdown-container {
|
| 38 |
+
position: relative;
|
| 39 |
+
}
|
| 40 |
+
/* Style for the new dark footer for better contrast */
|
| 41 |
+
.footer-dark-bg { background-color: #1f2937; } /* Equivalent to bg-gray-900 */
|
| 42 |
+
.footer-text-light { color: #d1d5db; } /* Equivalent to text-gray-300 */
|
| 43 |
+
.footer-link-hover:hover { color: #60a5fa; } /* Equivalent to hover:text-blue-400 */
|
| 44 |
+
.footer-border-dark { border-color: #374151; } /* Equivalent to border-gray-700 */
|
| 45 |
+
</style>
|
| 46 |
+
</head>
|
| 47 |
+
<body class="bg-white text-gray-900 font-sans">
|
| 48 |
+
|
| 49 |
+
<header class="border-b border-gray-200">
|
| 50 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
|
| 51 |
+
<div class="flex items-center space-x-8">
|
| 52 |
+
<a href="#" class="text-2xl font-bold text-gray-900 flex items-center">
|
| 53 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6 w-6 mr-2">
|
| 54 |
+
<span data-translate="site-name">GitForge</span>
|
| 55 |
+
</a>
|
| 56 |
+
<nav class="hidden md:flex space-x-6 text-sm font-medium text-gray-700">
|
| 57 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-blue-600-var" data-translate="nav-platform">Platform</a>
|
| 58 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-solutions">Company</a>
|
| 59 |
+
<a href="/mindus/nexus/resources" class="hover:text-blue-600-var" data-translate="nav-resources">Resources</a>
|
| 60 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-opensource">Contact us</a>
|
| 61 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var text-blue-600-var" data-translate="nav-about-us">Hub</a>
|
| 62 |
+
<a href="/mindus/nexus/tarifs" class="hover:text-blue-600-var" data-translate="nav-pricing">Pricing</a>
|
| 63 |
+
</nav>
|
| 64 |
+
</div>
|
| 65 |
+
<div class="flex items-center space-x-4">
|
| 66 |
+
<button class="text-gray-700 hover:text-blue-600-var" aria-label="Search">
|
| 67 |
+
<i class="fas fa-search"></i>
|
| 68 |
+
</button>
|
| 69 |
+
<a href="/mindus/nexus/connexion" class="hidden sm:inline text-sm font-medium text-gray-700 hover:text-blue-600-var" data-translate="btn-sign-in">Sign in</a>
|
| 70 |
+
<a href="/mindus/nexus/inscription" class="px-4 py-2 text-sm font-medium border border-gray-300 rounded-md text-gray-700 hover:border-blue-600-var hover:text-blue-600-var transition" data-translate="btn-sign-up">Sign up</a>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
</header>
|
| 74 |
+
|
| 75 |
+
<main>
|
| 76 |
+
<section class="hero" id="top-hero">
|
| 77 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 78 |
+
<h1 class="text-5xl md:text-7xl font-extrabold mb-6" data-translate="about-hero-title">Driving Innovation, Powering the Future of Software.</h1>
|
| 79 |
+
<p class="text-xl md:text-2xl font-light mb-8 max-w-4xl mx-auto" data-translate="about-hero-subtitle">GitForge is the world's leading AI-powered developer platform, committed to accelerating human progress through collaboration and open source.</p>
|
| 80 |
+
<a href="#navigation-hub" class="inline-block bg-blue-600-var hover:bg-blue-700-var text-white font-medium py-3 px-8 rounded-md transition duration-300 text-lg" data-translate="about-btn-learn-more">Discover Our Hub</a>
|
| 81 |
+
</div>
|
| 82 |
+
</section>
|
| 83 |
+
|
| 84 |
+
<section class="py-16 md:py-24 bg-gray-50" id="company-data">
|
| 85 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 86 |
+
<h2 class="text-3xl font-bold text-gray-900-var text-center mb-12" data-translate="stats-title">GitForge at a Glance</h2>
|
| 87 |
+
<div class="grid grid-cols-2 lg:grid-cols-4 gap-8 text-center">
|
| 88 |
+
<div class="p-4">
|
| 89 |
+
<p class="text-5xl font-extrabold text-blue-600-var" data-translate="stat-devs">150k+</p>
|
| 90 |
+
<p class="text-lg font-medium text-gray-700 mt-2" data-translate="stat-devs-label">Developers</p>
|
| 91 |
+
</div>
|
| 92 |
+
<div class="p-4">
|
| 93 |
+
<p class="text-5xl font-extrabold text-blue-600-var" data-translate="stat-orgs">3k+</p>
|
| 94 |
+
<p class="text-lg font-medium text-gray-700 mt-2" data-translate="stat-orgs-label">Organizations</p>
|
| 95 |
+
</div>
|
| 96 |
+
<div class="p-4">
|
| 97 |
+
<p class="text-5xl font-extrabold text-blue-600-var" data-translate="stat-repos">120k+</p>
|
| 98 |
+
<p class="text-lg font-medium text-gray-700 mt-2" data-translate="stat-repos-label">Repositories</p>
|
| 99 |
+
</div>
|
| 100 |
+
<div class="p-4">
|
| 101 |
+
<p class="text-5xl font-extrabold text-blue-600-var" data-translate="stat-fortune">90%</p>
|
| 102 |
+
<p class="text-lg font-medium text-gray-700 mt-2" data-translate="stat-fortune-label">Fortune 100 Coverage</p>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</section>
|
| 107 |
+
|
| 108 |
+
<section class="py-16 md:py-24 bg-white" id="navigation-hub">
|
| 109 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 110 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var text-center mb-4" data-translate="hub-title">The GitForge Hub</h2>
|
| 111 |
+
<p class="text-xl text-gray-700 text-center mb-16 max-w-3xl mx-auto" data-translate="hub-subtitle">Your navigation center to all GitForge resources and product sections.</p>
|
| 112 |
+
|
| 113 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
| 114 |
+
<a href="/mindus/nexus/blog" class="block p-8 bg-gray-50 rounded-lg border border-gray-200 shadow-md hover:shadow-xl hover:border-blue-600-var transition duration-300 group">
|
| 115 |
+
<i class="fas fa-rss text-3xl text-blue-600-var mb-4 transition group-hover:scale-105"></i>
|
| 116 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2" data-translate="card-title-1">Tech Blog</h3>
|
| 117 |
+
<p class="text-gray-600" data-translate="card-desc-1">Stay updated with our latest articles, engineering insights, and product updates.</p>
|
| 118 |
+
<span class="mt-4 inline-block text-sm font-medium text-blue-600-var group-hover:text-blue-700-var transition">Navigate →</span>
|
| 119 |
+
</a>
|
| 120 |
+
<a href="/mindus/nexus/mission" class="block p-8 bg-gray-50 rounded-lg border border-gray-200 shadow-md hover:shadow-xl hover:border-blue-600-var transition duration-300 group">
|
| 121 |
+
<i class="fas fa-handshake text-3xl text-blue-600-var mb-4 transition group-hover:scale-105"></i>
|
| 122 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2" data-translate="card-title-2">Our Mission & Values</h3>
|
| 123 |
+
<p class="text-gray-600" data-translate="card-desc-2">Discover the core principles that drive GitForge and our commitment to the developer community.</p>
|
| 124 |
+
<span class="mt-4 inline-block text-sm font-medium text-blue-600-var group-hover:text-blue-700-var transition">Navigate →</span>
|
| 125 |
+
</a>
|
| 126 |
+
<a href="/mindus/nexus/advocacy" class="block p-8 bg-gray-50 rounded-lg border border-gray-200 shadow-md hover:shadow-xl hover:border-blue-600-var transition duration-300 group">
|
| 127 |
+
<i class="fas fa-gavel text-3xl text-blue-600-var mb-4 transition group-hover:scale-105"></i>
|
| 128 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2" data-translate="card-title-3">Developer Advocacy</h3>
|
| 129 |
+
<p class="text-gray-600" data-translate="card-desc-3">Learn how we fight for developer rights and shape policies that protect open source innovation.</p>
|
| 130 |
+
<span class="mt-4 inline-block text-sm font-medium text-blue-600-var group-hover:text-blue-700-var transition">Navigate →</span>
|
| 131 |
+
</a>
|
| 132 |
+
<a href="/mindus/nexus/customers" class="block p-8 bg-gray-50 rounded-lg border border-gray-200 shadow-md hover:shadow-xl hover:border-blue-600-var transition duration-300 group">
|
| 133 |
+
<i class="fas fa-award text-3xl text-blue-600-var mb-4 transition group-hover:scale-105"></i>
|
| 134 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2" data-translate="card-title-4">Customer Stories</h3>
|
| 135 |
+
<p class="text-gray-600" data-translate="card-desc-4">Read success stories from global leaders and innovative companies building on the GitForge platform.</p>
|
| 136 |
+
<span class="mt-4 inline-block text-sm font-medium text-blue-600-var group-hover:text-blue-700-var transition">Navigate →</span>
|
| 137 |
+
</a>
|
| 138 |
+
<a href="/mindus/nexus/community" class="block p-8 bg-gray-50 rounded-lg border border-gray-200 shadow-md hover:shadow-xl hover:border-blue-600-var transition duration-300 group">
|
| 139 |
+
<i class="fas fa-users text-3xl text-blue-600-var mb-4 transition group-hover:scale-105"></i>
|
| 140 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2" data-translate="card-title-5">Community</h3>
|
| 141 |
+
<p class="text-gray-600" data-translate="card-desc-5">Explore our community initiatives, open source projects, and efforts to promote diversity and inclusion.</p>
|
| 142 |
+
<span class="mt-4 inline-block text-sm font-medium text-blue-600-var group-hover:text-blue-700-var transition">Navigate →</span>
|
| 143 |
+
</a>
|
| 144 |
+
<a href="/mindus/nexus/engineering" class="block p-8 bg-gray-50 rounded-lg border border-gray-200 shadow-md hover:shadow-xl hover:border-blue-600-var transition duration-300 group">
|
| 145 |
+
<i class="fas fa-cogs text-3xl text-blue-600-var mb-4 transition group-hover:scale-105"></i>
|
| 146 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2" data-translate="card-title-6">Engineering</h3>
|
| 147 |
+
<p class="text-gray-600" data-translate="card-desc-6">Get a deep dive into our core technology, system status, and cutting-edge AI innovations.</p>
|
| 148 |
+
<span class="mt-4 inline-block text-sm font-medium text-blue-600-var group-hover:text-blue-700-var transition">Navigate →</span>
|
| 149 |
+
</a>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
</section>
|
| 153 |
+
</main>
|
| 154 |
+
|
| 155 |
+
<footer class="mt-20 py-10 bg-gray-900 border-t border-gray-700">
|
| 156 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 157 |
+
<div class="grid grid-cols-4 gap-8 text-sm">
|
| 158 |
+
<div class="col-span-4 md:col-span-1">
|
| 159 |
+
<h3 data-translate="site-name" class="text-2xl font-bold text-blue-400 mb-4">GitForge</h3>
|
| 160 |
+
<p data-translate="footer-slogan" class="text-gray-400">The unified DevOps platform that accelerates your software lifecycle.</p>
|
| 161 |
+
<div class="flex space-x-4 mt-6">
|
| 162 |
+
<a href="#" aria-label="Twitter" class="text-gray-400 hover:text-blue-400 transition duration-200">
|
| 163 |
+
<i class="fab fa-twitter text-xl"></i>
|
| 164 |
+
</a>
|
| 165 |
+
<a href="#" aria-label="LinkedIn" class="text-gray-400 hover:text-blue-400 transition duration-200">
|
| 166 |
+
<i class="fab fa-linkedin-in text-xl"></i>
|
| 167 |
+
</a>
|
| 168 |
+
<a href="#" aria-label="Facebook" class="text-gray-400 hover:text-blue-400 transition duration-200">
|
| 169 |
+
<i class="fab fa-facebook-f text-xl"></i>
|
| 170 |
+
</a>
|
| 171 |
+
<a href="#" aria-label="GitHub" class="text-gray-400 hover:text-blue-400 transition duration-200">
|
| 172 |
+
<i class="fab fa-github text-xl"></i>
|
| 173 |
+
</a>
|
| 174 |
+
<a href="#" aria-label="YouTube" class="text-gray-400 hover:text-blue-400 transition duration-200">
|
| 175 |
+
<i class="fab fa-youtube text-xl"></i>
|
| 176 |
+
</a>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
<div class="col-span-2 md:col-span-1">
|
| 180 |
+
<h4 data-translate="footer-product" class="font-bold text-white mb-3">Product</h4>
|
| 181 |
+
<ul class="space-y-2 text-gray-300">
|
| 182 |
+
<li><a data-translate="footer-doc" href="/mindus/nexus/documentation" class="hover:text-blue-400 transition duration-200">Documentation</a></li>
|
| 183 |
+
<li><a data-translate="footer-pricing" href="/mindus/nexus/tarifs" class="hover:text-blue-400 transition duration-200">Pricing</a></li>
|
| 184 |
+
<li><a data-translate="footer-integrations" href="/mindus/nexus/documentation" class="hover:text-blue-400 transition duration-200">Integrations</a></li>
|
| 185 |
+
<li><a data-translate="footer-security" href="/mindus/nexus/politique_confidentialite" class="hover:text-blue-400 transition duration-200">Security</a></li>
|
| 186 |
+
</ul>
|
| 187 |
+
</div>
|
| 188 |
+
<div class="col-span-2 md:col-span-1">
|
| 189 |
+
<h4 data-translate="footer-entreprise" class="font-bold text-white mb-3">Company</h4>
|
| 190 |
+
<ul class="space-y-2 text-gray-300">
|
| 191 |
+
<li><a data-translate="footer-about" href="/mindus/nexus/a_propos" class="hover:text-blue-400 transition duration-200">About</a></li>
|
| 192 |
+
<li><a data-translate="footer-careers" href="/mindus/nexus/careers" class="hover:text-blue-400 transition duration-200">Careers</a></li>
|
| 193 |
+
<li><a data-translate="footer-support" href="/mindus/nexus/contact" class="hover:text-blue-400 transition duration-200">Support</a></li>
|
| 194 |
+
<li><a data-translate="footer-faq" href="/mindus/nexus/faq" class="hover:text-blue-400 transition duration-200">FAQ</a></li>
|
| 195 |
+
</ul>
|
| 196 |
+
</div>
|
| 197 |
+
<div class="col-span-4 md:col-span-1">
|
| 198 |
+
<h4 data-translate="footer-ressources" class="font-bold text-white mb-3">Resources</h4>
|
| 199 |
+
<ul class="space-y-2 text-gray-300">
|
| 200 |
+
<li><a data-translate="footer-contact-email" href="/mindus/nexus/contact" class="hover:text-blue-400 transition duration-200">Contact Email</a></li>
|
| 201 |
+
<li><a data-translate="footer-status" href="/mindus/nexus/engineering" class="hover:text-blue-400 transition duration-200">Service Status</a></li>
|
| 202 |
+
<li><a data-translate="footer-blog" href="/mindus/nexus/blog" class="hover:text-blue-400 transition duration-200">Tech Blog</a></li>
|
| 203 |
+
|
| 204 |
+
<li class="relative mt-4 pt-4 border-t border-gray-700">
|
| 205 |
+
<button id="lang-menu-button" class="flex items-center text-white hover:text-blue-400 transition duration-200 text-sm">
|
| 206 |
+
<span id="current-flag">🇺🇸</span>
|
| 207 |
+
<span id="current-lang-name" class="ml-2 font-medium" data-lang-code="en">English</span>
|
| 208 |
+
<span class="material-symbols-rounded text-gray-400 ml-2 text-xl">expand_more</span>
|
| 209 |
+
</button>
|
| 210 |
+
<div id="lang-menu-dropdown" class="absolute left-0 bottom-full mb-2 w-40 bg-gray-800 rounded-md shadow-lg z-50 hidden border border-gray-700">
|
| 211 |
+
<a href="#" data-lang="en" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇺🇸 English</a>
|
| 212 |
+
<a href="#" data-lang="fr" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🌐 Français</a>
|
| 213 |
+
<a href="#" data-lang="es" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇪🇸 Español</a>
|
| 214 |
+
<a href="#" data-lang="zh" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇨🇳 中文 (Simplified)</a>
|
| 215 |
+
<a href="#" data-lang="ja" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇯🇵 日本語</a>
|
| 216 |
+
<a href="#" data-lang="de" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇩🇪 Deutsch</a>
|
| 217 |
+
<a href="#" data-lang="pt-br" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇧🇷 Português (Brasil)</a>
|
| 218 |
+
<a href="#" data-lang="ru" class="lang-option flex items-center px-4 py-2 text-sm text-gray-300 hover:bg-gray-700">🇷🇺 Русский</a>
|
| 219 |
+
</div>
|
| 220 |
+
</li>
|
| 221 |
+
|
| 222 |
+
</ul>
|
| 223 |
+
</div>
|
| 224 |
+
</div>
|
| 225 |
+
<div class="mt-10 pt-6 border-t border-gray-700">
|
| 226 |
+
<p data-translate="footer-copyright" class="text-center text-sm text-gray-500"> © 2025 GitForge. All rights reserved. Powered by the <a href="/" class="hover:text-blue-400 hover:underline">GitForge Platform</a>.</p>
|
| 227 |
+
<div class="text-center mt-2 space-x-4 text-xs">
|
| 228 |
+
<a data-translate="footer-cgu" href="/mindus/nexus/conditions_utilisation" class="text-gray-500 hover:text-blue-400">Terms of Service</a>
|
| 229 |
+
<a data-translate="footer-legal" href="/mindus/nexus/mentions_legales" class="text-gray-500 hover:text-blue-400">Legal Notice</a>
|
| 230 |
+
<a data-translate="footer-privacy" href="/mindus/nexus/politique_confidentialite" class="text-gray-500 hover:text-blue-400">Privacy Policy</a>
|
| 231 |
+
</div>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</footer>
|
| 235 |
+
<script>
|
| 236 |
+
// --- LOGIQUE MULTILINGUE ---
|
| 237 |
+
const TRANSLATIONS = {
|
| 238 |
+
// METADATA & NAVIGATION
|
| 239 |
+
"page-title": {
|
| 240 |
+
"en": "GitForge: Navigation Hub",
|
| 241 |
+
"fr": "GitForge : Centre de Navigation",
|
| 242 |
+
"es": "GitForge: Centro de Navegación",
|
| 243 |
+
"zh": "GitForge: 导航中心",
|
| 244 |
+
"ja": "GitForge: ナビゲーションハブ",
|
| 245 |
+
"de": "GitForge: Navigations-Hub",
|
| 246 |
+
"pt-br": "GitForge: Central de Navegação",
|
| 247 |
+
"ru": "GitForge: Навигационный Центр"
|
| 248 |
+
},
|
| 249 |
+
"site-name": {
|
| 250 |
+
"en": "GitForge",
|
| 251 |
+
"fr": "GitForge",
|
| 252 |
+
"es": "GitForge",
|
| 253 |
+
"zh": "GitForge",
|
| 254 |
+
"ja": "GitForge",
|
| 255 |
+
"de": "GitForge",
|
| 256 |
+
"pt-br": "GitForge",
|
| 257 |
+
"ru": "GitForge"
|
| 258 |
+
},
|
| 259 |
+
"nav-platform": {
|
| 260 |
+
"en": "Platform",
|
| 261 |
+
"fr": "Plateforme",
|
| 262 |
+
"es": "Plataforma",
|
| 263 |
+
"zh": "平台",
|
| 264 |
+
"ja": "プラットフォーム",
|
| 265 |
+
"de": "Plattform",
|
| 266 |
+
"pt-br": "Plataforma",
|
| 267 |
+
"ru": "Платформа"
|
| 268 |
+
},
|
| 269 |
+
"nav-solutions": {
|
| 270 |
+
"en": "Company",
|
| 271 |
+
"fr": "Entreprise",
|
| 272 |
+
"es": "Compañía",
|
| 273 |
+
"zh": "公司",
|
| 274 |
+
"ja": "会社概要",
|
| 275 |
+
"de": "Unternehmen",
|
| 276 |
+
"pt-br": "Empresa",
|
| 277 |
+
"ru": "Компания"
|
| 278 |
+
},
|
| 279 |
+
"nav-resources": {
|
| 280 |
+
"en": "Resources",
|
| 281 |
+
"fr": "Ressources",
|
| 282 |
+
"es": "Recursos",
|
| 283 |
+
"zh": "资源",
|
| 284 |
+
"ja": "リソース",
|
| 285 |
+
"de": "Ressourcen",
|
| 286 |
+
"pt-br": "Recursos",
|
| 287 |
+
"ru": "Ресурсы"
|
| 288 |
+
},
|
| 289 |
+
"nav-opensource": {
|
| 290 |
+
"en": "Contact us",
|
| 291 |
+
"fr": "Contactez-nous",
|
| 292 |
+
"es": "Contáctenos",
|
| 293 |
+
"zh": "联系我们",
|
| 294 |
+
"ja": "お問い合わせ",
|
| 295 |
+
"de": "Kontakt",
|
| 296 |
+
"pt-br": "Fale conosco",
|
| 297 |
+
"ru": "Связаться с нами"
|
| 298 |
+
},
|
| 299 |
+
"nav-about-us": {
|
| 300 |
+
"en": "Hub",
|
| 301 |
+
"fr": "Centre",
|
| 302 |
+
"es": "Centro",
|
| 303 |
+
"zh": "中心",
|
| 304 |
+
"ja": "ハブ",
|
| 305 |
+
"de": "Hub",
|
| 306 |
+
"pt-br": "Central",
|
| 307 |
+
"ru": "Центр"
|
| 308 |
+
},
|
| 309 |
+
"nav-pricing": {
|
| 310 |
+
"en": "Pricing",
|
| 311 |
+
"fr": "Tarifs",
|
| 312 |
+
"es": "Precios",
|
| 313 |
+
"zh": "定价",
|
| 314 |
+
"ja": "料金",
|
| 315 |
+
"de": "Preise",
|
| 316 |
+
"pt-br": "Preços",
|
| 317 |
+
"ru": "Цены"
|
| 318 |
+
},
|
| 319 |
+
"btn-sign-in": {
|
| 320 |
+
"en": "Sign in",
|
| 321 |
+
"fr": "Se connecter",
|
| 322 |
+
"es": "Iniciar sesión",
|
| 323 |
+
"zh": "登录",
|
| 324 |
+
"ja": "サインイン",
|
| 325 |
+
"de": "Anmelden",
|
| 326 |
+
"pt-br": "Entrar",
|
| 327 |
+
"ru": "Войти"
|
| 328 |
+
},
|
| 329 |
+
"btn-sign-up": {
|
| 330 |
+
"en": "Sign up",
|
| 331 |
+
"fr": "S'inscrire",
|
| 332 |
+
"es": "Registrarse",
|
| 333 |
+
"zh": "注册",
|
| 334 |
+
"ja": "登録",
|
| 335 |
+
"de": "Registrieren",
|
| 336 |
+
"pt-br": "Cadastre-se",
|
| 337 |
+
"ru": "Регистрация"
|
| 338 |
+
},
|
| 339 |
+
|
| 340 |
+
// HERO SECTION
|
| 341 |
+
"about-hero-title": {
|
| 342 |
+
"en": "Driving Innovation, Powering the Future of Software.",
|
| 343 |
+
"fr": "Moteur d'Innovation, Propulseur de l'Avenir du Logiciel.",
|
| 344 |
+
"es": "Impulsando la Innovación, Potenciando el Futuro del Software.",
|
| 345 |
+
"zh": "驱动创新,赋能软件未来。",
|
| 346 |
+
"ja": "イノベーションを推進し、ソフトウェアの未来を強化します。",
|
| 347 |
+
"de": "Innovation vorantreiben, die Zukunft der Software gestalten.",
|
| 348 |
+
"pt-br": "Impulsionando a Inovação, Capacitando o Futuro do Software.",
|
| 349 |
+
"ru": "Движение Инноваций, Энергия Будущего Программного Обеспечения."
|
| 350 |
+
},
|
| 351 |
+
"about-hero-subtitle": {
|
| 352 |
+
"en": "GitForge is the world's leading AI-powered developer platform, committed to accelerating human progress through collaboration and open source.",
|
| 353 |
+
"fr": "GitForge est la première plateforme de développement optimisée par l'IA au monde, dédiée à l'accélération du progrès humain par la collaboration et l'open source.",
|
| 354 |
+
"es": "GitForge es la plataforma para desarrolladores líder en el mundo impulsada por IA, comprometida a acelerar el progreso humano a través de la colaboración y el código abierto.",
|
| 355 |
+
"zh": "GitForge是全球领先的AI驱动的开发者平台,致力于通过协作和开源加速人类进步。",
|
| 356 |
+
"ja": "GitForgeは、コラボレーションとオープンソースを通じて人類の進歩を加速することにコミットする、世界をリードするAI駆動型開発者プラットフォームです。",
|
| 357 |
+
"de": "GitForge ist die weltweit führende KI-gestützte Entwicklerplattform, die sich der Beschleunigung des menschlichen Fortschritts durch Zusammenarbeit und Open Source verschrieben hat.",
|
| 358 |
+
"pt-br": "A GitForge é a plataforma de desenvolvimento líder mundial, impulsionada por IA, comprometida em acelerar o progresso humano através da colaboração e do código aberto.",
|
| 359 |
+
"ru": "GitForge — ведущая в мире платформа для разработчиков на базе ИИ,致力于 ускорению человеческого прогресса через сотрудничество и открытый исходный код."
|
| 360 |
+
},
|
| 361 |
+
"about-btn-learn-more": {
|
| 362 |
+
"en": "Discover Our Hub",
|
| 363 |
+
"fr": "Découvrez Notre Centre",
|
| 364 |
+
"es": "Descubre Nuestro Centro",
|
| 365 |
+
"zh": "探索我们的中心",
|
| 366 |
+
"ja": "ハブを見る",
|
| 367 |
+
"de": "Entdecken Sie unseren Hub",
|
| 368 |
+
"pt-br": "Descubra nossa Central",
|
| 369 |
+
"ru": "Открыть наш Центр"
|
| 370 |
+
},
|
| 371 |
+
|
| 372 |
+
// STATS SECTION
|
| 373 |
+
"stats-title": {
|
| 374 |
+
"en": "GitForge at a Glance",
|
| 375 |
+
"fr": "GitForge en Bref",
|
| 376 |
+
"es": "GitForge de un Vistazo",
|
| 377 |
+
"zh": "GitForge 概览",
|
| 378 |
+
"ja": "GitForgeの概要",
|
| 379 |
+
"de": "GitForge auf einen Blick",
|
| 380 |
+
"pt-br": "GitForge em Resumo",
|
| 381 |
+
"ru": "GitForge вкратце"
|
| 382 |
+
},
|
| 383 |
+
"stat-devs": { "en": "150k+", "fr": "150k+", "es": "150k+", "zh": "150k+", "ja": "150k+", "de": "150k+", "pt-br": "150k+", "ru": "150k+" },
|
| 384 |
+
"stat-devs-label": {
|
| 385 |
+
"en": "Developers",
|
| 386 |
+
"fr": "Développeurs",
|
| 387 |
+
"es": "Desarrolladores",
|
| 388 |
+
"zh": "开发者",
|
| 389 |
+
"ja": "開発者",
|
| 390 |
+
"de": "Entwickler",
|
| 391 |
+
"pt-br": "Desenvolvedores",
|
| 392 |
+
"ru": "Разработчики"
|
| 393 |
+
},
|
| 394 |
+
"stat-orgs": { "en": "3k+", "fr": "3k+", "es": "3k+", "zh": "3k+", "ja": "3k+", "de": "3k+", "pt-br": "3k+", "ru": "3k+" },
|
| 395 |
+
"stat-orgs-label": {
|
| 396 |
+
"en": "Organizations",
|
| 397 |
+
"fr": "Organisations",
|
| 398 |
+
"es": "Organizaciones",
|
| 399 |
+
"zh": "组织",
|
| 400 |
+
"ja": "組織",
|
| 401 |
+
"de": "Organisationen",
|
| 402 |
+
"pt-br": "Organizações",
|
| 403 |
+
"ru": "Организации"
|
| 404 |
+
},
|
| 405 |
+
"stat-repos": { "en": "120k+", "fr": "120k+", "es": "120k+", "zh": "120k+", "ja": "120k+", "de": "120k+", "pt-br": "120k+", "ru": "120k+" },
|
| 406 |
+
"stat-repos-label": {
|
| 407 |
+
"en": "Repositories",
|
| 408 |
+
"fr": "Répertoires",
|
| 409 |
+
"es": "Repositorios",
|
| 410 |
+
"zh": "存储库",
|
| 411 |
+
"ja": "リポジトリ",
|
| 412 |
+
"de": "Repositories",
|
| 413 |
+
"pt-br": "Repositórios",
|
| 414 |
+
"ru": "Репозитории"
|
| 415 |
+
},
|
| 416 |
+
"stat-fortune": { "en": "90%", "fr": "90%", "es": "90%", "zh": "90%", "ja": "90%", "de": "90%", "pt-br": "90%", "ru": "90%" },
|
| 417 |
+
"stat-fortune-label": {
|
| 418 |
+
"en": "Fortune 100 Coverage",
|
| 419 |
+
"fr": "Couverture Fortune 100",
|
| 420 |
+
"es": "Cobertura Fortune 100",
|
| 421 |
+
"zh": "财富100覆盖率",
|
| 422 |
+
"ja": "フォーチュン100カバレッジ",
|
| 423 |
+
"de": "Fortune 100 Abdeckung",
|
| 424 |
+
"pt-br": "Cobertura Fortune 100",
|
| 425 |
+
"ru": "Охват Fortune 100"
|
| 426 |
+
},
|
| 427 |
+
|
| 428 |
+
// NEW HUB CONTENT (CARDS)
|
| 429 |
+
"hub-title": {
|
| 430 |
+
"en": "The GitForge Hub",
|
| 431 |
+
"fr": "Le Hub GitForge",
|
| 432 |
+
"es": "El Centro GitForge",
|
| 433 |
+
"zh": "GitForge 中心",
|
| 434 |
+
"ja": "GitForge ハブ",
|
| 435 |
+
"de": "Der GitForge Hub",
|
| 436 |
+
"pt-br": "A Central GitForge",
|
| 437 |
+
"ru": "Центр GitForge"
|
| 438 |
+
},
|
| 439 |
+
"hub-subtitle": {
|
| 440 |
+
"en": "Your navigation center to all GitForge resources and product sections.",
|
| 441 |
+
"fr": "Votre centre de navigation vers toutes les ressources et sections de produits GitForge.",
|
| 442 |
+
"es": "Tu centro de navegación a todos los recursos y secciones de productos de GitForge.",
|
| 443 |
+
"zh": "您的导航中心,可访问所有 GitForge 资源和产品部分。",
|
| 444 |
+
"ja": "すべてのGitForgeリソースと製品セクションへのナビゲーションセンター。",
|
| 445 |
+
"de": "Ihr Navigationszentrum zu allen GitForge-Ressourcen und Produktbereichen.",
|
| 446 |
+
"pt-br": "Seu centro de navegação para todos os recursos e seções de produtos GitForge.",
|
| 447 |
+
"ru": "Ваш навигационный центр для всех ресурсов и разделов продуктов GitForge."
|
| 448 |
+
},
|
| 449 |
+
|
| 450 |
+
"card-title-1": {
|
| 451 |
+
"en": "Tech Blog",
|
| 452 |
+
"fr": "Blog Technique",
|
| 453 |
+
"es": "Blog de Tecnología",
|
| 454 |
+
"zh": "技术博客",
|
| 455 |
+
"ja": "技術ブログ",
|
| 456 |
+
"de": "Tech-Blog",
|
| 457 |
+
"pt-br": "Blog de Tecnologia",
|
| 458 |
+
"ru": "Технический Блог"
|
| 459 |
+
},
|
| 460 |
+
"card-desc-1": {
|
| 461 |
+
"en": "Stay updated with our latest articles, engineering insights, and product updates.",
|
| 462 |
+
"fr": "Restez informé de nos derniers articles, des informations sur l'ingénierie et des mises à jour de produits.",
|
| 463 |
+
"es": "Mantente al día con nuestros últimos artículos, conocimientos de ingeniería y actualizaciones de productos.",
|
| 464 |
+
"zh": "随时了解我们的最新文章、工程见解和产品更新。",
|
| 465 |
+
"ja": "最新の記事、エンジニアリングの洞察、製品アップデートで最新情報を入手してください。",
|
| 466 |
+
"de": "Bleiben Sie auf dem Laufenden mit unseren neuesten Artikeln, Engineering-Einblicken und Produkt-Updates.",
|
| 467 |
+
"pt-br": "Mantenha-se atualizado com nossos artigos mais recentes, insights de engenharia e atualizações de produtos.",
|
| 468 |
+
"ru": "Будьте в курсе наших последних статей, инженерных прозрений и обновлений продуктов."
|
| 469 |
+
},
|
| 470 |
+
|
| 471 |
+
"card-title-2": {
|
| 472 |
+
"en": "Our Mission & Values",
|
| 473 |
+
"fr": "Notre Mission & Valeurs",
|
| 474 |
+
"es": "Nuestra Misión y Valores",
|
| 475 |
+
"zh": "我们的使命与价值观",
|
| 476 |
+
"ja": "私たちのミッションと価値観",
|
| 477 |
+
"de": "Unsere Mission & Werte",
|
| 478 |
+
"pt-br": "Nossa Missão e Valores",
|
| 479 |
+
"ru": "Наша Миссия и Ценности"
|
| 480 |
+
},
|
| 481 |
+
"card-desc-2": {
|
| 482 |
+
"en": "Discover the core principles that drive GitForge and our commitment to the developer community.",
|
| 483 |
+
"fr": "Découvrez les principes fondamentaux qui animent GitForge et notre engagement envers la communauté des développeurs.",
|
| 484 |
+
"es": "Descubre los principios fundamentales que impulsan GitForge y nuestro compromiso con la comunidad de desarrolladores.",
|
| 485 |
+
"zh": "探索驱动GitForge的核心原则以及我们对开发者社区的承诺。",
|
| 486 |
+
"ja": "GitForgeを推進する核となる原則と、開発者コミュニティへのコミットメントを発見してください。",
|
| 487 |
+
"de": "Entdecken Sie die Kernprinzipien, die GitForge antreiben, und unser Engagement für die Entwickler-Community.",
|
| 488 |
+
"pt-br": "Descubra os princípios centrais que impulsionam a GitForge e nosso compromisso com a comunidade de desenvolvedores.",
|
| 489 |
+
"ru": "Узнайте об основных принципах, которыми руководствуется GitForge, и о нашем вкладе в сообщество разработчиков."
|
| 490 |
+
},
|
| 491 |
+
|
| 492 |
+
"card-title-3": {
|
| 493 |
+
"en": "Developer Advocacy",
|
| 494 |
+
"fr": "Plaidoyer Développeur",
|
| 495 |
+
"es": "Defensoría del Desarrollador",
|
| 496 |
+
"zh": "开发者倡导",
|
| 497 |
+
"ja": "開発者アドボカシー",
|
| 498 |
+
"de": "Entwickler-Befürwortung",
|
| 499 |
+
"pt-br": "Defesa do Desenvolvedor",
|
| 500 |
+
"ru": "Защита Разработчиков"
|
| 501 |
+
},
|
| 502 |
+
"card-desc-3": {
|
| 503 |
+
"en": "Learn how we fight for developer rights and shape policies that protect open source innovation.",
|
| 504 |
+
"fr": "Découvrez comment nous défendons les droits des développeurs et façonnons les politiques qui protègent l'innovation open source.",
|
| 505 |
+
"es": "Aprende cómo luchamos por los derechos de los desarrolladores y damos forma a políticas que protegen la innovación de código abierto.",
|
| 506 |
+
"zh": "了解我们如何为开发者权利而战,并制定保护开源创新的政策。",
|
| 507 |
+
"ja": "開発���の権利のために戦い、オープンソースのイノベーションを保護するポリシーをどのように形成しているかをご覧ください。",
|
| 508 |
+
"de": "Erfahren Sie, wie wir uns für die Rechte von Entwicklern einsetzen und Richtlinien zum Schutz von Open-Source-Innovationen gestalten.",
|
| 509 |
+
"pt-br": "Saiba como lutamos pelos direitos dos desenvolvedores e moldamos políticas que protegem a inovação de código aberto.",
|
| 510 |
+
"ru": "Узнайте, как мы боремся за права разработчиков и формируем политику, защищающую инновации с открытым исходным кодом."
|
| 511 |
+
},
|
| 512 |
+
|
| 513 |
+
"card-title-4": {
|
| 514 |
+
"en": "Customer Stories",
|
| 515 |
+
"fr": "Histoires Clients",
|
| 516 |
+
"es": "Historias de Clientes",
|
| 517 |
+
"zh": "客户案例",
|
| 518 |
+
"ja": "お客様の声",
|
| 519 |
+
"de": "Kundenberichte",
|
| 520 |
+
"pt-br": "Histórias de Clientes",
|
| 521 |
+
"ru": "Истории Клиентов"
|
| 522 |
+
},
|
| 523 |
+
"card-desc-4": {
|
| 524 |
+
"en": "Read success stories from global leaders and innovative companies building on the GitForge platform.",
|
| 525 |
+
"fr": "Lisez les réussites de leaders mondiaux et d'entreprises innovantes construisant sur la plateforme GitForge.",
|
| 526 |
+
"es": "Lee historias de éxito de líderes globales y empresas innovadoras que construyen sobre la plataforma GitForge.",
|
| 527 |
+
"zh": "阅读全球领导者和创新公司基于 GitForge 平台构建的成功案例。",
|
| 528 |
+
"ja": "GitForgeプラットフォーム上で構築しているグローバルリーダーや革新的な企業の成功事例をお読みください。",
|
| 529 |
+
"de": "Lesen Sie Erfolgsgeschichten von globalen Marktführern und innovativen Unternehmen, die auf der GitForge-Plattform aufbauen.",
|
| 530 |
+
"pt-br": "Leia histórias de sucesso de líderes globais e empresas inovadoras que estão construindo na plataforma GitForge.",
|
| 531 |
+
"ru": "Прочитайте истории успеха мировых лидеров и инновационных компаний, создающих продукты на платформе GitForge."
|
| 532 |
+
},
|
| 533 |
+
|
| 534 |
+
"card-title-5": {
|
| 535 |
+
"en": "Community",
|
| 536 |
+
"fr": "Communauté",
|
| 537 |
+
"es": "Comunidad",
|
| 538 |
+
"zh": "社区",
|
| 539 |
+
"ja": "コミュニティ",
|
| 540 |
+
"de": "Community",
|
| 541 |
+
"pt-br": "Comunidade",
|
| 542 |
+
"ru": "Сообщество"
|
| 543 |
+
},
|
| 544 |
+
"card-desc-5": {
|
| 545 |
+
"en": "Explore our community initiatives, open source projects, and efforts to promote diversity and inclusion.",
|
| 546 |
+
"fr": "Explorez nos initiatives communautaires, nos projets open source et nos efforts pour promouvoir la diversité et l'inclusion.",
|
| 547 |
+
"es": "Explora nuestras iniciativas comunitarias, proyectos de código abierto y esfuerzos para promover la diversidad y la inclusión.",
|
| 548 |
+
"zh": "探索我们的社区倡议、开源项目以及促进多样性和包容性的努力。",
|
| 549 |
+
"ja": "コミュニティの取り組み、オープンソースプロジェクト、多様性と包摂性を促進する努力を探る。",
|
| 550 |
+
"de": "Entdecken Sie unsere Community-Initiativen, Open-Source-Projekte und Bemühungen zur Förderung von Vielfalt und Inklusion.",
|
| 551 |
+
"pt-br": "Explore nossas iniciativas comunitárias, projetos de código aberto e esforços para promover a diversidade e a inclusão.",
|
| 552 |
+
"ru": "Изучите наши общественные инициативы, проекты с открытым исходным кодом и усилия по продвижению разнообразия и инклюзивности."
|
| 553 |
+
},
|
| 554 |
+
|
| 555 |
+
"card-title-6": {
|
| 556 |
+
"en": "Engineering",
|
| 557 |
+
"fr": "Ingénierie",
|
| 558 |
+
"es": "Ingeniería",
|
| 559 |
+
"zh": "工程",
|
| 560 |
+
"ja": "エンジニアリング",
|
| 561 |
+
"de": "Engineering",
|
| 562 |
+
"pt-br": "Engenharia",
|
| 563 |
+
"ru": "Инженерия"
|
| 564 |
+
},
|
| 565 |
+
"card-desc-6": {
|
| 566 |
+
"en": "Get a deep dive into our core technology, system status, and cutting-edge AI innovations.",
|
| 567 |
+
"fr": "Plongez dans notre technologie de base, l'état du système et nos innovations d'IA de pointe.",
|
| 568 |
+
"es": "Obtén una inmersión profunda en nuestra tecnología central, estado del sistema e innovaciones de IA de vanguardia.",
|
| 569 |
+
"zh": "深入了解我们的核心技术、系统状态和尖端AI创新。",
|
| 570 |
+
"ja": "当社のコアテクノ���ジー、システムステータス、最先端のAIイノベーションについて詳しくご覧ください。",
|
| 571 |
+
"de": "Erhalten Sie einen tiefen Einblick in unsere Kerntechnologie, den Systemstatus und die neuesten KI-Innovationen.",
|
| 572 |
+
"pt-br": "Obtenha uma imersão profunda em nossa tecnologia central, status do sistema e inovações de IA de ponta.",
|
| 573 |
+
"ru": "Получите глубокое погружение в нашу основную технологию, состояние системы и передовые инновации в области ИИ."
|
| 574 |
+
},
|
| 575 |
+
|
| 576 |
+
// FOOTER (keys from the user-provided footer)
|
| 577 |
+
"footer-slogan": {
|
| 578 |
+
"en": "The unified DevOps platform that accelerates your software lifecycle.",
|
| 579 |
+
"fr": "La plateforme DevOps unifiée qui accélère votre cycle de vie logiciel.",
|
| 580 |
+
"es": "La plataforma DevOps unificada que acelera tu ciclo de vida de software.",
|
| 581 |
+
"zh": "统一的 DevOps 平台,加速您的软件生命周期。",
|
| 582 |
+
"ja": "ソフトウェアのライフサイクルを加速する統合DevOpsプラットフォーム。",
|
| 583 |
+
"de": "Die vereinheitlichte DevOps-Plattform, die Ihren Software-Lebenszyklus beschleunigt.",
|
| 584 |
+
"pt-br": "A plataforma DevOps unificada que acelera seu ciclo de vida de software.",
|
| 585 |
+
"ru": "Унифицированная платформа DevOps, ускоряющая жизненный цикл вашего ПО."
|
| 586 |
+
},
|
| 587 |
+
"footer-product": {
|
| 588 |
+
"en": "Product",
|
| 589 |
+
"fr": "Produit",
|
| 590 |
+
"es": "Producto",
|
| 591 |
+
"zh": "产品",
|
| 592 |
+
"ja": "製品",
|
| 593 |
+
"de": "Produkt",
|
| 594 |
+
"pt-br": "Produto",
|
| 595 |
+
"ru": "Продукт"
|
| 596 |
+
},
|
| 597 |
+
"footer-doc": {
|
| 598 |
+
"en": "Documentation",
|
| 599 |
+
"fr": "Documentation",
|
| 600 |
+
"es": "Documentación",
|
| 601 |
+
"zh": "文档",
|
| 602 |
+
"ja": "ドキュメント",
|
| 603 |
+
"de": "Dokumentation",
|
| 604 |
+
"pt-br": "Documentação",
|
| 605 |
+
"ru": "Документация"
|
| 606 |
+
},
|
| 607 |
+
"footer-pricing": {
|
| 608 |
+
"en": "Pricing",
|
| 609 |
+
"fr": "Tarifs",
|
| 610 |
+
"es": "Precios",
|
| 611 |
+
"zh": "定价",
|
| 612 |
+
"ja": "料金",
|
| 613 |
+
"de": "Preise",
|
| 614 |
+
"pt-br": "Preços",
|
| 615 |
+
"ru": "Цены"
|
| 616 |
+
},
|
| 617 |
+
"footer-integrations": {
|
| 618 |
+
"en": "Integrations",
|
| 619 |
+
"fr": "Intégrations",
|
| 620 |
+
"es": "Integraciones",
|
| 621 |
+
"zh": "集成",
|
| 622 |
+
"ja": "統合",
|
| 623 |
+
"de": "Integrationen",
|
| 624 |
+
"pt-br": "Integrações",
|
| 625 |
+
"ru": "Интеграции"
|
| 626 |
+
},
|
| 627 |
+
"footer-security": {
|
| 628 |
+
"en": "Security",
|
| 629 |
+
"fr": "Sécurité",
|
| 630 |
+
"es": "Seguridad",
|
| 631 |
+
"zh": "安全",
|
| 632 |
+
"ja": "セキュリティ",
|
| 633 |
+
"de": "Sicherheit",
|
| 634 |
+
"pt-br": "Segurança",
|
| 635 |
+
"ru": "Безопасность"
|
| 636 |
+
},
|
| 637 |
+
"footer-entreprise": {
|
| 638 |
+
"en": "Company",
|
| 639 |
+
"fr": "Entreprise",
|
| 640 |
+
"es": "Compañía",
|
| 641 |
+
"zh": "公司",
|
| 642 |
+
"ja": "会社",
|
| 643 |
+
"de": "Unternehmen",
|
| 644 |
+
"pt-br": "Empresa",
|
| 645 |
+
"ru": "Компания"
|
| 646 |
+
},
|
| 647 |
+
"footer-about": {
|
| 648 |
+
"en": "About",
|
| 649 |
+
"fr": "À Propos",
|
| 650 |
+
"es": "Acerca de",
|
| 651 |
+
"zh": "关于",
|
| 652 |
+
"ja": "概要",
|
| 653 |
+
"de": "Über uns",
|
| 654 |
+
"pt-br": "Sobre",
|
| 655 |
+
"ru": "О нас"
|
| 656 |
+
},
|
| 657 |
+
"footer-careers": {
|
| 658 |
+
"en": "Careers",
|
| 659 |
+
"fr": "Carrières",
|
| 660 |
+
"es": "Carreras",
|
| 661 |
+
"zh": "职业生涯",
|
| 662 |
+
"ja": "採用情報",
|
| 663 |
+
"de": "Karriere",
|
| 664 |
+
"pt-br": "Carreiras",
|
| 665 |
+
"ru": "Карьера"
|
| 666 |
+
},
|
| 667 |
+
"footer-support": {
|
| 668 |
+
"en": "Support",
|
| 669 |
+
"fr": "Support",
|
| 670 |
+
"es": "Soporte",
|
| 671 |
+
"zh": "支持",
|
| 672 |
+
"ja": "サポート",
|
| 673 |
+
"de": "Support",
|
| 674 |
+
"pt-br": "Suporte",
|
| 675 |
+
"ru": "Поддержка"
|
| 676 |
+
},
|
| 677 |
+
"footer-faq": {
|
| 678 |
+
"en": "FAQ",
|
| 679 |
+
"fr": "FAQ",
|
| 680 |
+
"es": "FAQ",
|
| 681 |
+
"zh": "常见问题",
|
| 682 |
+
"ja": "よくある質問",
|
| 683 |
+
"de": "FAQ",
|
| 684 |
+
"pt-br": "FAQ",
|
| 685 |
+
"ru": "FAQ"
|
| 686 |
+
},
|
| 687 |
+
"footer-ressources": {
|
| 688 |
+
"en": "Resources",
|
| 689 |
+
"fr": "Ressources",
|
| 690 |
+
"es": "Recursos",
|
| 691 |
+
"zh": "资源",
|
| 692 |
+
"ja": "リソース",
|
| 693 |
+
"de": "Ressourcen",
|
| 694 |
+
"pt-br": "Recursos",
|
| 695 |
+
"ru": "Ресурсы"
|
| 696 |
+
},
|
| 697 |
+
"footer-contact-email": {
|
| 698 |
+
"en": "Contact Email",
|
| 699 |
+
"fr": "Contacter par Email",
|
| 700 |
+
"es": "Contacto por Email",
|
| 701 |
+
"zh": "电子邮件联系",
|
| 702 |
+
"ja": "メールでのお問い合わせ",
|
| 703 |
+
"de": "E-Mail-Kontakt",
|
| 704 |
+
"pt-br": "Contato por E-mail",
|
| 705 |
+
"ru": "Связаться по Email"
|
| 706 |
+
},
|
| 707 |
+
"footer-status": {
|
| 708 |
+
"en": "Service Status",
|
| 709 |
+
"fr": "Statut du Service",
|
| 710 |
+
"es": "Estado del Servicio",
|
| 711 |
+
"zh": "服务状态",
|
| 712 |
+
"ja": "サービス状況",
|
| 713 |
+
"de": "Dienststatus",
|
| 714 |
+
"pt-br": "Status do Serviço",
|
| 715 |
+
"ru": "Статус Сервиса"
|
| 716 |
+
},
|
| 717 |
+
"footer-blog": {
|
| 718 |
+
"en": "Tech Blog",
|
| 719 |
+
"fr": "Blog Technique",
|
| 720 |
+
"es": "Blog de Tecnología",
|
| 721 |
+
"zh": "技术博客",
|
| 722 |
+
"ja": "技術ブログ",
|
| 723 |
+
"de": "Tech-Blog",
|
| 724 |
+
"pt-br": "Blog de Tecnologia",
|
| 725 |
+
"ru": "Технический Блог"
|
| 726 |
+
},
|
| 727 |
+
"footer-copyright": {
|
| 728 |
+
"en": "© 2025 GitForge. All rights reserved. Powered by the GitForge Platform.",
|
| 729 |
+
"fr": "© 2025 GitForge. Tous droits réservés. Propulsé par la Plateforme GitForge.",
|
| 730 |
+
"es": "© 2025 GitForge. Todos los derechos reservados. Impulsado por la Plataforma GitForge.",
|
| 731 |
+
"zh": "© 2025 GitForge. 版权所有。由 GitForge 平台驱动。",
|
| 732 |
+
"ja": "© 2025 GitForge. 全著作権所有。GitForgeプラットフォームによって提供されます。",
|
| 733 |
+
"de": "© 2025 GitForge. Alle Rechte vorbehalten. Angetrieben von der GitForge Plattform.",
|
| 734 |
+
"pt-br": "© 2025 GitForge. Todos os direitos reservados. Desenvolvido pela Plataforma GitForge.",
|
| 735 |
+
"ru": "© 2025 GitForge. Все права защищены. Работает на платформе GitForge."
|
| 736 |
+
},
|
| 737 |
+
"footer-cgu": {
|
| 738 |
+
"en": "Terms of Service",
|
| 739 |
+
"fr": "Conditions d'Utilisation",
|
| 740 |
+
"es": "Términos de Servicio",
|
| 741 |
+
"zh": "服务条款",
|
| 742 |
+
"ja": "利用規約",
|
| 743 |
+
"de": "Nutzungsbedingungen",
|
| 744 |
+
"pt-br": "Termos de Serviço",
|
| 745 |
+
"ru": "Условия использования"
|
| 746 |
+
},
|
| 747 |
+
"footer-legal": {
|
| 748 |
+
"en": "Legal Notice",
|
| 749 |
+
"fr": "Mentions Légales",
|
| 750 |
+
"es": "Aviso Legal",
|
| 751 |
+
"zh": "法律声明",
|
| 752 |
+
"ja": "法的通知",
|
| 753 |
+
"de": "Rechtliche Hinweise",
|
| 754 |
+
"pt-br": "Aviso Legal",
|
| 755 |
+
"ru": "Юридическое уведомление"
|
| 756 |
+
},
|
| 757 |
+
"footer-privacy": {
|
| 758 |
+
"en": "Privacy Policy",
|
| 759 |
+
"fr": "Politique de Confidentialité",
|
| 760 |
+
"es": "Política de Privacidad",
|
| 761 |
+
"zh": "隐私政策",
|
| 762 |
+
"ja": "プライバシーポリシー",
|
| 763 |
+
"de": "Datenschutzrichtlinie",
|
| 764 |
+
"pt-br": "Política de Privacidade",
|
| 765 |
+
"ru": "Политика конфиденциальности"
|
| 766 |
+
},
|
| 767 |
+
"lang-en": { "en": "English", "fr": "Anglais", "es": "Inglés", "zh": "英语", "ja": "英語", "de": "Englisch", "pt-br": "Inglês", "ru": "Английский" },
|
| 768 |
+
"lang-fr": { "en": "French", "fr": "Français", "es": "Francés", "zh": "法语", "ja": "フランス語", "de": "Französisch", "pt-br": "Francês", "ru": "Французский" },
|
| 769 |
+
"lang-es": { "en": "Spanish", "fr": "Espagnol", "es": "Español", "zh": "西班牙语", "ja": "スペイン語", "de": "Spanisch", "pt-br": "Espanhol", "ru": "Испанский" },
|
| 770 |
+
"lang-zh": { "en": "Chinese (Simplified)", "fr": "Chinois (Simplifié)", "es": "Chino (Simplificado)", "zh": "中文 (简体)", "ja": "中国語 (簡体)", "de": "Chinesisch (Vereinfacht)", "pt-br": "Chinês (Simplificado)", "ru": "Китайский (упрощенный)" },
|
| 771 |
+
"lang-ja": { "en": "Japanese", "fr": "Japonais", "es": "Japonés", "zh": "日语", "ja": "日本語", "de": "Japanisch", "pt-br": "Japonês", "ru": "Японский" },
|
| 772 |
+
"lang-de": { "en": "German", "fr": "Allemand", "es": "Alemán", "zh": "德语", "ja": "ドイツ語", "de": "Deutsch", "pt-br": "Alemão", "ru": "Немецкий" },
|
| 773 |
+
"lang-pt-br": { "en": "Portuguese (Brazil)", "fr": "Portugais (Brésil)", "es": "Portugués (Brasil)", "zh": "葡萄牙语 (巴西)", "ja": "ポルトガル語 (ブラジル)", "de": "Portugiesisch (Brasilien)", "pt-br": "Português (Brasil)", "ru": "Португальский (Бразилия)" },
|
| 774 |
+
"lang-ru": { "en": "Russian", "fr": "Russe", "es": "Ruso", "zh": "俄语", "ja": "ロシア語", "de": "Russisch", "pt-br": "Russo", "ru": "Русский" }
|
| 775 |
+
};
|
| 776 |
+
|
| 777 |
+
let currentLang = 'en';
|
| 778 |
+
const langMap = {
|
| 779 |
+
'en': { name: 'English', flag: '🇺🇸' },
|
| 780 |
+
'fr': { name: 'Français', flag: '🌐' },
|
| 781 |
+
'es': { name: 'Español', flag: '🇪🇸' },
|
| 782 |
+
'zh': { name: '中文 (Simplified)', flag: '🇨🇳' },
|
| 783 |
+
'ja': { name: '日本語', flag: '🇯🇵' },
|
| 784 |
+
'de': { name: 'Deutsch', flag: '🇩🇪' },
|
| 785 |
+
'pt-br': { name: 'Português (Brasil)', flag: '🇧🇷' },
|
| 786 |
+
'ru': { name: 'Русский', flag: '🇷🇺' }
|
| 787 |
+
};
|
| 788 |
+
|
| 789 |
+
const applyTranslations = (lang) => {
|
| 790 |
+
currentLang = lang;
|
| 791 |
+
document.documentElement.lang = lang;
|
| 792 |
+
document.querySelectorAll('[data-translate]').forEach(element => {
|
| 793 |
+
const key = element.getAttribute('data-translate');
|
| 794 |
+
if (TRANSLATIONS[key] && TRANSLATIONS[key][lang]) {
|
| 795 |
+
element.textContent = TRANSLATIONS[key][lang];
|
| 796 |
+
}
|
| 797 |
+
});
|
| 798 |
+
|
| 799 |
+
// Update language selector display
|
| 800 |
+
const currentLangName = document.getElementById('current-lang-name');
|
| 801 |
+
const currentFlag = document.getElementById('current-flag');
|
| 802 |
+
if (currentLangName && currentFlag) {
|
| 803 |
+
currentLangName.textContent = langMap[lang].name;
|
| 804 |
+
currentLangName.setAttribute('data-lang-code', lang);
|
| 805 |
+
currentFlag.textContent = langMap[lang].flag;
|
| 806 |
+
}
|
| 807 |
+
};
|
| 808 |
+
|
| 809 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 810 |
+
// Language selector toggle logic
|
| 811 |
+
const langButton = document.getElementById('lang-menu-button');
|
| 812 |
+
const langDropdown = document.getElementById('lang-menu-dropdown');
|
| 813 |
+
|
| 814 |
+
if (langButton && langDropdown) {
|
| 815 |
+
langButton.addEventListener('click', (e) => {
|
| 816 |
+
e.stopPropagation();
|
| 817 |
+
// Toggle visibility using block/hidden for the dark theme dropdown
|
| 818 |
+
langDropdown.classList.toggle('hidden');
|
| 819 |
+
});
|
| 820 |
+
|
| 821 |
+
document.addEventListener('click', (e) => {
|
| 822 |
+
if (!langButton.contains(e.target) && !langDropdown.contains(e.target)) {
|
| 823 |
+
langDropdown.classList.add('hidden');
|
| 824 |
+
}
|
| 825 |
+
});
|
| 826 |
+
|
| 827 |
+
// Language selection logic
|
| 828 |
+
document.querySelectorAll('.lang-option').forEach(option => {
|
| 829 |
+
option.addEventListener('click', (e) => {
|
| 830 |
+
e.preventDefault();
|
| 831 |
+
const newLang = option.getAttribute('data-lang');
|
| 832 |
+
applyTranslations(newLang);
|
| 833 |
+
langDropdown.classList.add('hidden'); // Close dropdown after selection
|
| 834 |
+
});
|
| 835 |
+
});
|
| 836 |
+
}
|
| 837 |
+
|
| 838 |
+
// Initial load: Apply English translations by default
|
| 839 |
+
applyTranslations(currentLang);
|
| 840 |
+
});
|
| 841 |
+
</script>
|
| 842 |
+
</body>
|
| 843 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/all_stories.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/api_create_key.html
ADDED
|
@@ -0,0 +1,582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Settings - API Keys</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 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 |
+
/* Inter Font Configuration */
|
| 14 |
+
body { font-family: 'Inter', sans-serif; }
|
| 15 |
+
|
| 16 |
+
/* Theme Variables and Transitions (Light Mode) */
|
| 17 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 18 |
+
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #0969DA; /* Changed to blue for "View Keys" button */
|
| 29 |
+
--primary-hover: #075ECF;
|
| 30 |
+
/* Variables pour les Alertes (Warning et Info/Suggestion) */
|
| 31 |
+
--bg-warning: #FFF8C5; /* Yellow warning banner */
|
| 32 |
+
--border-warning: #E2B200;
|
| 33 |
+
--bg-suggestion: #E6F0FF; /* Light blue/lavender for suggestion banner */
|
| 34 |
+
--border-suggestion: #8096D2;
|
| 35 |
+
--text-suggestion: #24292F;
|
| 36 |
+
--key-text-color: #016200; /* Green text for keys */
|
| 37 |
+
--key-bg-color: #F6FFF6; /* Light green background for keys */
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/* Utility classes for theme variables */
|
| 41 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 42 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 43 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 44 |
+
.text-link-var { color: var(--text-link); }
|
| 45 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 46 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 47 |
+
.focus\:ring-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 48 |
+
|
| 49 |
+
/* Repository Navigation Link Styles */
|
| 50 |
+
.repo-nav-link {
|
| 51 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 52 |
+
margin-right: 0.5rem;
|
| 53 |
+
white-space: nowrap; /* Prevents wrapping in the horizontal nav */
|
| 54 |
+
}
|
| 55 |
+
/* La page Settings est active */
|
| 56 |
+
.repo-nav-link.active {
|
| 57 |
+
border-bottom-color: #F78166; /* Vibrant orange/red for active tab */
|
| 58 |
+
color: var(--text-color) !important;
|
| 59 |
+
font-weight: 600;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
/* Sidebar Styles (Settings-specific sidebar) */
|
| 63 |
+
.settings-nav-link {
|
| 64 |
+
display: flex;
|
| 65 |
+
align-items: center;
|
| 66 |
+
padding: 0.5rem 0.75rem;
|
| 67 |
+
border-radius: 0.5rem;
|
| 68 |
+
color: var(--text-secondary);
|
| 69 |
+
transition: color 0.15s, background-color 0.15s;
|
| 70 |
+
}
|
| 71 |
+
.settings-nav-link:hover {
|
| 72 |
+
color: var(--text-color);
|
| 73 |
+
}
|
| 74 |
+
.settings-nav-link.active {
|
| 75 |
+
color: var(--text-color);
|
| 76 |
+
background-color: var(--bg-active);
|
| 77 |
+
font-weight: 600;
|
| 78 |
+
}
|
| 79 |
+
/* Styles pour les sections repliables */
|
| 80 |
+
.collapsible-header {
|
| 81 |
+
cursor: pointer;
|
| 82 |
+
user-select: none;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
/* Responsive Sidebar Logic (identical to previous file) */
|
| 86 |
+
#sidebar {
|
| 87 |
+
position: fixed;
|
| 88 |
+
top: 0;
|
| 89 |
+
left: 0;
|
| 90 |
+
width: 300px;
|
| 91 |
+
height: 100%;
|
| 92 |
+
background-color: var(--bg-card);
|
| 93 |
+
transform: translateX(-100%);
|
| 94 |
+
transition: transform 0.3s ease-in-out;
|
| 95 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 96 |
+
z-index: 100;
|
| 97 |
+
}
|
| 98 |
+
#sidebar.open {
|
| 99 |
+
transform: translateX(0);
|
| 100 |
+
}
|
| 101 |
+
#overlay {
|
| 102 |
+
position: fixed;
|
| 103 |
+
top: 0;
|
| 104 |
+
left: 0;
|
| 105 |
+
width: 100%;
|
| 106 |
+
height: 100%;
|
| 107 |
+
background: rgba(0, 0, 0, 0.5);
|
| 108 |
+
z-index: 90;
|
| 109 |
+
display: none;
|
| 110 |
+
}
|
| 111 |
+
#overlay.open {
|
| 112 |
+
display: block;
|
| 113 |
+
}
|
| 114 |
+
</style>
|
| 115 |
+
</head>
|
| 116 |
+
|
| 117 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 118 |
+
|
| 119 |
+
<div id="overlay"></div>
|
| 120 |
+
|
| 121 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 122 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 123 |
+
<i data-lucide="git-fork" class="text-3xl text-link-var"></i>
|
| 124 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 125 |
+
<i data-lucide="x" class="text-2xl"></i>
|
| 126 |
+
</button>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
+
<nav class="space-y-1">
|
| 130 |
+
<a href="/mindus/nexus/dashboard?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 131 |
+
<i data-lucide="home" class="w-5 h-5 mr-3"></i> Home
|
| 132 |
+
</a>
|
| 133 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 134 |
+
<i data-lucide="alert-circle" class="w-5 h-5 mr-3"></i> Issues
|
| 135 |
+
</a>
|
| 136 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 137 |
+
<i data-lucide="git-pull-request" class="w-5 h-5 mr-3"></i> Pull requests
|
| 138 |
+
</a>
|
| 139 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 140 |
+
<i data-lucide="layout-grid" class="w-5 h-5 mr-3"></i> Projects
|
| 141 |
+
</a>
|
| 142 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 143 |
+
<i data-lucide="message-square" class="w-5 h-5 mr-3"></i> Discussions
|
| 144 |
+
</a>
|
| 145 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 146 |
+
<i data-lucide="code" class="w-5 h-5 mr-3"></i> Codespaces
|
| 147 |
+
</a>
|
| 148 |
+
<a href="/mindus/nexus/gitforge_copilot" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 149 |
+
<i data-lucide="cpu" class="w-5 h-5 mr-3"></i> Copilot
|
| 150 |
+
</a>
|
| 151 |
+
</nav>
|
| 152 |
+
|
| 153 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 154 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 155 |
+
<i data-lucide="compass" class="w-5 h-5 mr-3"></i> Explore
|
| 156 |
+
</a>
|
| 157 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 158 |
+
<i data-lucide="store" class="w-5 h-5 mr-3"></i> Marketplace
|
| 159 |
+
</a>
|
| 160 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 161 |
+
<i data-lucide="link" class="w-5 h-5 mr-3"></i> MCP registry
|
| 162 |
+
</a>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 166 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 167 |
+
<div class="flex justify-between items-center h-16">
|
| 168 |
+
|
| 169 |
+
<div class="flex items-center space-x-4">
|
| 170 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 171 |
+
<i data-lucide="menu" class="w-6 h-6"></i>
|
| 172 |
+
</button>
|
| 173 |
+
|
| 174 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 175 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 176 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 177 |
+
<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>
|
| 178 |
+
<i data-lucide="lock" class="w-4 h-4 ml-2 text-secondary-var"></i>
|
| 179 |
+
</a>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div class="flex items-center space-x-3">
|
| 183 |
+
<div class="hidden sm:block">
|
| 184 |
+
<input type="text" placeholder="Type / to search"
|
| 185 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 186 |
+
</div>
|
| 187 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 188 |
+
<i data-lucide="bell" class="w-5 h-5"></i>
|
| 189 |
+
</a>
|
| 190 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 191 |
+
<i data-lucide="plus" class="w-5 h-5"></i>
|
| 192 |
+
</a>
|
| 193 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 194 |
+
<i data-lucide="user-circle" class="w-5 h-5"></i>
|
| 195 |
+
</a>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
</div>
|
| 199 |
+
|
| 200 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 201 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 202 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 203 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 204 |
+
<i data-lucide="code" class="w-4 h-4 mr-1"></i> Code
|
| 205 |
+
</a>
|
| 206 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 207 |
+
<i data-lucide="alert-circle" class="w-4 h-4 mr-1"></i> Issues
|
| 208 |
+
</a>
|
| 209 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 210 |
+
<i data-lucide="git-pull-request" class="w-4 h-4 mr-1"></i> Pull requests
|
| 211 |
+
</a>
|
| 212 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 213 |
+
<i data-lucide="check-square" class="w-4 h-4 mr-1"></i> Actions
|
| 214 |
+
</a>
|
| 215 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 216 |
+
<i data-lucide="box" class="w-4 h-4 mr-1"></i> Projects
|
| 217 |
+
</a>
|
| 218 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 219 |
+
<i data-lucide="shield" class="w-4 h-4 mr-1"></i> Security
|
| 220 |
+
</a>
|
| 221 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 222 |
+
<i data-lucide="trending-up" class="w-4 h-4 mr-1"></i> Insights
|
| 223 |
+
</a>
|
| 224 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 225 |
+
<i data-lucide="settings" class="w-4 h-4 mr-1"></i> Settings
|
| 226 |
+
</a>
|
| 227 |
+
</nav>
|
| 228 |
+
</div>
|
| 229 |
+
</div>
|
| 230 |
+
</header>
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 234 |
+
|
| 235 |
+
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
| 236 |
+
|
| 237 |
+
<aside class="lg:col-span-1 border-r border-color-var/50 pr-4 hidden lg:block">
|
| 238 |
+
<nav class="space-y-1">
|
| 239 |
+
<h3 class="font-semibold text-xs text-secondary-var uppercase mb-2">General</h3>
|
| 240 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="settings-nav-link">
|
| 241 |
+
<i data-lucide="settings" class="w-4 h-4 mr-3"></i> General
|
| 242 |
+
</a>
|
| 243 |
+
<h3 class="font-semibold text-xs text-secondary-var uppercase mt-4 mb-2">Access</h3>
|
| 244 |
+
<a href="/mindus/nexus/api_create_key?repo_slug={{ repo_slug }}" class="settings-nav-link">
|
| 245 |
+
<i data-lucide="key-round" class="w-4 h-4 mr-3"></i> Access
|
| 246 |
+
</a>
|
| 247 |
+
<a href="#" class="settings-nav-link">
|
| 248 |
+
<i data-lucide="users" class="w-4 h-4 mr-3"></i> Collaborators
|
| 249 |
+
</a>
|
| 250 |
+
<h3 class="font-semibold text-xs text-secondary-var uppercase mt-4 mb-2">Code and automation</h3>
|
| 251 |
+
<a href="/mindus/nexus/new_branch" class="settings-nav-link">
|
| 252 |
+
<i data-lucide="git-branch" class="w-4 h-4 mr-3"></i> Branches
|
| 253 |
+
</a>
|
| 254 |
+
<a href="#" class="settings-nav-link">
|
| 255 |
+
<i data-lucide="tag" class="w-4 h-4 mr-3"></i> Tags
|
| 256 |
+
</a>
|
| 257 |
+
<a href="#" class="settings-nav-link">
|
| 258 |
+
<i data-lucide="shield" class="w-4 h-4 mr-3"></i> Rules
|
| 259 |
+
<i data-lucide="chevron-down" class="w-4 h-4 ml-auto text-secondary-var"></i>
|
| 260 |
+
</a>
|
| 261 |
+
<a href="#" class="settings-nav-link">
|
| 262 |
+
<i data-lucide="check-square" class="w-4 h-4 mr-3"></i> Actions
|
| 263 |
+
<i data-lucide="chevron-down" class="w-4 h-4 ml-auto text-secondary-var"></i>
|
| 264 |
+
</a>
|
| 265 |
+
<a href="#" class="settings-nav-link">
|
| 266 |
+
<i data-lucide="box" class="w-4 h-4 mr-3"></i> Models
|
| 267 |
+
<span class="ml-2 px-2 py-0.5 text-xs font-semibold bg-green-100 text-primary-color-var rounded-full">Preview</span>
|
| 268 |
+
</a>
|
| 269 |
+
<a href="#" class="settings-nav-link">
|
| 270 |
+
<i data-lucide="webhook" class="w-4 h-4 mr-3"></i> Webhooks
|
| 271 |
+
</a>
|
| 272 |
+
<a href="/mindus/nexus/gitforge_copilot" class="settings-nav-link active">
|
| 273 |
+
<i data-lucide="cpu" class="w-4 h-4 mr-3"></i> Copilot
|
| 274 |
+
<i data-lucide="chevron-down" class="w-4 h-4 ml-auto text-color-var"></i>
|
| 275 |
+
</a>
|
| 276 |
+
<a href="#" class="settings-nav-link">
|
| 277 |
+
<i data-lucide="link" class="w-4 h-4 mr-3"></i> Environments
|
| 278 |
+
</a>
|
| 279 |
+
<a href="#" class="settings-nav-link">
|
| 280 |
+
<i data-lucide="code" class="w-4 h-4 mr-3"></i> Codespaces
|
| 281 |
+
</a>
|
| 282 |
+
<a href="#" class="settings-nav-link">
|
| 283 |
+
<i data-lucide="layout-grid" class="w-4 h-4 mr-3"></i> Pages
|
| 284 |
+
</a>
|
| 285 |
+
</nav>
|
| 286 |
+
</aside>
|
| 287 |
+
|
| 288 |
+
<div class="lg:col-span-3">
|
| 289 |
+
<h1 class="text-3xl font-light text-color-var mb-6">Settings</h1>
|
| 290 |
+
|
| 291 |
+
<div class="flex items-center space-x-2 text-sm text-secondary-var mb-6 border-b border-color-var/50 pb-2">
|
| 292 |
+
<i data-lucide="cpu" class="w-4 h-4"></i>
|
| 293 |
+
<span class="font-semibold text-color-var">Code and automation</span>
|
| 294 |
+
<i data-lucide="chevron-right" class="w-3 h-3"></i>
|
| 295 |
+
<span>Copilot</span>
|
| 296 |
+
</div>
|
| 297 |
+
|
| 298 |
+
<div class="p-4 rounded-lg text-sm mb-6 flex items-start"
|
| 299 |
+
style="background-color: var(--bg-suggestion); border: 1px solid var(--border-suggestion);">
|
| 300 |
+
<i data-lucide="info" class="w-5 h-5 mr-3 text-link-var mt-0.5"></i>
|
| 301 |
+
<p class="text-color-var">
|
| 302 |
+
We recommend using <a href="#" class="text-link-var font-medium hover:underline">GitForge Apps</a> instead for fine grained control over repositories and <a href="#" class="text-link-var font-medium hover:underline">enhanced security</a>.
|
| 303 |
+
</p>
|
| 304 |
+
</div>
|
| 305 |
+
|
| 306 |
+
<div class="border-b border-color-var/50 pb-4 mb-4 flex justify-between items-center">
|
| 307 |
+
<h2 class="text-xl font-semibold text-color-var">User API Keys</h2>
|
| 308 |
+
<button id="view-keys-btn" class="inline-flex items-center justify-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 309 |
+
<i data-lucide="key-round" class="w-4 h-4 mr-2"></i>
|
| 310 |
+
View All Keys
|
| 311 |
+
</button>
|
| 312 |
+
</div>
|
| 313 |
+
|
| 314 |
+
<p class="text-sm text-secondary-var mb-6">
|
| 315 |
+
These are your personal API keys used to access your projects, manage files, and interact with the GitForge backend services. **Protect them carefully.** You can generate and manage up to 5 keys.
|
| 316 |
+
</p>
|
| 317 |
+
|
| 318 |
+
<div id="api-keys-container" class="mt-8">
|
| 319 |
+
<div id="loading-indicator" class="hidden text-center p-4 text-secondary-var">
|
| 320 |
+
<i data-lucide="loader-2" class="w-5 h-5 mx-auto animate-spin"></i> Loading...
|
| 321 |
+
</div>
|
| 322 |
+
<div id="api-keys-list" class="space-y-4">
|
| 323 |
+
<div id="no-keys-message" class="p-12 text-center border border-color-var rounded-lg bg-page-var">
|
| 324 |
+
<h3 class="text-xl font-semibold text-color-var mb-3">Click 'View All Keys' to display your API Keys</h3>
|
| 325 |
+
<p class="text-secondary-var">
|
| 326 |
+
For security reasons, keys are not displayed by default. They are required to use the API routes.
|
| 327 |
+
</p>
|
| 328 |
+
</div>
|
| 329 |
+
</div>
|
| 330 |
+
<div id="error-message" class="hidden p-4 rounded-lg text-sm"
|
| 331 |
+
style="background-color: var(--bg-warning); border: 1px solid var(--border-warning);">
|
| 332 |
+
<p class="text-color-var font-semibold">Error:</p>
|
| 333 |
+
<p id="error-details" class="text-color-var"></p>
|
| 334 |
+
</div>
|
| 335 |
+
</div>
|
| 336 |
+
</div>
|
| 337 |
+
</div>
|
| 338 |
+
</main>
|
| 339 |
+
|
| 340 |
+
<div id="global-spinner-overlay" class="fixed inset-0 bg-black bg-opacity-10 z-50 items-center justify-center hidden">
|
| 341 |
+
<div class="p-6 bg-card-var rounded-lg shadow-xl flex flex-col items-center">
|
| 342 |
+
<div class="spinner spinner-large mb-3"></div>
|
| 343 |
+
<p id="global-spinner-text" class="text-color-var font-semibold">Processing operation...</p>
|
| 344 |
+
</div>
|
| 345 |
+
</div>
|
| 346 |
+
|
| 347 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 348 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 349 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 350 |
+
<i data-lucide="git-fork" class="w-5 h-5"></i>
|
| 351 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 352 |
+
</div>
|
| 353 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 354 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 355 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Privacy</a>
|
| 356 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Security</a>
|
| 357 |
+
<a href="/mindus/nexus/statut" class="hover:text-link-var">Status</a>
|
| 358 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 359 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 360 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 361 |
+
</nav>
|
| 362 |
+
</div>
|
| 363 |
+
</footer>
|
| 364 |
+
|
| 365 |
+
<script>
|
| 366 |
+
// Initialiser Lucide Icons
|
| 367 |
+
lucide.createIcons();
|
| 368 |
+
|
| 369 |
+
// ----------------------------------------------------------------------
|
| 370 |
+
// SIDEBAR LOGIC (inchangée)
|
| 371 |
+
// ----------------------------------------------------------------------
|
| 372 |
+
const sidebar = document.getElementById('sidebar');
|
| 373 |
+
const overlay = document.getElementById('overlay');
|
| 374 |
+
const openButton = document.getElementById('open-sidebar');
|
| 375 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 376 |
+
|
| 377 |
+
const toggleSidebar = () => {
|
| 378 |
+
sidebar.classList.toggle('open');
|
| 379 |
+
overlay.classList.toggle('open');
|
| 380 |
+
};
|
| 381 |
+
|
| 382 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 383 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 384 |
+
overlay.addEventListener('click', toggleSidebar);
|
| 385 |
+
|
| 386 |
+
const body = document.body;
|
| 387 |
+
const observer = new MutationObserver(() => {
|
| 388 |
+
if (sidebar.classList.contains('open')) {
|
| 389 |
+
body.style.overflow = 'hidden';
|
| 390 |
+
} else {
|
| 391 |
+
body.style.overflow = '';
|
| 392 |
+
}
|
| 393 |
+
});
|
| 394 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 395 |
+
|
| 396 |
+
// ----------------------------------------------------------------------
|
| 397 |
+
// LOGIQUE DE GESTION DES CLÉS API (NOUVEAU)
|
| 398 |
+
// ----------------------------------------------------------------------
|
| 399 |
+
const viewKeysBtn = document.getElementById('view-keys-btn');
|
| 400 |
+
const apiKeysListDiv = document.getElementById('api-keys-list');
|
| 401 |
+
const noKeysMessage = document.getElementById('no-keys-message');
|
| 402 |
+
const loadingIndicator = document.getElementById('loading-indicator');
|
| 403 |
+
const errorMessageDiv = document.getElementById('error-message');
|
| 404 |
+
const errorDetailsP = document.getElementById('error-details');
|
| 405 |
+
|
| 406 |
+
/**
|
| 407 |
+
* Copie la clé API dans le presse-papiers
|
| 408 |
+
* @param {string} key - La clé API à copier
|
| 409 |
+
*/
|
| 410 |
+
function copyKeyToClipboard(key) {
|
| 411 |
+
navigator.clipboard.writeText(key).then(() => {
|
| 412 |
+
alert("Clé API copiée dans le presse-papiers !");
|
| 413 |
+
}).catch(err => {
|
| 414 |
+
console.error('Erreur de copie:', err);
|
| 415 |
+
alert("Erreur lors de la tentative de copie de la clé API.");
|
| 416 |
+
});
|
| 417 |
+
}
|
| 418 |
+
|
| 419 |
+
/**
|
| 420 |
+
* Affiche une erreur
|
| 421 |
+
* @param {string} message - Message d'erreur à afficher.
|
| 422 |
+
*/
|
| 423 |
+
function displayError(message) {
|
| 424 |
+
errorMessageDiv.classList.remove('hidden');
|
| 425 |
+
errorDetailsP.textContent = message;
|
| 426 |
+
apiKeysListDiv.innerHTML = ''; // Clear previous keys
|
| 427 |
+
noKeysMessage.classList.add('hidden');
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
/**
|
| 431 |
+
* Charge et affiche la liste des clés API de l'utilisateur.
|
| 432 |
+
*/
|
| 433 |
+
async function fetchApiKeys() {
|
| 434 |
+
// Cache management: Check if keys are already displayed
|
| 435 |
+
if (viewKeysBtn.textContent.trim() === 'Hide Keys') {
|
| 436 |
+
viewKeysBtn.textContent = 'View All Keys';
|
| 437 |
+
apiKeysListDiv.innerHTML = '';
|
| 438 |
+
noKeysMessage.classList.remove('hidden');
|
| 439 |
+
errorMessageDiv.classList.add('hidden');
|
| 440 |
+
return;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
// 1. Afficher l'indicateur de chargement et cacher le message "no keys"
|
| 444 |
+
noKeysMessage.classList.add('hidden');
|
| 445 |
+
errorMessageDiv.classList.add('hidden');
|
| 446 |
+
loadingIndicator.classList.remove('hidden');
|
| 447 |
+
apiKeysListDiv.innerHTML = ''; // Effacer le contenu précédent
|
| 448 |
+
|
| 449 |
+
try {
|
| 450 |
+
// NOTE: Assurez-vous que l'URL correspond à votre configuration Flask.
|
| 451 |
+
// Si vous utilisez le Blueprint 'api_key_bp' directement, l'URL est '/keys/list'.
|
| 452 |
+
// Si vous utilisez le Blueprint central 'api_bp' avec préfixe '/api/v1', l'URL est '/api/v1/keys/list'.
|
| 453 |
+
const response = await fetch('/api/v1/keys/list', {
|
| 454 |
+
method: 'GET',
|
| 455 |
+
headers: {
|
| 456 |
+
'Content-Type': 'application/json'
|
| 457 |
+
},
|
| 458 |
+
// CRUCIAL pour Render/Flask : envoie les cookies de session
|
| 459 |
+
credentials: 'include'
|
| 460 |
+
});
|
| 461 |
+
|
| 462 |
+
loadingIndicator.classList.add('hidden');
|
| 463 |
+
|
| 464 |
+
const result = await response.json();
|
| 465 |
+
|
| 466 |
+
if (!response.ok) {
|
| 467 |
+
const errorMsg = result.error || "Une erreur est survenue lors de la récupération des clés.";
|
| 468 |
+
displayError(errorMsg);
|
| 469 |
+
return;
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
if (result.keys && result.keys.length > 0) {
|
| 473 |
+
viewKeysBtn.textContent = 'Hide Keys';
|
| 474 |
+
|
| 475 |
+
result.keys.forEach(keyData => {
|
| 476 |
+
const keyElement = document.createElement('div');
|
| 477 |
+
keyElement.className = 'border border-color-var rounded-lg p-4 bg-card-var shadow-sm flex flex-col sm:flex-row justify-between items-start sm:items-center transition-colors-theme';
|
| 478 |
+
|
| 479 |
+
const isCurrentBadge = keyData.is_current ?
|
| 480 |
+
`<span class="ml-2 px-2 py-0.5 text-xs font-semibold bg-blue-100 text-link-var rounded-full">CURRENT</span>` : '';
|
| 481 |
+
|
| 482 |
+
keyElement.innerHTML = `
|
| 483 |
+
<div class="flex flex-col w-full sm:w-auto sm:flex-1 min-w-0 mb-3 sm:mb-0">
|
| 484 |
+
<div class="flex items-center mb-1">
|
| 485 |
+
<span class="font-semibold text-color-var">${keyData.name}</span>
|
| 486 |
+
${isCurrentBadge}
|
| 487 |
+
</div>
|
| 488 |
+
<code class="text-sm p-2 rounded bg-key-bg-color text-key-text-color overflow-x-auto whitespace-nowrap scrollbar-thin">
|
| 489 |
+
${keyData.api_key}
|
| 490 |
+
</code>
|
| 491 |
+
<p class="text-xs text-secondary-var mt-1">${keyData.description}</p>
|
| 492 |
+
</div>
|
| 493 |
+
<div class="flex space-x-2">
|
| 494 |
+
<button data-key="${keyData.api_key}" class="copy-btn inline-flex items-center justify-center px-3 py-1.5 text-sm font-semibold rounded-lg bg-active-var text-color-var hover:bg-link-var hover:text-white transition duration-150">
|
| 495 |
+
<i data-lucide="copy" class="w-4 h-4 mr-1"></i> Copy
|
| 496 |
+
</button>
|
| 497 |
+
<button data-key="${keyData.api_key}" class="delete-btn inline-flex items-center justify-center px-3 py-1.5 text-sm font-semibold rounded-lg bg-red-100 text-red-700 hover:bg-red-200 transition duration-150">
|
| 498 |
+
<i data-lucide="trash-2" class="w-4 h-4"></i>
|
| 499 |
+
</button>
|
| 500 |
+
</div>
|
| 501 |
+
`;
|
| 502 |
+
apiKeysListDiv.appendChild(keyElement);
|
| 503 |
+
});
|
| 504 |
+
|
| 505 |
+
// Réinitialiser les icônes Lucide pour les nouveaux éléments
|
| 506 |
+
lucide.createIcons();
|
| 507 |
+
|
| 508 |
+
// Attacher les écouteurs d'événements pour la copie
|
| 509 |
+
document.querySelectorAll('.copy-btn').forEach(button => {
|
| 510 |
+
button.addEventListener('click', (e) => {
|
| 511 |
+
const keyToCopy = e.currentTarget.getAttribute('data-key');
|
| 512 |
+
copyKeyToClipboard(keyToCopy);
|
| 513 |
+
});
|
| 514 |
+
});
|
| 515 |
+
|
| 516 |
+
// Attacher les écouteurs d'événements pour la suppression
|
| 517 |
+
document.querySelectorAll('.delete-btn').forEach(button => {
|
| 518 |
+
button.addEventListener('click', (e) => {
|
| 519 |
+
const keyToDelete = e.currentTarget.getAttribute('data-key');
|
| 520 |
+
if (confirm(`Êtes-vous sûr de vouloir supprimer la clé API se terminant par ...${keyToDelete.slice(-4)} ?`)) {
|
| 521 |
+
deleteApiKey(keyToDelete);
|
| 522 |
+
}
|
| 523 |
+
});
|
| 524 |
+
});
|
| 525 |
+
|
| 526 |
+
} else {
|
| 527 |
+
noKeysMessage.classList.remove('hidden');
|
| 528 |
+
noKeysMessage.querySelector('h3').textContent = "No API Keys Found";
|
| 529 |
+
viewKeysBtn.textContent = 'View All Keys';
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
} catch (error) {
|
| 533 |
+
loadingIndicator.classList.add('hidden');
|
| 534 |
+
displayError(`Request failed: ${error.message}`);
|
| 535 |
+
}
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
/**
|
| 539 |
+
* Supprime une clé API
|
| 540 |
+
* @param {string} key - La clé API à supprimer
|
| 541 |
+
*/
|
| 542 |
+
async function deleteApiKey(key) {
|
| 543 |
+
// Simple spinner simulation for the delete operation
|
| 544 |
+
const originalButtonText = viewKeysBtn.textContent;
|
| 545 |
+
viewKeysBtn.textContent = 'Deleting...';
|
| 546 |
+
viewKeysBtn.disabled = true;
|
| 547 |
+
|
| 548 |
+
try {
|
| 549 |
+
const response = await fetch('/api/v1/keys/delete', {
|
| 550 |
+
method: 'DELETE',
|
| 551 |
+
headers: {
|
| 552 |
+
'Content-Type': 'application/json',
|
| 553 |
+
// NOTE: Vous pourriez aussi mettre la clé utilisée pour la requête d'authentification ici
|
| 554 |
+
},
|
| 555 |
+
body: JSON.stringify({ api_key: key })
|
| 556 |
+
});
|
| 557 |
+
|
| 558 |
+
const result = await response.json();
|
| 559 |
+
|
| 560 |
+
if (response.ok) {
|
| 561 |
+
alert(result.message);
|
| 562 |
+
// Recharger la liste des clés après une suppression réussie
|
| 563 |
+
viewKeysBtn.textContent = originalButtonText; // Réinitialiser le texte avant le rechargement
|
| 564 |
+
viewKeysBtn.disabled = false;
|
| 565 |
+
await fetchApiKeys();
|
| 566 |
+
} else {
|
| 567 |
+
alert(`Failed to delete key: ${result.error || 'Unknown error'}`);
|
| 568 |
+
}
|
| 569 |
+
} catch (error) {
|
| 570 |
+
alert(`Network error during deletion: ${error.message}`);
|
| 571 |
+
} finally {
|
| 572 |
+
// Réinitialiser le bouton en cas d'échec avant de recharger
|
| 573 |
+
viewKeysBtn.textContent = originalButtonText;
|
| 574 |
+
viewKeysBtn.disabled = false;
|
| 575 |
+
}
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
viewKeysBtn.addEventListener('click', fetchApiKeys);
|
| 579 |
+
|
| 580 |
+
</script>
|
| 581 |
+
</body>
|
| 582 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/blog.html
ADDED
|
@@ -0,0 +1,768 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title data-translate="page-title">GitForge Blog</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
+
<style>
|
| 12 |
+
/* Custom Tailwind Configuration */
|
| 13 |
+
.bg-header { background-color: #f7f9fc; }
|
| 14 |
+
.header-border { border-color: #e5e7eb; }
|
| 15 |
+
.text-blue-600-var { color: #2563eb; }
|
| 16 |
+
.border-blue-600-var { border-color: #2563eb; }
|
| 17 |
+
.bg-blue-600-var { background-color: #2563eb; }
|
| 18 |
+
.hover\:bg-blue-700-var:hover { background-color: #1d4ed8; }
|
| 19 |
+
.text-gray-900-var { color: #1f2937; }
|
| 20 |
+
|
| 21 |
+
/* Fixed Header Styles */
|
| 22 |
+
.fixed-header {
|
| 23 |
+
position: fixed;
|
| 24 |
+
top: 0;
|
| 25 |
+
width: 100%;
|
| 26 |
+
z-index: 100;
|
| 27 |
+
background-color: #ffffff; /* Assurer que l'en-tête est opaque */
|
| 28 |
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* Language Dropdown Styles */
|
| 32 |
+
.lang-dropdown-container {
|
| 33 |
+
position: relative;
|
| 34 |
+
}
|
| 35 |
+
.lang-menu-dropdown {
|
| 36 |
+
position: absolute;
|
| 37 |
+
left: 0;
|
| 38 |
+
bottom: 100%;
|
| 39 |
+
margin-bottom: 0.5rem;
|
| 40 |
+
width: 10rem;
|
| 41 |
+
background-color: #ffffff;
|
| 42 |
+
border-radius: 0.375rem;
|
| 43 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 44 |
+
z-index: 50;
|
| 45 |
+
border: 1px solid #e5e7eb;
|
| 46 |
+
display: none;
|
| 47 |
+
}
|
| 48 |
+
.lang-menu-dropdown a {
|
| 49 |
+
color: #1f2937;
|
| 50 |
+
}
|
| 51 |
+
.lang-menu-dropdown a:hover {
|
| 52 |
+
background-color: #f3f4f6;
|
| 53 |
+
color: #2563eb;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
/* Footer style adjustments */
|
| 57 |
+
footer .text-white { color: #1f2937 !important; }
|
| 58 |
+
footer .text-gray-400 { color: #6b7280 !important; }
|
| 59 |
+
footer .border-t.border-[#4b5563] { border-color: #e5e7eb !important; }
|
| 60 |
+
footer .text-gray-500 { color: #6b7280 !important; }
|
| 61 |
+
|
| 62 |
+
/* Hero Background Section Style */
|
| 63 |
+
.hero-blog-bg {
|
| 64 |
+
/* Nouvelle image pour un meilleur contraste */
|
| 65 |
+
background-image: url('https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1280&q=80');
|
| 66 |
+
background-size: cover;
|
| 67 |
+
background-position: center;
|
| 68 |
+
position: relative;
|
| 69 |
+
}
|
| 70 |
+
.hero-overlay {
|
| 71 |
+
background-color: rgba(0, 0, 0, 0.6); /* Darker overlay for text contrast */
|
| 72 |
+
height: 100%;
|
| 73 |
+
width: 100%;
|
| 74 |
+
}
|
| 75 |
+
</style>
|
| 76 |
+
</head>
|
| 77 |
+
<body class="bg-white text-gray-900 font-sans">
|
| 78 |
+
|
| 79 |
+
<header class="fixed-header border-b border-gray-200">
|
| 80 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
|
| 81 |
+
<div class="flex items-center space-x-8">
|
| 82 |
+
<a href="#" class="text-2xl font-bold text-gray-900 flex items-center">
|
| 83 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6 w-6 mr-2">
|
| 84 |
+
<span data-translate="site-name">GitForge</span>
|
| 85 |
+
</a>
|
| 86 |
+
<nav class="hidden md:flex space-x-6 text-sm font-medium text-gray-700">
|
| 87 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-blue-600-var" data-translate="nav-platform">Platform</a>
|
| 88 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-solutions">Company</a>
|
| 89 |
+
<a href="/mindus/nexus/resources" class="hover:text-blue-600-var" data-translate="nav-resources">Resources</a>
|
| 90 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-opensource">Contact us</a>
|
| 91 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var" data-translate="nav-enterprise">Enterprise</a>
|
| 92 |
+
<a href="/mindus/nexus/blog" class="hover:text-blue-600-var text-blue-600-var" data-translate="nav-blog">Blog</a>
|
| 93 |
+
</nav>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="flex items-center space-x-4">
|
| 96 |
+
</button>
|
| 97 |
+
<a href="/mindus/nexus/connexion" class="hidden sm:inline text-sm font-medium text-gray-700 hover:text-blue-600-var" data-translate="btn-sign-in">Sign in</a>
|
| 98 |
+
<a href="/mindus/nexus/inscription" class="px-4 py-2 text-sm font-medium border border-gray-300 rounded-md text-gray-700 hover:border-blue-600-var hover:text-blue-600-var transition" data-translate="btn-sign-up">Sign up</a>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
</header>
|
| 102 |
+
|
| 103 |
+
<main>
|
| 104 |
+
<div class="pt-20"></div>
|
| 105 |
+
|
| 106 |
+
<div class="hero-blog-bg py-24 md:py-36 min-h-[450px]">
|
| 107 |
+
<div class="hero-overlay flex items-center justify-center">
|
| 108 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 text-center text-white">
|
| 109 |
+
<h1 class="text-5xl md:text-6xl font-extrabold mb-6 max-w-5xl mx-auto" data-translate="hero-title">
|
| 110 |
+
GitForge Blog: The Future of Software Development
|
| 111 |
+
</h1>
|
| 112 |
+
<p class="text-xl md:text-2xl font-light mb-8 max-w-4xl mx-auto" data-translate="hero-subtitle">
|
| 113 |
+
Deep dives into DevOps, AI, security, and the community shaping the world's code.
|
| 114 |
+
</p>
|
| 115 |
+
<div class="flex justify-center space-x-4">
|
| 116 |
+
<a href="#featured" class="inline-block bg-blue-600-var hover:bg-blue-700-var text-white font-medium py-3 px-8 rounded-md transition duration-300 text-lg shadow-lg">
|
| 117 |
+
Read Latest Article
|
| 118 |
+
</a>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<section id="featured" class="py-16 md:py-24 bg-gray-50">
|
| 125 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 126 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="section2-title">
|
| 127 |
+
The Core: Unified Development & Collaboration
|
| 128 |
+
</h2>
|
| 129 |
+
<div class="grid md:grid-cols-2 gap-10 items-center">
|
| 130 |
+
<div class="space-y-6">
|
| 131 |
+
<p class="text-lg text-gray-700" data-translate="section2-text1">
|
| 132 |
+
GitForge is built on the philosophy that fragmented tools hinder innovation. Our platform unites the entire software development lifecycle—from idea to deployment—in a single, seamless environment.
|
| 133 |
+
</p>
|
| 134 |
+
<p class="text-lg text-gray-700" data-translate="section2-text2">
|
| 135 |
+
This unified approach drastically improves team communication, accelerates iteration cycles, and reduces the complexity of managing disparate toolchains. Collaboration is not an afterthought; it's the foundation of GitForge.
|
| 136 |
+
</p>
|
| 137 |
+
</div>
|
| 138 |
+
<div class="grid grid-cols-2 gap-4">
|
| 139 |
+
<img src="https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1280&q=80" alt="Team meeting at a table" class="w-full h-48 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 140 |
+
<img src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1280&q=80" alt="Team brainstorming at a whiteboard" class="w-full h-48 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
</section>
|
| 145 |
+
|
| 146 |
+
<section class="py-16 md:py-24">
|
| 147 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 148 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="section6-title">
|
| 149 |
+
Practical DevOps: Accelerate Your Workflow
|
| 150 |
+
</h2>
|
| 151 |
+
<div class="grid md:grid-cols-2 gap-10 items-center">
|
| 152 |
+
<div class="grid grid-cols-2 gap-4">
|
| 153 |
+
<img src="https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1280&q=80" alt="Book on a table, representing documentation" class="w-full h-48 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 154 |
+
<img src="https://images.unsplash.com/photo-1542744173-8e7f5e4a7d4f?auto=format&fit=crop&w=1280&q=80" alt="Office desk setup with monitors" class="w-full h-48 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 155 |
+
</div>
|
| 156 |
+
<div class="space-y-6">
|
| 157 |
+
<p class="text-lg text-gray-700" data-translate="section6-text1">
|
| 158 |
+
Optimiser votre flux de travail DevOps est essentiel pour une livraison logicielle rapide et efficace. Nos articles vous guident à travers les meilleures pratiques de CI/CD, d'automatisation des tests et d'intégration de conteneurs.
|
| 159 |
+
</p>
|
| 160 |
+
<p class="text-lg text-gray-700" data-translate="section6-text2">
|
| 161 |
+
Apprenez à configurer des pipelines sans friction avec GitForge Actions et découvrez comment les microservices peuvent transformer l'architecture de votre application pour une meilleure évolutivité et résilience.
|
| 162 |
+
</p>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</section>
|
| 167 |
+
|
| 168 |
+
<section class="py-16 md:py-24 bg-gray-50">
|
| 169 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 170 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="section3-title">
|
| 171 |
+
AI-Powered Innovation: From Code to Continuous Delivery
|
| 172 |
+
</h2>
|
| 173 |
+
<div class="grid md:grid-cols-3 gap-8">
|
| 174 |
+
<img src="https://images.unsplash.com/photo-1542831371-29b0f74f9713?auto=format&fit=crop&w=1280&q=80" alt="Code editor on a screen" class="w-full h-64 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 175 |
+
<img src="https://images.unsplash.com/photo-1503264116251-35a269479413?auto=format&fit=crop&w=1280&q=80" alt="Developer focused on laptop" class="w-full h-64 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 176 |
+
<img src="https://images.unsplash.com/photo-1517694712202-14dd9538aa97?auto=format&fit=crop&w=1280&q=80" alt="Multiple monitors with code" class="w-full h-64 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 177 |
+
</div>
|
| 178 |
+
<div class="mt-12 max-w-4xl mx-auto space-y-6">
|
| 179 |
+
<p class="text-lg text-gray-700" data-translate="section3-text1">
|
| 180 |
+
Our integrated AI tools, like GitForge Copilot, are revolutionizing the way developers write, test, and deploy code. By providing intelligent suggestions and automating repetitive tasks, we empower teams to focus on complex problem-solving.
|
| 181 |
+
</p>
|
| 182 |
+
<p class="text-lg text-gray-700" data-translate="section3-text2">
|
| 183 |
+
Combined with our robust CI/CD pipelines, this innovation translates into faster releases and a more reliable product. Automation isn't just about saving time; it's about eliminating risk and ensuring quality at scale.
|
| 184 |
+
</p>
|
| 185 |
+
</div>
|
| 186 |
+
</div>
|
| 187 |
+
</section>
|
| 188 |
+
|
| 189 |
+
<section class="py-16 md:py-24">
|
| 190 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 191 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="section4-title">
|
| 192 |
+
Security, Compliance, and Enterprise Readiness
|
| 193 |
+
</h2>
|
| 194 |
+
<div class="grid md:grid-cols-2 gap-10 items-center">
|
| 195 |
+
<div class="grid grid-cols-1 gap-6">
|
| 196 |
+
<img src="https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?auto=format&fit=crop&w=1280&q=80" alt="Laptop screen with data charts" class="w-full h-64 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 197 |
+
<div class="grid grid-cols-2 gap-4">
|
| 198 |
+
<img src="https://images.unsplash.com/photo-1515879218367-8466d910aaa4?auto=format&fit=crop&w=1280&q=80" alt="Command line interface" class="w-full h-40 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 199 |
+
<img src="https://images.unsplash.com/photo-1535223289827-42f1e9919769?auto=format&fit=crop&w=1280&q=80" alt="Code on a notebook" class="w-full h-40 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
<div class="space-y-6">
|
| 203 |
+
<p class="text-lg text-gray-700" data-translate="section4-text1">
|
| 204 |
+
For large organizations, security and compliance are paramount. GitForge Advanced Security provides comprehensive scanning, dependency analysis, and secret detection right in your repository.
|
| 205 |
+
</p>
|
| 206 |
+
<p class="text-lg text-gray-700" data-translate="section4-text2">
|
| 207 |
+
Furthermore, features like Data Residency and Enterprise Managed Users ensure that global teams can adhere to regional regulations while maintaining simplified identity and policy management across multiple organizations.
|
| 208 |
+
</p>
|
| 209 |
+
</div>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
</section>
|
| 213 |
+
|
| 214 |
+
<section class="py-16 md:py-24 bg-gray-50">
|
| 215 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 216 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="section7-title">
|
| 217 |
+
News and Trends: The GitForge Ecosystem
|
| 218 |
+
</h2>
|
| 219 |
+
<div class="grid md:grid-cols-2 gap-10 items-center">
|
| 220 |
+
<div class="space-y-6">
|
| 221 |
+
<p class="text-lg text-gray-700" data-translate="section7-text1">
|
| 222 |
+
Restez à jour avec les dernières annonces de produits, les études de cas de clients qui réussissent et les tendances émergentes qui transforment le paysage du développement. Notre blog est votre source d'information privilégiée sur l'évolution de GitForge.
|
| 223 |
+
</p>
|
| 224 |
+
<p class="text-lg text-gray-700" data-translate="section7-text2">
|
| 225 |
+
De la blockchain aux architectures sans serveur, nous couvrons les sujets qui comptent pour les ingénieurs et les leaders technologiques. Abonnez-vous à notre newsletter pour ne rien manquer.
|
| 226 |
+
</p>
|
| 227 |
+
</div>
|
| 228 |
+
<div class="grid grid-cols-2 gap-4">
|
| 229 |
+
<img src="https://images.unsplash.com/photo-1537432376769-00a0a46da42f?auto=format&fit=crop&w=1280&q=80" alt="Data center server racks" class="w-full h-48 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 230 |
+
<img src="https://images.unsplash.com/photo-1496317656642-3e4a1f9b4c25?auto=format&fit=crop&w=1280&q=80" alt="Person typing on a keyboard" class="w-full h-48 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 231 |
+
</div>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</section>
|
| 235 |
+
|
| 236 |
+
<section class="py-16 md:py-24">
|
| 237 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 238 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="section5-title">
|
| 239 |
+
Community, Open Source, and Our Mission
|
| 240 |
+
</h2>
|
| 241 |
+
<div class="grid md:grid-cols-2 gap-10 items-center">
|
| 242 |
+
<div class="space-y-6">
|
| 243 |
+
<p class="text-lg text-gray-700" data-translate="section5-text1">
|
| 244 |
+
GitForge began as a commitment to open source, and that spirit continues to drive our community. We offer a robust Free plan, designed for individual developers and small teams, providing unlimited public and private repositories.
|
| 245 |
+
</p>
|
| 246 |
+
<p class="text-lg text-gray-700" data-translate="section5-text2">
|
| 247 |
+
Our mission is to foster a space where any developer, anywhere, can contribute to and build the next great software innovation. Join the millions of developers who are already building the future with GitForge.
|
| 248 |
+
</p>
|
| 249 |
+
</div>
|
| 250 |
+
<div class="grid grid-cols-3 gap-4">
|
| 251 |
+
<img src="https://images.unsplash.com/photo-1587620962725-abab7fe55159?auto=format&fit=crop&w=1280&q=80" alt="Keyboard and coffee" class="w-full h-40 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 252 |
+
<img src="https://images.unsplash.com/photo-1505685296765-3a2736de412f?auto=format&fit=crop&w=1280&q=80" alt="Open-source code on a laptop" class="w-full h-40 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 253 |
+
<img src="https://images.unsplash.com/photo-1499951360447-b19be8fe80f5?auto=format&fit=crop&w=1280&q=80" alt="Person working on code on a laptop" class="w-full h-40 object-cover rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 254 |
+
</div>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
</section>
|
| 258 |
+
|
| 259 |
+
<section class="py-16 md:py-24 bg-gray-900">
|
| 260 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 text-center">
|
| 261 |
+
<h2 class="text-4xl font-extrabold text-white mb-6" data-translate="cta-title">
|
| 262 |
+
Ready to Build the Future with GitForge?
|
| 263 |
+
</h2>
|
| 264 |
+
<p class="text-xl text-gray-300 mb-10 max-w-3xl mx-auto" data-translate="cta-desc">
|
| 265 |
+
Explore our platform, check out our resources, or join the discussion in our community forums.
|
| 266 |
+
</p>
|
| 267 |
+
<div class="flex justify-center space-x-4">
|
| 268 |
+
<a href="/mindus/nexus/inscription" class="inline-block bg-blue-600-var hover:bg-blue-700-var text-white font-medium py-3 px-8 rounded-md transition duration-300 text-lg shadow-lg">
|
| 269 |
+
<span data-translate="btn-sign-up">Sign up</span>
|
| 270 |
+
</a>
|
| 271 |
+
<a href="/mindus/nexus/contact" class="inline-block bg-white hover:bg-gray-100 text-gray-800 font-medium py-3 px-8 rounded-md transition duration-300 text-lg shadow-lg">
|
| 272 |
+
<span data-translate="nav-contact">Contact us</span>
|
| 273 |
+
</a>
|
| 274 |
+
</div>
|
| 275 |
+
<div class="grid grid-cols-3 gap-4 mt-16 max-w-4xl mx-auto opacity-70">
|
| 276 |
+
<img src="https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1280&q=80" alt="Circuit board" class="w-full h-32 object-cover rounded-lg">
|
| 277 |
+
<img src="https://images.unsplash.com/photo-1542744173-8e7f5e4a7d4f?auto=format&fit=crop&w=1280&q=80" alt="Office desk setup" class="w-full h-32 object-cover rounded-lg">
|
| 278 |
+
<img src="https://images.unsplash.com/photo-1481277542470-605612bd2d61?auto=format&fit=crop&w=1280&q=80" alt="Hand pointing at a chart" class="w-full h-32 object-cover rounded-lg">
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
</section>
|
| 282 |
+
</main>
|
| 283 |
+
|
| 284 |
+
<footer class="bg-white border-t border-gray-200">
|
| 285 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-10">
|
| 286 |
+
<div class="grid grid-cols-4 md:grid-cols-6 lg:grid-cols-12 gap-8 text-sm">
|
| 287 |
+
|
| 288 |
+
<div class="col-span-4 md:col-span-2 lg:col-span-3">
|
| 289 |
+
<h4 data-translate="site-name" class="text-xl font-bold text-gray-900-var mb-4 flex items-center">
|
| 290 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-5 w-5 mr-2">
|
| 291 |
+
GitForge
|
| 292 |
+
</h4>
|
| 293 |
+
<p class="text-gray-600 mb-4" data-translate="footer-slogan">The unified DevOps platform, powered by AI.</p>
|
| 294 |
+
<div class="flex space-x-4">
|
| 295 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200" aria-label="GitForge on Twitter"><i class="fab fa-twitter"></i></a>
|
| 296 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200" aria-label="GitForge on Facebook"><i class="fab fa-facebook"></i></a>
|
| 297 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200" aria-label="GitForge on LinkedIn"><i class="fab fa-linkedin"></i></a>
|
| 298 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200" aria-label="GitForge on YouTube"><i class="fab fa-youtube"></i></a>
|
| 299 |
+
</div>
|
| 300 |
+
</div>
|
| 301 |
+
|
| 302 |
+
<div class="col-span-4 md:col-span-1 lg:col-span-2">
|
| 303 |
+
<h4 data-translate="footer-product" class="font-bold text-gray-900-var mb-3">Product</h4>
|
| 304 |
+
<ul class="space-y-2 text-gray-600">
|
| 305 |
+
<li><a data-translate="footer-features" href="#" class="hover:text-blue-600-var transition duration-200">Features</a></li>
|
| 306 |
+
<li><a data-translate="footer-security" href="/mindus/nexus/politique_confidentialite" class="hover:text-blue-600-var transition duration-200">Security</a></li>
|
| 307 |
+
<li><a data-translate="footer-team" href="/mindus/nexus/a_propos" class="hover:text-blue-600-var transition duration-200">Team</a></li>
|
| 308 |
+
<li><a data-translate="footer-enterprise" href="/mindus/nexus/a_propos" class="hover:text-blue-600-var transition duration-200">Enterprise</a></li>
|
| 309 |
+
<li><a data-translate="nav-blog" href="/mindus/nexus/blog" class="hover:text-blue-600-var transition duration-200">Blog</a></li>
|
| 310 |
+
</ul>
|
| 311 |
+
</div>
|
| 312 |
+
|
| 313 |
+
<div class="col-span-4 md:col-span-1 lg:col-span-2">
|
| 314 |
+
<h4 data-translate="footer-company" class="font-bold text-gray-900-var mb-3">Company</h4>
|
| 315 |
+
<ul class="space-y-2 text-gray-600">
|
| 316 |
+
<li><a data-translate="footer-about" href="/mindus/nexus/a_propos" class="hover:text-blue-600-var transition duration-200">About us</a></li>
|
| 317 |
+
<li><a data-translate="footer-customers" href="/mindus/nexus/customers" class="hover:text-blue-600-var transition duration-200">Customers</a></li>
|
| 318 |
+
<li><a data-translate="footer-careers" href="/mindus/nexus/careers" class="hover:text-blue-600-var transition duration-200">Careers</a></li>
|
| 319 |
+
<li><a data-translate="footer-support" href="/mindus/nexus/contact" class="hover:text-blue-600-var transition duration-200">Support</a></li>
|
| 320 |
+
<li><a data-translate="footer-faq" href="/mindus/nexus/faq" class="hover:text-blue-600-var transition duration-200">FAQ</a></li>
|
| 321 |
+
</ul>
|
| 322 |
+
</div>
|
| 323 |
+
|
| 324 |
+
<div class="col-span-4 md:col-span-2 lg:col-span-3 lang-dropdown-container">
|
| 325 |
+
<h4 data-translate="footer-resources" class="font-bold text-gray-900-var mb-3">Resources</h4>
|
| 326 |
+
<ul class="space-y-2 text-gray-600">
|
| 327 |
+
<li><a data-translate="footer-contact-email" href="/mindus/nexus/contact" class="hover:text-blue-600-var transition duration-200">Contact Email</a></li>
|
| 328 |
+
<li><a data-translate="footer-status" href="/mindus/nexus/statut" class="hover:text-blue-600-var transition duration-200">Service Status</a></li>
|
| 329 |
+
<li><a data-translate="footer-blog" href="/mindus/nexus/blog" class="hover:text-blue-600-var transition duration-200">Tech Blog</a></li>
|
| 330 |
+
<li class="relative mt-4 pt-4 border-t border-gray-200">
|
| 331 |
+
<button id="lang-menu-button" class="flex items-center text-gray-900-var hover:text-blue-600-var transition duration-200 text-sm">
|
| 332 |
+
<span id="current-flag">🇺🇸</span>
|
| 333 |
+
<span id="current-lang-name" class="ml-2 font-medium">English</span>
|
| 334 |
+
<i class="fas fa-chevron-up ml-2 text-xs"></i>
|
| 335 |
+
</button>
|
| 336 |
+
<div id="lang-menu-dropdown" class="lang-menu-dropdown p-2">
|
| 337 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="en"><span class="mr-2">🇺🇸</span> English</a>
|
| 338 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="fr"><span class="mr-2">🇫🇷</span> Français</a>
|
| 339 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="es"><span class="mr-2">🇪🇸</span> Español</a>
|
| 340 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="zh-CN"><span class="mr-2">🇨🇳</span> 简体中文 (Simplified Chinese)</a>
|
| 341 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="ja"><span class="mr-2">🇯🇵</span> 日本語 (Japanese)</a>
|
| 342 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="de"><span class="mr-2">🇩🇪</span> Deutsch (German)</a>
|
| 343 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="pt-BR"><span class="mr-2">🇧🇷</span> Português (Brasil)</a>
|
| 344 |
+
<a href="#" class="block px-3 py-2 rounded-md text-sm lang-option" data-lang="ru"><span class="mr-2">🇷🇺</span> Русский (Russian)</a>
|
| 345 |
+
</div>
|
| 346 |
+
</li>
|
| 347 |
+
</ul>
|
| 348 |
+
</div>
|
| 349 |
+
|
| 350 |
+
</div>
|
| 351 |
+
|
| 352 |
+
<div class="mt-10 border-t border-gray-200 pt-6 flex flex-col sm:flex-row justify-between items-center">
|
| 353 |
+
<p class="text-sm text-gray-600 text-center sm:text-left" data-translate="footer-copyright">
|
| 354 |
+
© 2025 GitForge. All rights reserved. Powered by the <a href="/" class="hover:text-blue-600-var hover:underline">GitForge Platform</a>.
|
| 355 |
+
</p>
|
| 356 |
+
<div class="flex space-x-4 mt-4 sm:mt-0 text-sm">
|
| 357 |
+
<a href="/mindus/nexus/mentions_legales" class="text-gray-600 hover:text-blue-600-var" data-translate="footer-legal">Legal</a>
|
| 358 |
+
<a href="/mindus/nexus/conditions_utilisation" class="text-gray-600 hover:text-blue-600-var" data-translate="footer-privacy">Privacy</a>
|
| 359 |
+
<a href="/mindus/nexus/politique_confidentialite" class="text-gray-600 hover:text-blue-600-var" data-translate="footer-security-policy">Security Policy</a>
|
| 360 |
+
</div>
|
| 361 |
+
</div>
|
| 362 |
+
</div>
|
| 363 |
+
</footer>
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
<script>
|
| 367 |
+
// Default language set to English (en)
|
| 368 |
+
let currentLang = 'en';
|
| 369 |
+
|
| 370 |
+
// Translation dictionary (extended for Blog content)
|
| 371 |
+
const translations = {
|
| 372 |
+
"site-name": { "fr": "GitForge", "en": "GitForge", "es": "GitForge", "zh-CN": "GitForge", "ja": "GitForge", "de": "GitForge", "pt-BR": "GitForge", "ru": "GitForge" },
|
| 373 |
+
"nav-platform": { "fr": "Plateforme", "en": "Platform", "es": "Plataforma", "zh-CN": "平台", "ja": "プラットフォーム", "de": "Plattform", "pt-BR": "Plataforma", "ru": "Платформа" },
|
| 374 |
+
"nav-solutions": { "fr": "Entreprise", "en": "Company", "es": "Empresa", "zh-CN": "公司", "ja": "企業情報", "de": "Unternehmen", "pt-BR": "Empresa", "ru": "Компания" },
|
| 375 |
+
"nav-resources": { "fr": "Ressources", "en": "Resources", "es": "Recursos", "zh-CN": "资源", "ja": "リソース", "de": "Ressourcen", "pt-BR": "Recursos", "ru": "Ресурсы" },
|
| 376 |
+
"nav-opensource": { "fr": "Contactez-nous", "en": "Contact us", "es": "Contáctenos", "zh-CN": "联系我们", "ja": "お問い合わせ", "de": "Kontakt", "pt-BR": "Fale Conosco", "ru": "Связаться с нами" },
|
| 377 |
+
"nav-enterprise": { "fr": "Entreprise", "en": "Enterprise", "es": "Empresa", "zh-CN": "企业版", "ja": "エンタープライズ", "de": "Enterprise", "pt-BR": "Empresarial", "ru": "Корпоративный" },
|
| 378 |
+
"nav-blog": { "fr": "Blog", "en": "Blog", "es": "Blog", "zh-CN": "博客", "ja": "ブログ", "de": "Blog", "pt-BR": "Blog", "ru": "Блог" },
|
| 379 |
+
"btn-sign-in": { "fr": "Se connecter", "en": "Sign in", "es": "Iniciar sesión", "zh-CN": "登录", "ja": "サインイン", "de": "Anmelden", "pt-BR": "Entrar", "ru": "Войти" },
|
| 380 |
+
"btn-sign-up": { "fr": "S'inscrire", "en": "Sign up", "es": "Registrarse", "zh-CN": "注册", "ja": "サインアップ", "de": "Registrieren", "pt-BR": "Cadastre-se", "ru": "Регистрация" },
|
| 381 |
+
"nav-contact": { "fr": "Contactez-nous", "en": "Contact us", "es": "Contáctenos", "zh-CN": "联系我们", "ja": "お問い合わせ", "de": "Kontakt", "pt-BR": "Fale Conosco", "ru": "Связаться с нами" },
|
| 382 |
+
|
| 383 |
+
// Blog Specific Translations
|
| 384 |
+
"page-title": {
|
| 385 |
+
"fr": "Blog GitForge",
|
| 386 |
+
"en": "GitForge Blog",
|
| 387 |
+
"es": "Blog de GitForge",
|
| 388 |
+
"zh-CN": "GitForge 博客",
|
| 389 |
+
"ja": "GitForge ブログ",
|
| 390 |
+
"de": "GitForge Blog",
|
| 391 |
+
"pt-BR": "Blog da GitForge",
|
| 392 |
+
"ru": "Блог GitForge"
|
| 393 |
+
},
|
| 394 |
+
"hero-title": {
|
| 395 |
+
"fr": "Blog GitForge : L'Avenir du Développement Logiciel",
|
| 396 |
+
"en": "GitForge Blog: The Future of Software Development",
|
| 397 |
+
"es": "Blog de GitForge: El Futuro del Desarrollo de Software",
|
| 398 |
+
"zh-CN": "GitForge 博客:软件开发的未来",
|
| 399 |
+
"ja": "GitForgeブログ:ソフトウェア開発の未来",
|
| 400 |
+
"de": "GitForge Blog: Die Zukunft der Softwareentwicklung",
|
| 401 |
+
"pt-BR": "Blog da GitForge: O Futuro do Desenvolvimento de Software",
|
| 402 |
+
"ru": "Блог GitForge: Будущее разработки программного обеспечения"
|
| 403 |
+
},
|
| 404 |
+
"hero-subtitle": {
|
| 405 |
+
"fr": "Analyses approfondies de DevOps, de l'IA, de la sécurité, et de la communauté qui façonne le code mondial.",
|
| 406 |
+
"en": "Deep dives into DevOps, AI, security, and the community shaping the world's code.",
|
| 407 |
+
"es": "Análisis profundo de DevOps, IA, seguridad y la comunidad que da forma al código mundial.",
|
| 408 |
+
"zh-CN": "深入探讨 DevOps、AI、安全和塑造全球代码的社区。",
|
| 409 |
+
"ja": "DevOps、AI、セキュリティ、そして世界のコードを形作るコミュニティへの深掘り。",
|
| 410 |
+
"de": "Tiefe Einblicke in DevOps, KI, Sicherheit und die Community, die den Code der Welt gestaltet.",
|
| 411 |
+
"pt-BR": "Análises aprofundadas sobre DevOps, IA, segurança e a comunidade que molda o código mundial.",
|
| 412 |
+
"ru": "Глубокий анализ DevOps, ИИ, безопасности и сообщества, формирующего мировой код."
|
| 413 |
+
},
|
| 414 |
+
"section2-title": {
|
| 415 |
+
"fr": "Le Cœur : Développement Unifié & Collaboration",
|
| 416 |
+
"en": "The Core: Unified Development & Collaboration",
|
| 417 |
+
"es": "El Núcleo: Desarrollo Unificado y Colaboración",
|
| 418 |
+
"zh-CN": "核心:统一开发与协作",
|
| 419 |
+
"ja": "コア:統合された開発とコラボレーション",
|
| 420 |
+
"de": "Der Kern: Einheitliche Entwicklung und Zusammenarbeit",
|
| 421 |
+
"pt-BR": "O Essencial: Desenvolvimento e Colaboração Unificados",
|
| 422 |
+
"ru": "Ядро: Единая разработка и совместная работа"
|
| 423 |
+
},
|
| 424 |
+
"section2-text1": {
|
| 425 |
+
"fr": "GitForge repose sur la philosophie selon laquelle les outils fragmentés entravent l'innovation. Notre plateforme unit l'ensemble du cycle de vie du développement logiciel, de l'idée au déploiement, dans un environnement unique et fluide.",
|
| 426 |
+
"en": "GitForge is built on the philosophy that fragmented tools hinder innovation. Our platform unites the entire software development lifecycle—from idea to deployment—in a single, seamless environment.",
|
| 427 |
+
"es": "GitForge se basa en la filosofía de que las herramientas fragmentadas obstaculizan la innovación. Nuestra plataforma unifica todo el ciclo de vida del desarrollo de software, desde la idea hasta la implementación, en un entorno único y sin fisuras.",
|
| 428 |
+
"zh-CN": "GitForge 建立在零散的工具会阻碍创新的理念之上。我们的平台将整个软件开发生命周期(从构思到部署)统一到一个单一、无缝的环境中。",
|
| 429 |
+
"ja": "GitForgeは、断片化されたツールがイノベーションを妨げるという哲学に基づいて構築されています。私たちのプラットフォームは、アイデアからデプロイメントまでのソフトウェア開発ライフサイクル全体を、単一でシームレスな環境に統合します。",
|
| 430 |
+
"de": "GitForge basiert auf der Philosophie, dass fragmentierte Tools Innovationen behindern. Unsere Plattform vereint den gesamten Softwareentwicklungszyklus – von der Idee bis zur Bereitstellung – in einer einzigen, nahtlosen Umgebung.",
|
| 431 |
+
"pt-BR": "A GitForge se baseia na filosofia de que ferramentas fragmentadas dificultam a inovação. Nossa plataforma une todo o ciclo de vida do desenvolvimento de software – da ideia à implantação – em um ambiente único e contínuo.",
|
| 432 |
+
"ru": "GitForge основан�� на философии, согласно которой разрозненные инструменты мешают инновациям. Наша платформа объединяет весь жизненный цикл разработки программного обеспечения, от идеи до развертывания, в единой, бесшовной среде."
|
| 433 |
+
},
|
| 434 |
+
"section2-text2": {
|
| 435 |
+
"fr": "Cette approche unifiée améliore considérablement la communication d'équipe, accélère les cycles d'itération et réduit la complexité de la gestion de chaînes d'outils disparates. La collaboration n'est pas une réflexion après coup ; c'est le fondement de GitForge.",
|
| 436 |
+
"en": "This unified approach drastically improves team communication, accelerates iteration cycles, and reduces the complexity of managing disparate toolchains. Collaboration is not an afterthought; it's the foundation of GitForge.",
|
| 437 |
+
"es": "Este enfoque unificado mejora drásticamente la comunicación del equipo, acelera los ciclos de iteración y reduce la complejidad de gestionar cadenas de herramientas dispares. La colaboración no es una ocurrencia tardía; es la base de GitForge.",
|
| 438 |
+
"zh-CN": "这种统一的方法极大地改善了团队沟通,加速了迭代周期,并降低了管理不同工具链的复杂性。协作并非事后才考虑;它是 GitForge 的基础。",
|
| 439 |
+
"ja": "この統合されたアプローチは、チームのコミュニケーションを劇的に改善し、イテレーションサイクルを加速し、異種ツールチェーンを管理する複雑さを軽減します。コラボレーションは後回しではなく、GitForgeの基盤です。",
|
| 440 |
+
"de": "Dieser einheitliche Ansatz verbessert die Teamkommunikation drastisch, beschleunigt Iterationszyklen und reduziert die Komplexität der Verwaltung unterschiedlicher Toolchains. Zusammenarbeit ist kein nachträglicher Gedanke, sondern das Fundament von GitForge.",
|
| 441 |
+
"pt-BR": "Essa abordagem unificada melhora drasticamente a comunicação da equipe, acelera os ciclos de iteração e reduz a complexidade do gerenciamento de cadeias de ferramentas díspares. A colaboração não é uma reflexão tardia; é o alicerce da GitForge.",
|
| 442 |
+
"ru": "Этот единый подход кардинально улучшает командное взаимодействие, ускоряет циклы итераций и снижает сложность управления разрозненными цепочками инструментов. Сотрудничество – это не второстепенный фактор, а основа GitForge."
|
| 443 |
+
},
|
| 444 |
+
"section6-title": {
|
| 445 |
+
"fr": "DevOps Pratique : Accélérez votre Workflow",
|
| 446 |
+
"en": "Practical DevOps: Accelerate Your Workflow",
|
| 447 |
+
"es": "DevOps Práctico: Acelere su Flujo de Trabajo",
|
| 448 |
+
"zh-CN": "实用 DevOps:加速您的工作流程",
|
| 449 |
+
"ja": "実践的DevOps:ワークフローを加速する",
|
| 450 |
+
"de": "Praktisches DevOps: Beschleunigen Sie Ihren Workflow",
|
| 451 |
+
"pt-BR": "DevOps Prático: Acelere Seu Fluxo de Trabalho",
|
| 452 |
+
"ru": "Практический DevOps: Ускорьте ваш рабочий процесс"
|
| 453 |
+
},
|
| 454 |
+
"section6-text1": {
|
| 455 |
+
"fr": "Optimiser votre flux de travail DevOps est essentiel pour une livraison logicielle rapide et efficace. Nos articles vous guident à travers les meilleures pratiques de CI/CD, d'automatisation des tests et d'intégration de conteneurs.",
|
| 456 |
+
"en": "Optimizing your DevOps workflow is key to fast and efficient software delivery. Our articles guide you through the best practices for CI/CD, test automation, and container integration.",
|
| 457 |
+
"es": "Optimizar su flujo de trabajo DevOps es clave para una entrega de software rápida y eficiente. Nuestros artículos lo guían a través de las mejores prácticas para CI/CD, automatización de pruebas e integración de contenedores.",
|
| 458 |
+
"zh-CN": "优化您的 DevOps 工作流程对于快速高效的软件交付至关重要。我们的文章将指导您了解 CI/CD、测试自动化和容器集成的最佳实践。",
|
| 459 |
+
"ja": "DevOpsワークフローの最適化は、迅速で効率的なソフトウェアデリバリーの鍵です。当社の記事は、CI/CD、テスト自動化、コンテナ統合のベストプラクティスをご案内します。",
|
| 460 |
+
"de": "Die Optimierung Ihres DevOps-Workflows ist entscheidend für eine schnelle und effiziente Softwarebereitstellung. Unsere Artikel führen Sie durch die Best Practices für CI/CD, Testautomatisierung und Container-Integration.",
|
| 461 |
+
"pt-BR": "Otimizar seu fluxo de trabalho DevOps é fundamental para uma entrega de software rápida e eficiente. Nossos artigos o guiam pelas melhores práticas para CI/CD, automação de testes e integração de contêineres.",
|
| 462 |
+
"ru": "Оптимизация вашего рабочего процесса DevOps является ключом к быстрой и эффективной доставке программного обеспечения. Наши статьи проведут вас через лучшие практики CI/CD, автоматизации тестирования и интеграции контейнеров."
|
| 463 |
+
},
|
| 464 |
+
"section6-text2": {
|
| 465 |
+
"fr": "Apprenez à configurer des pipelines sans friction avec GitForge Actions et découvrez comment les microservices peuvent transformer l'architecture de votre application pour une meilleure évolutivité et résilience.",
|
| 466 |
+
"en": "Learn how to set up frictionless pipelines with GitForge Actions and discover how microservices can transform your application architecture for better scalability and resilience.",
|
| 467 |
+
"es": "Aprenda a configurar pipelines sin fricciones con GitForge Actions y descubra cómo los microservicios pueden transformar la arquitectura de su aplicación para una mejor escalabilidad y resiliencia.",
|
| 468 |
+
"zh-CN": "了解如何使用 GitForge Actions 设置无摩擦的流水线,并发现微服务如何转变您的应用架构以获得更好的可扩展性和弹性。",
|
| 469 |
+
"ja": "GitForge Actionsで摩擦のないパイプラインを設定する方法を学び、マイクロサービスがアプリケーションアーキテクチャをどのように変革し、より優れたスケーラビリティとレジリエンスを実現するかを発見してください。",
|
| 470 |
+
"de": "Erfahren Sie, wie Sie reibungslose Pipelines mit GitForge Actions einrichten und entdecken Sie, wie Microservices Ihre Anwendungsarchitektur für bessere Skalierbarkeit und Ausfallsicherheit transformieren können.",
|
| 471 |
+
"pt-BR": "Aprenda a configurar pipelines sem atrito com o GitForge Actions e descubra como microsserviços podem transformar a arquitetura do seu aplicativo para melhor escalabilidade e resiliência.",
|
| 472 |
+
"ru": "Узнайте, как настроить бесперебойные конвейеры с помощью GitForge Actions, и как микросервисы могут трансформировать архитектуру вашего приложения для повышения масштабируемости и устойчивости."
|
| 473 |
+
},
|
| 474 |
+
"section3-title": {
|
| 475 |
+
"fr": "Innovation Alimentée par l'IA : Du Code à la Livraison Continue",
|
| 476 |
+
"en": "AI-Powered Innovation: From Code to Continuous Delivery",
|
| 477 |
+
"es": "Innovación Impulsada por la IA: Del Código a la Entrega Continua",
|
| 478 |
+
"zh-CN": "AI 驱动的创新:从代码到持续交付",
|
| 479 |
+
"ja": "AIを活用したイノベーション:コードから継続的デリバリーへ",
|
| 480 |
+
"de": "KI-gestützte Innovation: Vom Code zur kontinuierlichen Bereitstellung",
|
| 481 |
+
"pt-BR": "Inovação Orientada por IA: Do Código à Entrega Contínua",
|
| 482 |
+
"ru": "Инновации на основе ИИ: От кода к непрерывной доставке"
|
| 483 |
+
},
|
| 484 |
+
"section3-text1": {
|
| 485 |
+
"fr": "Nos outils d'IA intégrés, tels que GitForge Copilot, révolutionnent la façon dont les développeurs écrivent, testent et déploient du code. En fournissant des suggestions intelligentes et en automatisant les tâches répétitives, nous permettons aux équipes de se concentrer sur la résolution de problèmes complexes.",
|
| 486 |
+
"en": "Our integrated AI tools, like GitForge Copilot, are revolutionizing the way developers write, test, and deploy code. By providing intelligent suggestions and automating repetitive tasks, we empower teams to focus on complex problem-solving.",
|
| 487 |
+
"es": "Nuestras herramientas de IA integradas, como GitForge Copilot, están revolucionando la forma en que los desarrolladores escriben, prueban e implementan código. Al proporcionar sugerencias inteligentes y automatizar tareas repetitivas, capacitamos a los equipos para que se centren en la resolución de problemas complejos.",
|
| 488 |
+
"zh-CN": "我们集成的 AI 工具,例如 GitForge Copilot,正在彻底改变开发人员编写、测试和部署代码的方式。通过提供智能建议和自动化重复性任务,我们使团队能够专注于解决复杂的难题。",
|
| 489 |
+
"ja": "GitForge Copilotのような統合されたAIツールは、開発者がコードを記述、テスト、デプロイする方法に革命をもたらしています。インテリジェントな提案を提供し、反復的なタスクを自動化することで、チームは複雑な問題解��に集中できます。",
|
| 490 |
+
"de": "Unsere integrierten KI-Tools, wie GitForge Copilot, revolutionieren die Art und Weise, wie Entwickler Code schreiben, testen und bereitstellen. Durch intelligente Vorschläge und die Automatisierung wiederkehrender Aufgaben ermöglichen wir Teams, sich auf komplexe Problemlösungen zu konzentrieren.",
|
| 491 |
+
"pt-BR": "Nossas ferramentas de IA integradas, como o GitForge Copilot, estão revolucionando a maneira como os desenvolvedores escrevem, testam e implantam código. Ao fornecer sugestões inteligentes e automatizar tarefas repetitivas, capacitamos as equipes a se concentrarem na solução de problemas complexos.",
|
| 492 |
+
"ru": "Наши интегрированные инструменты ИИ, такие как GitForge Copilot, революционизируют процесс написания, тестирования и развертывания кода. Предоставляя интеллектуальные предложения и автоматизируя повторяющиеся задачи, мы даем командам возможность сосредоточиться на решении сложных проблем."
|
| 493 |
+
},
|
| 494 |
+
"section3-text2": {
|
| 495 |
+
"fr": "Combinée à nos pipelines CI/CD robustes, cette innovation se traduit par des versions plus rapides et un produit plus fiable. L'automatisation ne consiste pas seulement à gagner du temps ; il s'agit d'éliminer les risques et d'assurer la qualité à l'échelle.",
|
| 496 |
+
"en": "Combined with our robust CI/CD pipelines, this innovation translates into faster releases and a more reliable product. Automation isn't just about saving time; it's about eliminating risk and ensuring quality at scale.",
|
| 497 |
+
"es": "Combinada con nuestros robustos pipelines de CI/CD, esta innovación se traduce en lanzamientos más rápidos y un producto más confiable. La automatización no se trata solo de ahorrar tiempo; se trata de eliminar riesgos y garantizar la calidad a escala.",
|
| 498 |
+
"zh-CN": "结合我们强大的 CI/CD 流水线,这项创新转化为更快的发布和更可靠的产品。自动化不仅仅是为了节省时间;它关乎消除风险和确保规模化质量。",
|
| 499 |
+
"ja": "当社の堅牢なCI/CDパイプラインと組み合わせることで、このイノベーションはより迅速なリリースとより信頼性の高い製品につながります。自動化は時間の節約だけでなく、リスクを排除し、大規模な品質を確保することでもあります。",
|
| 500 |
+
"de": "In Kombination mit unseren robusten CI/CD-Pipelines führt diese Innovation zu schnelleren Releases und einem zuverlässigeren Produkt. Bei der Automatisierung geht es nicht nur darum, Zeit zu sparen, sondern auch darum, Risiken zu eliminieren und Qualität im großen Maßstab zu gewährleisten.",
|
| 501 |
+
"pt-BR": "Combinada com nossos pipelines robustos de CI/CD, essa inovação se traduz em lançamentos mais rápidos e um produto mais confiável. A automação não é apenas sobre economizar tempo; é sobre eliminar riscos e garantir a qualidade em escala.",
|
| 502 |
+
"ru": "В сочетании с нашими надежными конвейерами CI/CD эти инновации приводят к более быстрым выпускам и более надежному продукту. Автоматизация – это не только экономия времени, но и устранение рисков и обеспечение качества в масштабе."
|
| 503 |
+
},
|
| 504 |
+
"section4-title": {
|
| 505 |
+
"fr": "Sécurité, Conformité et Préparation pour l'Entreprise",
|
| 506 |
+
"en": "Security, Compliance, and Enterprise Readiness",
|
| 507 |
+
"es": "Seguridad, Cumplimiento y Preparación Empresarial",
|
| 508 |
+
"zh-CN": "安全、合规性和企业就绪度",
|
| 509 |
+
"ja": "セキュリティ、コンプライアンス、エンタープライズ対応",
|
| 510 |
+
"de": "Sicherheit, Compliance und Enterprise-Readiness",
|
| 511 |
+
"pt-BR": "Segurança, Conformidade e Preparação Empresarial",
|
| 512 |
+
"ru": "Безопасность, соответствие нормативным требованиям и готовность к работе в масштабе предприятия"
|
| 513 |
+
},
|
| 514 |
+
"section4-text1": {
|
| 515 |
+
"fr": "Pour les grandes organisations, la sécurité et la conformité sont primordiales. GitForge Advanced Security offre une analyse complète, une analyse des dépendances et une détection des secrets directement dans votre dépôt.",
|
| 516 |
+
"en": "For large organizations, security and compliance are paramount. GitForge Advanced Security provides comprehensive scanning, dependency analysis, and secret detection right in your repository.",
|
| 517 |
+
"es": "Para las grandes organizaciones, la seguridad y el cumplimiento son primordiales. GitForge Advanced Security proporciona escaneo completo, análisis de dependencias y detección de secretos directamente en su repositorio.",
|
| 518 |
+
"zh-CN": "对于大型组织而言,安全和合规性至关重要。GitForge Advanced Security 直接在您的存储库中提供全面的扫描、依赖项分析和秘密检测。",
|
| 519 |
+
"ja": "大規模な組織にとって、セキュリティとコンプライアンスは最重要です。GitForge Advanced Securityは、包括的なスキャン、依存関係分析、シークレット検出をリポジトリ内で直接提供します。",
|
| 520 |
+
"de": "Für große Organisationen sind Sicherheit und Compliance von größter Bedeutung. GitForge Advanced Security bietet umfassendes Scanning, Abhängigkeitsanalyse und Geheimniserkennung direkt in Ihrem Repository.",
|
| 521 |
+
"pt-BR": "Para grandes organizações, segurança e conformidade são primordiais. O GitForge Advanced Security oferece varredura abrangente, análise de dependência e detecção de segredos diretamente no seu repositório.",
|
| 522 |
+
"ru": "Для крупных организаций безопасность и соответствие нормативным требованиям имеют первостепенное значение. GitForge Advanced Security обеспечивает комплексное сканирование, анализ зависимостей и обнаружение секретов прямо в вашем репозитории."
|
| 523 |
+
},
|
| 524 |
+
"section4-text2": {
|
| 525 |
+
"fr": "De plus, des fonctionnalités telles que la Résidence des Données et les Utilisateurs Gérés par l'Entreprise garantissent que les équipes mondiales peuvent adhérer aux réglementations régionales tout en maintenant une gestion simplifiée des identités et des politiques au sein de plusieurs organisations.",
|
| 526 |
+
"en": "Furthermore, features like Data Residency and Enterprise Managed Users ensure that global teams can adhere to regional regulations while maintaining simplified identity and policy management across multiple organizations.",
|
| 527 |
+
"es": "Además, características como la Residencia de Datos y los Usuarios Gestionados por la Empresa aseguran que los equipos globales puedan adherirse a las regulaciones regionales mientras mantienen una gestión simplificada de identidad y políticas en múltiples organizaciones.",
|
| 528 |
+
"zh-CN": "此外,数据驻留和企业托管用户等功能确保全球团队可以遵守地区法规,同时在多个组织中保持简化的身份和策略管理。",
|
| 529 |
+
"ja": "さらに、データレジデンシーやエンタープライズ管理ユーザーなどの機能により、グローバルチームは地域の規制を遵守しつつ、複数の組織にわたる簡素化されたIDおよびポリシー管理を維持できます。",
|
| 530 |
+
"de": "Darüber hinaus stellen Funktionen wie Data Residency und Enterprise Managed Users sicher, dass globale Teams regionale Vorschriften einhalten können, während gleichzeitig eine vereinfachte Identitäts- und Richtlinienverwaltung über mehrere Organisationen hinweg beibehalten wird.",
|
| 531 |
+
"pt-BR": "Além disso, recursos como Residência de Dados e Usuários Gerenciados pela Empresa garantem que equipes globais possam aderir a regulamentações regionais enquanto mantêm uma gestão simplificada de identidade e políticas em várias organizações.",
|
| 532 |
+
"ru": "Более того, такие функции, как Резидентность Данных и Управляемые Предприятием Пользователи, гарантируют, что глобальные команды могут соблюдать региональные нормативы, сохраняя при этом упрощенное управление идентификацией и политиками в нескольких организациях."
|
| 533 |
+
},
|
| 534 |
+
"section7-title": {
|
| 535 |
+
"fr": "Actualités et Tendances : L'Écosystème GitForge",
|
| 536 |
+
"en": "News and Trends: The GitForge Ecosystem",
|
| 537 |
+
"es": "Noticias y Tendencias: El Ecosistema GitForge",
|
| 538 |
+
"zh-CN": "新闻和趋势:GitForge 生态系统",
|
| 539 |
+
"ja": "ニュースとトレンド:GitForgeエコシステム",
|
| 540 |
+
"de": "Neuigkeiten und Trends: Das GitForge-Ökosystem",
|
| 541 |
+
"pt-BR": "Notícias e Tendências: O Ecossistema GitForge",
|
| 542 |
+
"ru": "Новости и тенденции: Экосистема GitForge"
|
| 543 |
+
},
|
| 544 |
+
"section7-text1": {
|
| 545 |
+
"fr": "Restez à jour avec les dernières annonces de produits, les études de cas de clients qui réussissent et les tendances émergentes qui transforment le paysage du développement. Notre blog est votre source d'information privilégiée sur l'évolution de GitForge.",
|
| 546 |
+
"en": "Stay current with the latest product announcements, successful customer case studies, and emerging trends shaping the development landscape. Our blog is your go-to source for what's next at GitForge.",
|
| 547 |
+
"es": "Manténgase al día con los últimos anuncios de productos, estudios de casos de clientes exitosos y tendencias emergentes que transforman el panorama del desarrollo. Nuestro blog es su fuente de información de referencia sobre lo que vendrá en GitForge.",
|
| 548 |
+
"zh-CN": "随时了解最新的产品公告、成功的客户案例研究以及塑造开发格局的新兴趋势。我们的博客是您了解 GitForge 未来发展方向的首选资源。",
|
| 549 |
+
"ja": "最新の製品発表、成功したお客様の事例、開発環境を形作る新たなトレンドの情報を入手してください。当社のブログは、GitForgeの次の展開を知るための頼りになる情報源です。",
|
| 550 |
+
"de": "Bleiben Sie auf dem Laufenden mit den neuesten Produktankündigungen, erfolgreichen Kundenfallstudien und aufkommenden Trends, die die Entwicklungslandschaft prägen. Unser Blog ist Ihre erste Anlaufstelle für alles Neue bei GitForge.",
|
| 551 |
+
"pt-BR": "Mantenha-se atualizado com os últimos anúncios de produtos, estudos de caso de clientes bem-sucedidos e tendências emergentes que moldam o cenário do desenvolvimento. Nosso blog é sua fonte de informação essencial sobre o que está por vir na GitForge.",
|
| 552 |
+
"ru": "Будьте в курсе последних анонсов продуктов, успешных примеров из практики клиентов и новых тенденций, формирующих ландшафт разработки. Наш блог — ваш основной источник информации о будущем GitForge."
|
| 553 |
+
},
|
| 554 |
+
"section7-text2": {
|
| 555 |
+
"fr": "De la blockchain aux architectures sans serveur, nous couvrons les sujets qui comptent pour les ingénieurs et les leaders technologiques. Abonnez-vous à notre newsletter pour ne rien manquer.",
|
| 556 |
+
"en": "From blockchain to serverless architectures, we cover the topics that matter to engineers and technology leaders. Subscribe to our newsletter so you don't miss a thing.",
|
| 557 |
+
"es": "Desde blockchain hasta arquitecturas sin servidor, cubrimos los temas que son importantes para los ingenieros y líderes tecnológicos. Suscríbase a nuestro boletín para no perderse nada.",
|
| 558 |
+
"zh-CN": "从区块链到无服务器架构,我们涵盖了对工程师和技术领导者至关重要的话题。订阅我们的新闻通讯,确保您不会错过任何内容。",
|
| 559 |
+
"ja": "ブロックチェーンからサーバーレスアーキテクチャまで、エンジニアやテクノロジーリーダーにとって重要なトピックをカバーしています。ニュースレターを購読して、見逃さないようにしてください。",
|
| 560 |
+
"de": "Von Blockchain bis hin zu Serverless-Architekturen behandeln wir die Themen, die für Ingenieure und Technologieführer wichtig sind. Abonnieren Sie unseren Newsletter, um nichts zu verpassen.",
|
| 561 |
+
"pt-BR": "De blockchain a arquiteturas serverless, cobrimos os tópicos importantes para engenheiros e líderes de tecnologia. Assine nossa newsletter para não perder nada.",
|
| 562 |
+
"ru": "От блокчейна до бессерверных архитектур, мы освещаем темы, важные для инженеров и технологических лидеров. Подпишитесь на нашу рассылку, чтобы ничего не пропустить."
|
| 563 |
+
},
|
| 564 |
+
"section5-title": {
|
| 565 |
+
"fr": "Communauté, Open Source et Notre Mission",
|
| 566 |
+
"en": "Community, Open Source, and Our Mission",
|
| 567 |
+
"es": "Comunidad, Código Abierto y Nuestra Misión",
|
| 568 |
+
"zh-CN": "社区、开源和我们的使命",
|
| 569 |
+
"ja": "コミュニティ、オープンソース、そして私たちのミッション",
|
| 570 |
+
"de": "Community, Open Source und unsere Mission",
|
| 571 |
+
"pt-BR": "Comunidade, Código Aberto e Nossa Missão",
|
| 572 |
+
"ru": "Сообщество, открытый исходный код и наша миссия"
|
| 573 |
+
},
|
| 574 |
+
"section5-text1": {
|
| 575 |
+
"fr": "GitForge a commencé comme un engagement envers l'open source, et cet esprit continue de guider notre communauté. Nous proposons un plan Gratuit robuste, conçu pour les développeurs individuels et les petites équipes, offrant des dépôts publics et privés illimités.",
|
| 576 |
+
"en": "GitForge began as a commitment to open source, and that spirit continues to drive our community. We offer a robust Free plan, designed for individual developers and small teams, providing unlimited public and private repositories.",
|
| 577 |
+
"es": "GitForge comenzó como un compromiso con el código abierto, y ese espíritu continúa impulsando nuestra comunidad. Ofrecemos un robusto plan Gratuito, diseñado para desarrolladores individuales y equipos pequeños, que proporciona repositorios públicos y privados ilimitados.",
|
| 578 |
+
"zh-CN": "GitForge 最初是对开源的承诺,这种精神继续推动着我们的社区。我们提供了一个强大的免费计划,专为个人开发者和小型团队设计,提供无限制的公共和私有存储库。",
|
| 579 |
+
"ja": "GitForgeは、オープンソースへのコミットメントとして始まり、その精神が私たちのコミュニティを牽引し続けています。個人開発者や小規模チーム向けに設計された堅牢な無料プランを提供しており、無制限のパブリックおよびプライベートリポジトリを提供しています。",
|
| 580 |
+
"de": "GitForge begann als Verpflichtung zu Open Source, und dieser Geist treibt unsere Community weiterhin an. Wir bieten einen robusten kostenlosen Plan, der für einzelne Entwickler und kleine Teams konzipiert ist und unbegrenzte öffentliche und private Repositories bietet.",
|
| 581 |
+
"pt-BR": "A GitForge começou como um compromisso com o código aberto, e esse espírito continua a impulsionar nossa comunidade. Oferecemos um robusto plano Gratuito, projetado para desenvolvedores individuais e pequenas equipes, fornecendo repositórios públicos e privados ilimitados.",
|
| 582 |
+
"ru": "GitForge начинался как приверженность открытому исходному коду, и этот дух продолжает развивать наше сообщество. Мы предлагаем надежный бесплатный план, разработанный для индивидуальных разработчиков и небольших команд, предоставляющий неограниченное количество публичных и частных репозиториев."
|
| 583 |
+
},
|
| 584 |
+
"section5-text2": {
|
| 585 |
+
"fr": "Notre mission est de favoriser un espace où tout développeur, où qu'il se trouve, peut contribuer et construire la prochaine grande innovation logicielle. Rejoignez les millions de développeurs qui construisent déjà l'avenir avec GitForge.",
|
| 586 |
+
"en": "Our mission is to foster a space where any developer, anywhere, can contribute to and build the next great software innovation. Join the millions of developers who are already building the future with GitForge.",
|
| 587 |
+
"es": "Nuestra misión es fomentar un espacio donde cualquier desarrollador, en cualquier lugar, pueda contribuir y construir la próxima gran innovación de software. Únase a los millones de desarrolladores que ya están construyendo el futuro con GitForge.",
|
| 588 |
+
"zh-CN": "我们的使命是培养一个空间,让任何地方的任何开发人员都能为下一个伟大的软件创新做出贡献和构建。加入数百万已经在用 GitForge 构建未来的开发人员行列。",
|
| 589 |
+
"ja": "私たちのミッションは、あらゆる場所のあらゆる開発者が、次の偉大なソフトウェアイノベーションに貢献し、構築できる空間を育むことです。すでにGitForgeで未来を築いている何百万もの開発者に加わりましょう。",
|
| 590 |
+
"de": "Unsere Mission ist es, einen Raum zu schaffen, in dem jeder Entwickler, überall, zur nächsten großen Softwareinnovation beitragen und diese aufbauen kann. Schließen Sie sich den Millionen von Entwicklern an, die bereits mit GitForge die Zukunft gestalten.",
|
| 591 |
+
"pt-BR": "Nossa missão é promover um espaço onde qualquer desenvolvedor, em qualquer lugar, possa contribuir e construir a próxima grande inovação de software. Junte-se aos milhões de desenvolvedores que já estão construindo o futuro com a GitForge.",
|
| 592 |
+
"ru": "Наша миссия — создать пространство, где любой разработчик, где бы он ни находился, может внести свой вклад и создать следующую великую программную инновацию. Присоединяйтесь к миллионам разработчиков, которые уже строят будущее с помощью GitForge."
|
| 593 |
+
},
|
| 594 |
+
"cta-title": {
|
| 595 |
+
"fr": "Prêt à Construire l'Avenir avec GitForge ?",
|
| 596 |
+
"en": "Ready to Build the Future with GitForge?",
|
| 597 |
+
"es": "¿Listo para Construir el Futuro con GitForge?",
|
| 598 |
+
"zh-CN": "准备好使用 GitForge 构建未来了吗?",
|
| 599 |
+
"ja": "GitForgeで未来を築��準備はできていますか?",
|
| 600 |
+
"de": "Bereit, die Zukunft mit GitForge zu gestalten?",
|
| 601 |
+
"pt-BR": "Pronto para Construir o Futuro com a GitForge?",
|
| 602 |
+
"ru": "Готовы строить будущее с GitForge?"
|
| 603 |
+
},
|
| 604 |
+
"cta-desc": {
|
| 605 |
+
"fr": "Explorez notre plateforme, consultez nos ressources ou rejoignez la discussion sur nos forums communautaires.",
|
| 606 |
+
"en": "Explore our platform, check out our resources, or join the discussion in our community forums.",
|
| 607 |
+
"es": "Explore nuestra plataforma, consulte nuestros recursos o únase a la discusión en nuestros foros comunitarios.",
|
| 608 |
+
"zh-CN": "探索我们的平台,查看我们的资源,或加入我们的社区论坛讨论。",
|
| 609 |
+
"ja": "プラットフォームを探索したり、リソースを確認したり、コミュニティフォーラムでディスカッションに参加したりしてください。",
|
| 610 |
+
"de": "Erkunden Sie unsere Plattform, sehen Sie sich unsere Ressourcen an oder nehmen Sie an der Diskussion in unseren Community-Foren teil.",
|
| 611 |
+
"pt-BR": "Explore nossa plataforma, confira nossos recursos ou junte-se à discussão em nossos fóruns da comunidade.",
|
| 612 |
+
"ru": "Изучите нашу платформу, ознакомьтесь с нашими ресурсами или присоединяйтесь к обсуждению на наших форумах сообщества."
|
| 613 |
+
},
|
| 614 |
+
|
| 615 |
+
// Footer Translations (retained/adjusted)
|
| 616 |
+
"footer-slogan": { "fr": "La plateforme DevOps unifiée, optimisée par l'IA.", "en": "The unified DevOps platform, powered by AI.", "es": "La plataforma DevOps unificada, impulsada por IA.", "zh-CN": "统一的 DevOps 平台,由 AI 提供支持。", "ja": "AIを搭載した統合DevOpsプラットフォーム。", "de": "Die vereinheitlichte DevOps-Plattform, unterstützt durch KI.", "pt-BR": "A plataforma DevOps unificada, potencializada por IA.", "ru": "Единая платформа DevOps на базе ИИ." },
|
| 617 |
+
"footer-product": { "fr": "Produit", "en": "Product", "es": "Producto", "zh-CN": "产品", "ja": "製品", "de": "Produkt", "pt-BR": "Produto", "ru": "Продукт" },
|
| 618 |
+
"footer-features": { "fr": "Fonctionnalités", "en": "Features", "es": "Características", "zh-CN": "功能", "ja": "機能", "de": "Funktionen", "pt-BR": "Funcionalidades", "ru": "Возможности" },
|
| 619 |
+
"footer-security": { "fr": "Sécurité", "en": "Security", "es": "Seguridad", "zh-CN": "安全", "ja": "セキュリティ", "de": "Sicherheit", "pt-BR": "Segurança", "ru": "Безопасность" },
|
| 620 |
+
"footer-team": { "fr": "Équipe", "en": "Team", "es": "Equipo", "zh-CN": "团队", "ja": "チーム", "de": "Team", "pt-BR": "Equipe", "ru": "Команда" },
|
| 621 |
+
"footer-enterprise": { "fr": "Entreprise", "en": "Enterprise", "es": "Empresa", "zh-CN": "企业版", "ja": "エンタープライズ", "de": "Enterprise", "pt-BR": "Empresarial", "ru": "Корпоративный" },
|
| 622 |
+
"footer-company": { "fr": "Entreprise", "en": "Company", "es": "Compañía", "zh-CN": "公司", "ja": "企業情報", "de": "Unternehmen", "pt-BR": "Empresa", "ru": "Компания" },
|
| 623 |
+
"footer-about": { "fr": "À propos de nous", "en": "About us", "es": "Acerca de nosotros", "zh-CN": "关于我们", "ja": "会社概要", "de": "Über uns", "pt-BR": "Sobre nós", "ru": "О нас" },
|
| 624 |
+
"footer-customers": { "fr": "Clients", "en": "Customers", "es": "Clientes", "zh-CN": "客户", "ja": "顧客", "de": "Kunden", "pt-BR": "Clientes", "ru": "Клиенты" },
|
| 625 |
+
"footer-careers": { "fr": "Carrières", "en": "Careers", "es": "Carreras", "zh-CN": "职业", "ja": "採用情報", "de": "Karriere", "pt-BR": "Carreiras", "ru": "Карьера" },
|
| 626 |
+
"footer-support": { "fr": "Support", "en": "Support", "es": "Soporte", "zh-CN": "支持", "ja": "サポート", "de": "Support", "pt-BR": "Suporte", "ru": "Поддержка" },
|
| 627 |
+
"footer-faq": { "fr": "FAQ", "en": "FAQ", "es": "FAQ", "zh-CN": "常见问题", "ja": "よくある質問", "de": "FAQ", "pt-BR": "FAQ", "ru": "Часто задаваемые вопросы" },
|
| 628 |
+
"footer-resources": { "fr": "Ressources", "en": "Resources", "es": "Recursos", "zh-CN": "资源", "ja": "リソース", "de": "Ressourcen", "pt-BR": "Recursos", "ru": "Ресурсы" },
|
| 629 |
+
"footer-contact-email": { "fr": "Contact Email", "en": "Contact Email", "es": "Correo de Contacto", "zh-CN": "联系邮箱", "ja": "連絡先メール", "de": "Kontakt-E-Mail", "pt-BR": "E-mail de Contato", "ru": "Контактный адрес электронной почты" },
|
| 630 |
+
"footer-status": { "fr": "Statut du Service", "en": "Service Status", "es": "Estado del Servicio", "zh-CN": "服务状态", "ja": "サービス状況", "de": "Servicestatus", "pt-BR": "Status do Serviço", "ru": "Статус сервиса" },
|
| 631 |
+
"footer-blog": { "fr": "Blog Tech", "en": "Tech Blog", "es": "Blog de Tecnología", "zh-CN": "技术博客", "ja": "テックブログ", "de": "Tech-Blog", "pt-BR": "Blog de Tecnologia", "ru": "Технический блог" },
|
| 632 |
+
"footer-copyright": {
|
| 633 |
+
"fr": "© 2025 GitForge. Tous droits réservés. Propulsé par la <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plateforme GitForge</a>.",
|
| 634 |
+
"en": "© 2025 GitForge. All rights reserved. Powered by the <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge Platform</a>.",
|
| 635 |
+
"es": "© 2025 GitForge. Todos los derechos reservados. Impulsado por la <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plataforma GitForge</a>.",
|
| 636 |
+
"zh-CN": "© 2025 GitForge。保留所有权利。由 <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge 平台</a> 提供支持。",
|
| 637 |
+
"ja": "© 2025 GitForge. 無断複写・転載を禁じます。<a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge プラットフォーム</a>によって提供されます。",
|
| 638 |
+
"de": "© 2025 GitForge. Alle Rechte vorbehalten. Unterstützt durch die <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge Plattform</a>.",
|
| 639 |
+
"pt-BR": "© 2025 GitForge. Todos os direitos reservados. Alimentado pela <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plataforma GitForge</a>.",
|
| 640 |
+
"ru": "© 2025 GitForge. Все права защищены. Работает на базе <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Платформы GitForge</a>."
|
| 641 |
+
},
|
| 642 |
+
"footer-legal": { "fr": "Mentions Légales", "en": "Legal", "es": "Legal", "zh-CN": "法律", "ja": "法務", "de": "Rechtliches", "pt-BR": "Legal", "ru": "Правовая информация" },
|
| 643 |
+
"footer-privacy": { "fr": "Confidentialité", "en": "Privacy", "es": "Privacidad", "zh-CN": "隐私", "ja": "プライバシー", "de": "Datenschutz", "pt-BR": "Privacidade", "ru": "Конфиденциальность" },
|
| 644 |
+
"footer-security-policy": { "fr": "Politique de Sécurité", "en": "Security Policy", "es": "Política de Seguridad", "zh-CN": "安全政策", "ja": "セキュリティポリシー", "de": "Sicherheitsrichtlinie", "pt-BR": "Política de Segurança", "ru": "Политика безопасности" }
|
| 645 |
+
};
|
| 646 |
+
|
| 647 |
+
// Function to update content based on the selected language
|
| 648 |
+
const applyTranslations = (lang) => {
|
| 649 |
+
currentLang = lang;
|
| 650 |
+
document.querySelectorAll('[data-translate]').forEach(element => {
|
| 651 |
+
const key = element.getAttribute('data-translate');
|
| 652 |
+
if (translations[key] && translations[key][lang]) {
|
| 653 |
+
// Check if it's a link in the footer-copyright and update innerHTML if so
|
| 654 |
+
if (key === 'footer-copyright') {
|
| 655 |
+
element.innerHTML = translations[key][lang];
|
| 656 |
+
} else {
|
| 657 |
+
element.textContent = translations[key][lang];
|
| 658 |
+
}
|
| 659 |
+
}
|
| 660 |
+
});
|
| 661 |
+
|
| 662 |
+
// Update page title
|
| 663 |
+
const titleElement = document.querySelector('title');
|
| 664 |
+
if (titleElement) {
|
| 665 |
+
const titleKey = titleElement.getAttribute('data-translate');
|
| 666 |
+
if (translations[titleKey] && translations[titleKey][lang]) {
|
| 667 |
+
titleElement.textContent = translations[titleKey][lang];
|
| 668 |
+
}
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
// Update current language display
|
| 672 |
+
const currentLangName = document.getElementById('current-lang-name');
|
| 673 |
+
const currentFlag = document.getElementById('current-flag');
|
| 674 |
+
if (currentLangName) {
|
| 675 |
+
switch(lang) {
|
| 676 |
+
case 'fr':
|
| 677 |
+
currentLangName.textContent = 'Français';
|
| 678 |
+
currentFlag.textContent = '🇫🇷';
|
| 679 |
+
break;
|
| 680 |
+
case 'es':
|
| 681 |
+
currentLangName.textContent = 'Español';
|
| 682 |
+
currentFlag.textContent = '🇪🇸';
|
| 683 |
+
break;
|
| 684 |
+
case 'zh-CN':
|
| 685 |
+
currentLangName.textContent = '简体中文';
|
| 686 |
+
currentFlag.textContent = '🇨🇳';
|
| 687 |
+
break;
|
| 688 |
+
case 'ja':
|
| 689 |
+
currentLangName.textContent = '日本語';
|
| 690 |
+
currentFlag.textContent = '🇯🇵';
|
| 691 |
+
break;
|
| 692 |
+
case 'de':
|
| 693 |
+
currentLangName.textContent = 'Deutsch';
|
| 694 |
+
currentFlag.textContent = '🇩🇪';
|
| 695 |
+
break;
|
| 696 |
+
case 'pt-BR':
|
| 697 |
+
currentLangName.textContent = 'Português (Brasil)';
|
| 698 |
+
currentFlag.textContent = '🇧🇷';
|
| 699 |
+
break;
|
| 700 |
+
case 'ru':
|
| 701 |
+
currentLangName.textContent = 'Русский';
|
| 702 |
+
currentFlag.textContent = '🇷🇺';
|
| 703 |
+
break;
|
| 704 |
+
case 'en': // 'en' or default
|
| 705 |
+
default:
|
| 706 |
+
currentLangName.textContent = 'English';
|
| 707 |
+
currentFlag.textContent = '🇺🇸';
|
| 708 |
+
break;
|
| 709 |
+
}
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
// Update HTML lang attribute
|
| 713 |
+
document.documentElement.lang = lang;
|
| 714 |
+
};
|
| 715 |
+
|
| 716 |
+
// Function to setup the accordion/dropdown functionality for features (Not needed for blog, but keeping for reference/future use)
|
| 717 |
+
const setupAccordion = () => {
|
| 718 |
+
document.querySelectorAll('.feature-list-item').forEach(item => {
|
| 719 |
+
const details = item.querySelector('.feature-details');
|
| 720 |
+
// We will disable the click behavior for the blog page, but keep the classes for styling clarity.
|
| 721 |
+
// item.addEventListener('click', () => {
|
| 722 |
+
// const isOpen = details.classList.contains('open');
|
| 723 |
+
// document.querySelectorAll('.feature-details.open').forEach(openDetails => {
|
| 724 |
+
// openDetails.classList.remove('open');
|
| 725 |
+
// openDetails.closest('.feature-list-item').classList.remove('open');
|
| 726 |
+
// });
|
| 727 |
+
// if (!isOpen) {
|
| 728 |
+
// details.classList.add('open');
|
| 729 |
+
// item.classList.add('open');
|
| 730 |
+
// }
|
| 731 |
+
// });
|
| 732 |
+
});
|
| 733 |
+
};
|
| 734 |
+
|
| 735 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 736 |
+
// Language selector toggle logic
|
| 737 |
+
const langButton = document.getElementById('lang-menu-button');
|
| 738 |
+
const langDropdown = document.getElementById('lang-menu-dropdown');
|
| 739 |
+
|
| 740 |
+
if (langButton && langDropdown) {
|
| 741 |
+
langButton.addEventListener('click', (e) => {
|
| 742 |
+
e.stopPropagation();
|
| 743 |
+
langDropdown.style.display = langDropdown.style.display === 'block' ? 'none' : 'block';
|
| 744 |
+
});
|
| 745 |
+
|
| 746 |
+
document.addEventListener('click', (e) => {
|
| 747 |
+
if (!langButton.contains(e.target) && !langDropdown.contains(e.target)) {
|
| 748 |
+
langDropdown.style.display = 'none'; // Close dropdown after selection
|
| 749 |
+
}
|
| 750 |
+
});
|
| 751 |
+
|
| 752 |
+
// Language selection logic
|
| 753 |
+
document.querySelectorAll('.lang-option').forEach(option => {
|
| 754 |
+
option.addEventListener('click', (e) => {
|
| 755 |
+
e.preventDefault();
|
| 756 |
+
const newLang = option.getAttribute('data-lang');
|
| 757 |
+
applyTranslations(newLang);
|
| 758 |
+
langDropdown.style.display = 'none'; // Close dropdown after selection
|
| 759 |
+
});
|
| 760 |
+
});
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
// Initial load: Apply English translations by default
|
| 764 |
+
applyTranslations(currentLang);
|
| 765 |
+
});
|
| 766 |
+
</script>
|
| 767 |
+
</body>
|
| 768 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/careers.html
ADDED
|
@@ -0,0 +1,625 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title data-translate="page-title">GitForge Careers</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
+
<style>
|
| 12 |
+
/* Custom Tailwind Configuration */
|
| 13 |
+
.bg-header { background-color: #f7f9fc; }
|
| 14 |
+
.header-border { border-color: #e5e7eb; }
|
| 15 |
+
.text-blue-600-var { color: #2563eb; }
|
| 16 |
+
.border-blue-600-var { border-color: #2563eb; }
|
| 17 |
+
.bg-blue-600-var { background-color: #2563eb; }
|
| 18 |
+
.hover\:bg-blue-700-var:hover { background-color: #1d4ed8; }
|
| 19 |
+
.text-gray-900-var { color: #1f2937; }
|
| 20 |
+
|
| 21 |
+
/* Ensure the language dropdown is visible */
|
| 22 |
+
.lang-dropdown-container {
|
| 23 |
+
position: relative;
|
| 24 |
+
}
|
| 25 |
+
.lang-menu-dropdown {
|
| 26 |
+
position: absolute;
|
| 27 |
+
left: 0;
|
| 28 |
+
bottom: 100%;
|
| 29 |
+
margin-bottom: 0.5rem;
|
| 30 |
+
width: 10rem;
|
| 31 |
+
background-color: #ffffff;
|
| 32 |
+
border-radius: 0.375rem;
|
| 33 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 34 |
+
z-index: 50;
|
| 35 |
+
border: 1px solid #e5e7eb;
|
| 36 |
+
display: none;
|
| 37 |
+
}
|
| 38 |
+
.lang-menu-dropdown a {
|
| 39 |
+
color: #1f2937;
|
| 40 |
+
}
|
| 41 |
+
.lang-menu-dropdown a:hover {
|
| 42 |
+
background-color: #f3f4f6;
|
| 43 |
+
color: #2563eb;
|
| 44 |
+
}
|
| 45 |
+
/* Custom style adjustments for the footer text to look good on a light background */
|
| 46 |
+
footer .text-white { color: #1f2937 !important; }
|
| 47 |
+
footer .text-gray-400 { color: #6b7280 !important; }
|
| 48 |
+
footer .border-t.border-[#4b5563] { border-color: #e5e7eb !important; }
|
| 49 |
+
footer .text-gray-500 { color: #6b7280 !important; }
|
| 50 |
+
|
| 51 |
+
/* Hero Section Specific Styling */
|
| 52 |
+
.hero-section {
|
| 53 |
+
background-image: url('https://i.postimg.cc/2SYwvD1Z/Gemini-Generated-Image-otagaiotagaiotag.jpg'); /* Image 1 */
|
| 54 |
+
background-size: cover;
|
| 55 |
+
background-position: center;
|
| 56 |
+
position: relative;
|
| 57 |
+
}
|
| 58 |
+
.hero-overlay {
|
| 59 |
+
background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
|
| 60 |
+
}
|
| 61 |
+
</style>
|
| 62 |
+
</head>
|
| 63 |
+
<body class="bg-white text-gray-900 font-sans">
|
| 64 |
+
|
| 65 |
+
<header class="sticky top-0 z-50 bg-white border-b border-gray-200">
|
| 66 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
|
| 67 |
+
<div class="flex items-center space-x-8">
|
| 68 |
+
<a href="#" class="text-2xl font-bold text-gray-900 flex items-center">
|
| 69 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6 w-6 mr-2">
|
| 70 |
+
<span data-translate="site-name">GitForge</span>
|
| 71 |
+
</a>
|
| 72 |
+
<nav class="hidden md:flex space-x-6 text-sm font-medium text-gray-700">
|
| 73 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var" data-translate="nav-platform">Platform</a>
|
| 74 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-solutions">Company</a>
|
| 75 |
+
<a href="/mindus/nexus/resources" class="hover:text-blue-600-var" data-translate="nav-resources">Resources</a>
|
| 76 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-opensource">Contact us</a>
|
| 77 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var" data-translate="nav-enterprise">Enterprise</a>
|
| 78 |
+
<a href="/mindus/nexus/careers" class="hover:text-blue-600-var text-blue-600-var" data-translate="nav-careers">Careers</a>
|
| 79 |
+
</nav>
|
| 80 |
+
</div>
|
| 81 |
+
<div class="flex items-center space-x-4">
|
| 82 |
+
<a href="/mindus/nexus/form_gitforge" class="px-4 py-2 text-sm font-medium rounded-md bg-gray-800 hover:bg-gray-900 text-white transition" data-translate="btn-join-community">Join Our Talent Community</a>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
</header>
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
<main>
|
| 90 |
+
|
| 91 |
+
<section class="hero-section text-white py-24 md:py-36">
|
| 92 |
+
<div class="hero-overlay absolute inset-0"></div>
|
| 93 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 text-center relative z-10">
|
| 94 |
+
<h1 class="text-5xl md:text-7xl font-extrabold mb-6 max-w-5xl mx-auto" data-translate="hero-title">Forge Your Future with GitForge</h1>
|
| 95 |
+
<p class="text-xl md:text-2xl font-light mb-10 max-w-4xl mx-auto" data-translate="hero-subtitle">Join us in building the unified DevOps platform that empowers millions of developers worldwide.</p>
|
| 96 |
+
<a href="#open-positions" class="inline-block bg-blue-600-var hover:bg-blue-700-var text-white font-semibold py-3 px-8 rounded-md transition duration-300 text-lg shadow-lg" data-translate="hero-cta">Explore Open Positions</a>
|
| 97 |
+
</div>
|
| 98 |
+
</section>
|
| 99 |
+
|
| 100 |
+
<section class="py-16 md:py-24">
|
| 101 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 102 |
+
<div class="flex flex-col lg:flex-row items-center lg:space-x-12">
|
| 103 |
+
<div class="lg:w-1/2 mb-8 lg:mb-0">
|
| 104 |
+
<img src="https://images.unsplash.com/photo-1542831371-29b0f74f9713?auto=format&fit=crop&w=1280&q=80" alt="Code on a screen representing our mission" class="rounded-xl shadow-2xl w-full" style="height: auto; max-height: 400px; object-fit: cover;"> </div>
|
| 105 |
+
<div class="lg:w-1/2">
|
| 106 |
+
<span class="text-sm font-semibold uppercase text-blue-600-var mb-2 block" data-translate="mission-tag">Our Impact</span>
|
| 107 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var mb-6" data-translate="mission-title">The heart of innovation</h2>
|
| 108 |
+
<p class="text-lg text-gray-600 mb-4" data-translate="mission-text-1">At GitForge, we believe in the power of code to change the world. Our mission is to provide every developer with the tools they need to build, secure, and deploy software faster than ever before. We are constantly pushing the boundaries of what is possible in DevOps and AI-assisted development.</p>
|
| 109 |
+
<p class="text-lg text-gray-600" data-translate="mission-text-2">Joining our team means working on high-impact projects that influence the daily lives of millions of developers, from open-source contributors to large enterprise teams.</p>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
</section>
|
| 114 |
+
|
| 115 |
+
<section class="bg-gray-50 py-16 md:py-24">
|
| 116 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 117 |
+
<div class="flex flex-col lg:flex-row-reverse items-center lg:space-x-reverse lg:space-x-12">
|
| 118 |
+
<div class="lg:w-1/2 mb-8 lg:mb-0">
|
| 119 |
+
<img src="https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1280&q=80" alt="Team collaborating on a project" class="rounded-xl shadow-2xl w-full" style="height: auto; max-height: 400px; object-fit: cover;"> </div>
|
| 120 |
+
<div class="lg:w-1/2">
|
| 121 |
+
<span class="text-sm font-semibold uppercase text-blue-600-var mb-2 block" data-translate="culture-tag">Team Spirit</span>
|
| 122 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var mb-6" data-translate="culture-title">A Culture of Openness and Trust</h2>
|
| 123 |
+
<ul class="space-y-4 text-gray-700 text-lg">
|
| 124 |
+
<li class="flex items-start">
|
| 125 |
+
<i class="fas fa-users text-blue-600-var mt-1 mr-3 text-xl"></i>
|
| 126 |
+
<span data-translate="culture-point-1">**Collaboration First:** We succeed as a team, not as individuals.</span>
|
| 127 |
+
</li>
|
| 128 |
+
<li class="flex items-start">
|
| 129 |
+
<i class="fas fa-lightbulb text-blue-600-var mt-1 mr-3 text-xl"></i>
|
| 130 |
+
<span data-translate="culture-point-2">**Ownership & Autonomy:** You have the space to innovate and lead.</span>
|
| 131 |
+
</li>
|
| 132 |
+
<li class="flex items-start">
|
| 133 |
+
<i class="fas fa-coffee text-blue-600-var mt-1 mr-3 text-xl"></i>
|
| 134 |
+
<span data-translate="culture-point-3">**Work-Life Balance:** Sustainable pace is key to long-term success.</span>
|
| 135 |
+
</li>
|
| 136 |
+
</ul>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
</section>
|
| 141 |
+
|
| 142 |
+
<section class="py-16 md:py-24">
|
| 143 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 144 |
+
<div class="text-center mb-12">
|
| 145 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var" data-translate="benefits-title">Invest in Your Well-Being</h2>
|
| 146 |
+
<p class="text-lg text-gray-600 mt-3" data-translate="benefits-subtitle">We offer competitive benefits designed to support you and your family.</p>
|
| 147 |
+
</div>
|
| 148 |
+
<div class="flex flex-col lg:flex-row items-center lg:space-x-12">
|
| 149 |
+
<div class="lg:w-1/2 mb-8 lg:mb-0">
|
| 150 |
+
<ul class="space-y-6 text-gray-700 text-lg">
|
| 151 |
+
<li class="flex items-center">
|
| 152 |
+
<i class="fas fa-heartbeat text-blue-600-var mr-4 text-2xl"></i>
|
| 153 |
+
<span data-translate="benefit-1">Comprehensive Health Coverage and Wellness Programs.</span>
|
| 154 |
+
</li>
|
| 155 |
+
<li class="flex items-center">
|
| 156 |
+
<i class="fas fa-graduation-cap text-blue-600-var mr-4 text-2xl"></i>
|
| 157 |
+
<span data-translate="benefit-2">Learning & Development Stipends (Image 4 related to this).</span>
|
| 158 |
+
</li>
|
| 159 |
+
<li class="flex items-center">
|
| 160 |
+
<i class="fas fa-home text-blue-600-var mr-4 text-2xl"></i>
|
| 161 |
+
<span data-translate="benefit-3">Flexible Work Policy and Remote Opportunities.</span>
|
| 162 |
+
</li>
|
| 163 |
+
<li class="flex items-center">
|
| 164 |
+
<i class="fas fa-sack-dollar text-blue-600-var mr-4 text-2xl"></i>
|
| 165 |
+
<span data-translate="benefit-4">Competitive Salary, Bonus Plans, and Stock Options.</span>
|
| 166 |
+
</li>
|
| 167 |
+
<li class="flex items-center">
|
| 168 |
+
<i class="fas fa-plane text-blue-600-var mr-4 text-2xl"></i>
|
| 169 |
+
<span data-translate="benefit-5">Generous Paid Time Off and Parental Leave.</span>
|
| 170 |
+
</li>
|
| 171 |
+
</ul>
|
| 172 |
+
</div>
|
| 173 |
+
<div class="lg:w-1/2">
|
| 174 |
+
<img src="https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1280&q=80" alt="A stack of books symbolizing learning and growth" class="rounded-xl shadow-2xl w-full" style="height: auto; max-height: 400px; object-fit: cover;"> </div>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
</section>
|
| 178 |
+
|
| 179 |
+
<section class="bg-gray-50 py-16 md:py-24">
|
| 180 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 text-center">
|
| 181 |
+
<span class="text-sm font-semibold uppercase text-blue-600-var mb-2 block" data-translate="dei-tag">Inclusion is Our Strength</span>
|
| 182 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var mb-6" data-translate="dei-title">Building a Truly Global Team</h2>
|
| 183 |
+
<p class="text-lg text-gray-600 mb-8 max-w-3xl mx-auto" data-translate="dei-text-1">We are committed to building a diverse workplace where everyone feels respected and has the opportunity to contribute their best work. Different perspectives are essential to building a platform that serves the world.</p>
|
| 184 |
+
<img src="https://images.unsplash.com/photo-1537432376769-00a0a046da42f?auto=format&fit=crop&w=1280&q=80" alt="Diverse team collaborating around a laptop" class="rounded-xl shadow-2xl w-full lg:w-3/4 mx-auto" style="height: auto; max-height: 450px; object-fit: cover;"> </div>
|
| 185 |
+
</section>
|
| 186 |
+
|
| 187 |
+
<section class="py-16 md:py-24 bg-blue-600-var text-white">
|
| 188 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 text-center">
|
| 189 |
+
<h2 class="text-4xl md:text-5xl font-extrabold mb-6" data-translate="investment-title">Strategic Partnership & Seed Funding</h2>
|
| 190 |
+
<p class="text-xl font-light mb-8 max-w-4xl mx-auto" data-translate="investment-text-1">GitForge is ready for global launch. We seek strategic partners and seed investors to secure our infrastructure and formalize our operations in France.</p>
|
| 191 |
+
<div class="space-y-4 md:space-y-0 md:space-x-8">
|
| 192 |
+
<p class="text-lg font-medium mb-8" data-translate="investment-need">Our immediate needs: Company registration (France), dedicated server infrastructure (Dynamic Hosting), and corporate domain acquisition.</p>
|
| 193 |
+
<a href="/mindus/nexus/contact" class="inline-block bg-white text-blue-600-var hover:bg-gray-100 font-semibold py-3 px-8 rounded-md transition duration-300 text-lg shadow-xl" data-translate="investment-cta">Contact Partnership Team</a>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
</section>
|
| 197 |
+
<section class="py-16 md:py-24">
|
| 198 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 199 |
+
<div class="text-center mb-12">
|
| 200 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var" data-translate="values-title">Our Core Values</h2>
|
| 201 |
+
<p class="text-lg text-gray-600 mt-3" data-translate="values-subtitle">These principles guide our decisions and our development culture.</p>
|
| 202 |
+
</div>
|
| 203 |
+
<div class="grid md:grid-cols-3 gap-8">
|
| 204 |
+
<div class="p-6 border border-gray-100 rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 205 |
+
<i class="fas fa-rocket text-blue-600-var text-3xl mb-4"></i>
|
| 206 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="value-1-title">Innovation</h3>
|
| 207 |
+
<p class="text-gray-600" data-translate="value-1-text">We constantly experiment with new technologies, from AI to serverless infrastructure, to stay ahead.</p>
|
| 208 |
+
</div>
|
| 209 |
+
<div class="p-6 border border-gray-100 rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 210 |
+
<i class="fas fa-lock text-blue-600-var text-3xl mb-4"></i>
|
| 211 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="value-2-title">Security First</h3>
|
| 212 |
+
<p class="text-gray-600" data-translate="value-2-text">Security is baked into everything we build, ensuring trust for our users and customers.</p>
|
| 213 |
+
</div>
|
| 214 |
+
<div class="p-6 border border-gray-100 rounded-lg shadow-md hover:shadow-xl transition duration-300">
|
| 215 |
+
<i class="fas fa-globe text-blue-600-var text-3xl mb-4"></i>
|
| 216 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="value-3-title">Global Impact</h3>
|
| 217 |
+
<p class="text-gray-600" data-translate="value-3-text">We build products that are used everywhere, fostering a global mindset and responsibility.</p>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
<div class="mt-12 text-center">
|
| 221 |
+
<img src="https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?auto=format&fit=crop&w=1280&q=80" alt="Server rack and tech equipment" class="rounded-xl shadow-2xl w-full lg:w-2/3 mx-auto" style="height: auto; max-height: 400px; object-fit: cover;"> </div>
|
| 222 |
+
</div>
|
| 223 |
+
</section>
|
| 224 |
+
|
| 225 |
+
<section id="open-positions" class="bg-gray-50 py-16 md:py-24">
|
| 226 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 227 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var mb-10 text-center" data-translate="positions-title">Current Openings</h2>
|
| 228 |
+
<div class="grid lg:grid-cols-3 gap-8">
|
| 229 |
+
<a href="/mindus/nexus/form_gitforge" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-lg hover:border-blue-600-var transition duration-300 group">
|
| 230 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2 group-hover:text-blue-600-var" data-translate="job-1-title">Senior Frontend Engineer</h3>
|
| 231 |
+
<p class="text-gray-600 mb-4 text-sm" data-translate="job-1-location">Remote (Europe)</p>
|
| 232 |
+
<p class="text-gray-700" data-translate="job-1-desc">Develop and maintain the core GitForge user interface, focusing on performance and user experience.</p>
|
| 233 |
+
<span class="mt-4 inline-block text-blue-600-var font-medium text-sm group-hover:underline" data-translate="apply-now">Apply Now →</span>
|
| 234 |
+
</a>
|
| 235 |
+
<a href="/mindus/nexus/form_gitforge" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-lg hover:border-blue-600-var transition duration-300 group">
|
| 236 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2 group-hover:text-blue-600-var" data-translate="job-2-title">AI/ML Research Scientist</h3>
|
| 237 |
+
<p class="text-gray-600 mb-4 text-sm" data-translate="job-2-location">San Francisco, CA</p>
|
| 238 |
+
<p class="text-gray-700" data-translate="job-2-desc">Drive innovation for GitForge Copilot and our advanced security features.</p>
|
| 239 |
+
<span class="mt-4 inline-block text-blue-600-var font-medium text-sm group-hover:underline" data-translate="apply-now">Apply Now →</span>
|
| 240 |
+
</a>
|
| 241 |
+
<a href="/mindus/nexus/form_gitforge" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-lg hover:border-blue-600-var transition duration-300 group">
|
| 242 |
+
<h3 class="text-xl font-bold text-gray-900-var mb-2 group-hover:text-blue-600-var" data-translate="job-3-title">Product Designer (UX)</h3>
|
| 243 |
+
<p class="text-gray-600 mb-4 text-sm" data-translate="job-3-location">Remote (Global)</p>
|
| 244 |
+
<p class="text-gray-700" data-translate="job-3-desc">Shape the design language and user flows across the entire GitForge platform.</p>
|
| 245 |
+
<span class="mt-4 inline-block text-blue-600-var font-medium text-sm group-hover:underline" data-translate="apply-now">Apply Now →</span>
|
| 246 |
+
</a>
|
| 247 |
+
</div>
|
| 248 |
+
<div class="mt-12 text-center">
|
| 249 |
+
<p class="text-xl text-gray-700 mb-6" data-translate="positions-none-found">Don't see a role for you? Send us your CV anyway!</p>
|
| 250 |
+
<a href="/mindus/nexus/form_gitforge" class="inline-block bg-gray-800 hover:bg-gray-900 text-white font-medium py-3 px-8 rounded-md transition duration-300 text-lg" data-translate="btn-general-application">General Application</a>
|
| 251 |
+
<img src="https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1280&q=80" alt="Person working on a laptop" class="mt-10 rounded-xl shadow-2xl w-full lg:w-1/2 mx-auto" style="height: auto; max-height: 400px; object-fit: cover;"> </div>
|
| 252 |
+
</div>
|
| 253 |
+
</section>
|
| 254 |
+
|
| 255 |
+
<section class="py-16 md:py-24">
|
| 256 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 257 |
+
<h2 class="text-3xl md:text-4xl font-extrabold text-gray-900-var mb-10 text-center" data-translate="hiring-title">Our Simple Hiring Process</h2>
|
| 258 |
+
<div class="grid md:grid-cols-4 gap-8 text-center">
|
| 259 |
+
<div class="flex flex-col items-center">
|
| 260 |
+
<div class="w-16 h-16 flex items-center justify-center bg-blue-100 rounded-full mb-4 text-blue-600-var font-bold text-2xl">1</div>
|
| 261 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="step-1-title">Application</h3>
|
| 262 |
+
<p class="text-gray-600" data-translate="step-1-text">Submit your CV and cover letter through our portal.</p>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="flex flex-col items-center">
|
| 265 |
+
<div class="w-16 h-16 flex items-center justify-center bg-blue-100 rounded-full mb-4 text-blue-600-var font-bold text-2xl">2</div>
|
| 266 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="step-2-title">Screening Call</h3>
|
| 267 |
+
<p class="text-gray-600" data-translate="step-2-text">A quick chat with a recruiter to discuss your background and goals.</p>
|
| 268 |
+
</div>
|
| 269 |
+
<div class="flex flex-col items-center">
|
| 270 |
+
<div class="w-16 h-16 flex items-center justify-center bg-blue-100 rounded-full mb-4 text-blue-600-var font-bold text-2xl">3</div>
|
| 271 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="step-3-title">Technical Interviews</h3>
|
| 272 |
+
<p class="text-gray-600" data-translate="step-3-text">In-depth discussions and practical challenges with the hiring team.</p>
|
| 273 |
+
</div>
|
| 274 |
+
<div class="flex flex-col items-center">
|
| 275 |
+
<div class="w-16 h-16 flex items-center justify-center bg-blue-100 rounded-full mb-4 text-blue-600-var font-bold text-2xl">4</div>
|
| 276 |
+
<h3 class="text-xl font-semibold text-gray-900-var mb-2" data-translate="step-4-title">Offer & Onboarding</h3>
|
| 277 |
+
<p class="text-gray-600" data-translate="step-4-text">Welcome to GitForge! Let's build the future of software together.</p>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
</section>
|
| 282 |
+
|
| 283 |
+
</main>
|
| 284 |
+
|
| 285 |
+
|
| 286 |
+
<footer class="bg-white pt-16 border-t border-gray-200">
|
| 287 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 288 |
+
<div class="grid grid-cols-2 md:grid-cols-5 gap-8">
|
| 289 |
+
<div class="col-span-2 md:col-span-1">
|
| 290 |
+
<a href="#" class="text-xl font-bold text-gray-900-var flex items-center mb-4">
|
| 291 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-5 w-5 mr-2">
|
| 292 |
+
<span data-translate="site-name">GitForge</span>
|
| 293 |
+
</a>
|
| 294 |
+
<p class="text-gray-600 text-sm" data-translate="footer-tagline">The unified DevOps platform, powered by AI.</p>
|
| 295 |
+
<div class="flex space-x-4 mt-6">
|
| 296 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200"><i class="fab fa-twitter text-xl"></i></a>
|
| 297 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200"><i class="fab fa-linkedin-in text-xl"></i></a>
|
| 298 |
+
<a href="#" class="text-gray-500 hover:text-blue-600-var transition duration-200"><i class="fab fa-github text-xl"></i></a>
|
| 299 |
+
</div>
|
| 300 |
+
</div>
|
| 301 |
+
|
| 302 |
+
<div>
|
| 303 |
+
<h4 data-translate="footer-product" class="font-bold text-gray-900-var mb-3">Product</h4>
|
| 304 |
+
<ul class="space-y-2 text-gray-600">
|
| 305 |
+
<li><a data-translate="footer-platform" href="/mindus/nexus/conditions_utilisation" class="hover:text-blue-600-var transition duration-200">Platform</a></li>
|
| 306 |
+
<li><a data-translate="footer-security" href="/mindus/nesus/politique_confidentialite" class="hover:text-blue-600-var transition duration-200">Security</a></li>
|
| 307 |
+
<li><a data-translate="footer-enterprise" href="/mindus/nexus/a_propos" class="hover:text-blue-600-var transition duration-200">Enterprise</a></li>
|
| 308 |
+
<li><a data-translate="footer-pricing" href="/mindus/nexus/tarifs" class="hover:text-blue-600-var transition duration-200">Pricing</a></li>
|
| 309 |
+
</ul>
|
| 310 |
+
</div>
|
| 311 |
+
|
| 312 |
+
<div>
|
| 313 |
+
<h4 data-translate="footer-company" class="font-bold text-gray-900-var mb-3">Company</h4>
|
| 314 |
+
<ul class="space-y-2 text-gray-600">
|
| 315 |
+
<li><a data-translate="footer-about" href="/mindus/nexus/a_propos" class="hover:text-blue-600-var transition duration-200">About us</a></li>
|
| 316 |
+
<li><a data-translate="footer-careers" href="/mindus/nexus/careers" class="hover:text-blue-600-var transition duration-200">Careers</a></li>
|
| 317 |
+
<li><a data-translate="footer-support" href="/mindus/nexus/contact" class="hover:text-blue-600-var transition duration-200">Support</a></li>
|
| 318 |
+
<li><a data-translate="footer-faq" href="/mindus/nexus/faq" class="hover:text-blue-600-var transition duration-200">FAQ</a></li>
|
| 319 |
+
</ul>
|
| 320 |
+
</div>
|
| 321 |
+
|
| 322 |
+
<div class="col-span-4 md:col-span-1 lang-dropdown-container">
|
| 323 |
+
<h4 data-translate="footer-resources" class="font-bold text-gray-900-var mb-3">Resources</h4>
|
| 324 |
+
<ul class="space-y-2 text-gray-600">
|
| 325 |
+
<li><a data-translate="footer-contact-email" href="/mindus/nexus/contact" class="hover:text-blue-600-var transition duration-200">Contact Email</a></li>
|
| 326 |
+
<li><a data-translate="footer-status" href="/mindus/nexus/statut" class="hover:text-blue-600-var transition duration-200">Service Status</a></li>
|
| 327 |
+
<li><a data-translate="footer-blog" href="/mindus/nexus/blog" class="hover:text-blue-600-var transition duration-200">Tech Blog</a></li>
|
| 328 |
+
<li><a data-translate="footer-copilot" href="/mindus/nexus/gitforge_copilot" class="hover:text-blue-600-var transition duration-200">Copilot</a></li>
|
| 329 |
+
|
| 330 |
+
<li class="relative mt-4 pt-4 border-t border-gray-200">
|
| 331 |
+
<button id="lang-menu-button" class="flex items-center text-gray-900-var hover:text-blue-600-var transition duration-200 text-sm">
|
| 332 |
+
<span id="current-flag">🇺🇸</span>
|
| 333 |
+
<span id="current-lang-name" class="ml-2 font-medium" data-lang-code="en">English</span>
|
| 334 |
+
<span class="material-symbols-rounded text-gray-500 ml-1 text-base">expand_more</span>
|
| 335 |
+
</button>
|
| 336 |
+
<div id="lang-menu-dropdown" class="lang-menu-dropdown origin-bottom-left bottom-full">
|
| 337 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="en"><span class="mr-2">🇺🇸</span> English</a>
|
| 338 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="fr"><span class="mr-2">🇫🇷</span> Français</a>
|
| 339 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="es"><span class="mr-2">🇪🇸</span> Español</a>
|
| 340 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="zh-CN"><span class="mr-2">🇨🇳</span> 简体中文 (Simplified Chinese)</a>
|
| 341 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="ja"><span class="mr-2">🇯🇵</span> 日本語 (Japanese)</a>
|
| 342 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="de"><span class="mr-2">🇩🇪</span> Deutsch (German)</a>
|
| 343 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="pt-BR"><span class="mr-2">🇧🇷</span> Português (Brasil)</a>
|
| 344 |
+
<a href="#" class="block px-4 py-2 text-sm lang-option" data-lang="ru"><span class="mr-2">🇷🇺</span> Русский (Russian)</a>
|
| 345 |
+
</div>
|
| 346 |
+
</li>
|
| 347 |
+
</ul>
|
| 348 |
+
</div>
|
| 349 |
+
</div>
|
| 350 |
+
|
| 351 |
+
<div class="py-8 mt-8 border-t border-gray-200">
|
| 352 |
+
<p class="text-sm text-gray-500 text-center md:text-left" data-translate="footer-copyright">
|
| 353 |
+
© 2025 GitForge. All rights reserved. Powered by the <a href="/" class="hover:text-blue-600-var hover:underline">GitForge Platform</a>.
|
| 354 |
+
</p>
|
| 355 |
+
</div>
|
| 356 |
+
</div>
|
| 357 |
+
</footer>
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
<script>
|
| 361 |
+
let currentLang = 'en';
|
| 362 |
+
|
| 363 |
+
// Translation dictionary for all supported languages
|
| 364 |
+
const translations = {
|
| 365 |
+
"page-title": { "fr": "Carrières GitForge", "en": "GitForge Careers", "es": "Carreras en GitForge", "zh-CN": "GitForge 职业", "ja": "GitForge 採用情報", "de": "GitForge Karriere", "pt-BR": "Carreiras na GitForge", "ru": "Вакансии GitForge" },
|
| 366 |
+
"site-name": { "fr": "GitForge", "en": "GitForge", "es": "GitForge", "zh-CN": "GitForge", "ja": "GitForge", "de": "GitForge", "pt-BR": "GitForge", "ru": "GitForge" },
|
| 367 |
+
"nav-platform": { "fr": "Plateforme", "en": "Platform", "es": "Plataforma", "zh-CN": "平台", "ja": "プラットフォーム", "de": "Plattform", "pt-BR": "Plataforma", "ru": "Платформа" },
|
| 368 |
+
"nav-solutions": { "fr": "Société", "en": "Company", "es": "Compañía", "zh-CN": "公司", "ja": "企業情報", "de": "Unternehmen", "pt-BR": "Empresa", "ru": "Компания" },
|
| 369 |
+
"nav-resources": { "fr": "Ressources", "en": "Resources", "es": "Recursos", "zh-CN": "资源", "ja": "リソース", "de": "Ressourcen", "pt-BR": "Recursos", "ru": "Ресурсы" },
|
| 370 |
+
"nav-opensource": { "fr": "Contactez-nous", "en": "Contact us", "es": "Contáctenos", "zh-CN": "联系我们", "ja": "お問い合わせ", "de": "Kontakt", "pt-BR": "Fale Conosco", "ru": "Связаться" },
|
| 371 |
+
"nav-enterprise": { "fr": "Entreprise", "en": "Enterprise", "es": "Empresas", "zh-CN": "企业", "ja": "エンタープライズ", "de": "Enterprise", "pt-BR": "Empresarial", "ru": "Для бизнеса" },
|
| 372 |
+
"nav-careers": { "fr": "Carrières", "en": "Careers", "es": "Carreras", "zh-CN": "职业", "ja": "採用情報", "de": "Karriere", "pt-BR": "Carreiras", "ru": "Вакансии" },
|
| 373 |
+
"btn-join-community": { "fr": "Rejoindre Notre Communauté de Talents", "en": "Join Our Talent Community", "es": "Únete a Nuestra Comunidad de Talentos", "zh-CN": "加入人才社区", "ja": "タレントコミュニティに参加", "de": "Treten Sie unserer Talent-Community bei", "pt-BR": "Junte-se à Nossa Comunidade de Talentos", "ru": "Присоединиться к сообществу" },
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
// NEW CAREERS CONTENT
|
| 377 |
+
"hero-title": {
|
| 378 |
+
"fr": "Forgeons Votre Avenir avec GitForge",
|
| 379 |
+
"en": "Forge Your Future with GitForge",
|
| 380 |
+
"es": "Forja Tu Futuro con GitForge",
|
| 381 |
+
"zh-CN": "在 GitForge 铸就您的未来",
|
| 382 |
+
"ja": "GitForge であなたの未来を創造する",
|
| 383 |
+
"de": "Gestalten Sie Ihre Zukunft mit GitForge",
|
| 384 |
+
"pt-BR": "Forje Seu Futuro com a GitForge",
|
| 385 |
+
"ru": "Постройте свое будущее с GitForge"
|
| 386 |
+
},
|
| 387 |
+
"hero-subtitle": {
|
| 388 |
+
"fr": "Rejoignez-nous pour construire la plateforme DevOps unifiée qui soutient des millions de développeurs dans le monde.",
|
| 389 |
+
"en": "Join us in building the unified DevOps platform that empowers millions of developers worldwide.",
|
| 390 |
+
"es": "Únete a nosotros para construir la plataforma DevOps unificada que impulsa a millones de desarrolladores en todo el mundo.",
|
| 391 |
+
"zh-CN": "加入我们,共同打造赋能全球数百万开发者的统一 DevOps 平台。",
|
| 392 |
+
"ja": "世界中の何百万もの開発者を支援する、統合された DevOps プラットフォームの構築に参加しませんか。",
|
| 393 |
+
"de": "Arbeiten Sie mit uns an der Entwicklung der vereinheitlichten DevOps-Plattform, die Millionen von Entwicklern weltweit unterstützt.",
|
| 394 |
+
"pt-BR": "Junte-se a nós na construção da plataforma DevOps unificada que capacita milhões de desenvolvedores em todo o mundo.",
|
| 395 |
+
"ru": "Присоединяйтесь к нам в создании унифицированной платформы DevOps, которая дает возможности миллионам разработчиков по всему миру."
|
| 396 |
+
},
|
| 397 |
+
"hero-cta": {
|
| 398 |
+
"fr": "Explorer les Postes Ouverts",
|
| 399 |
+
"en": "Explore Open Positions",
|
| 400 |
+
"es": "Explorar Puestos Abiertos",
|
| 401 |
+
"zh-CN": "探索空缺职位",
|
| 402 |
+
"ja": "募集中のポジションを見る",
|
| 403 |
+
"de": "Offene Stellen entdecken",
|
| 404 |
+
"pt-BR": "Explorar Vagas Abertas",
|
| 405 |
+
"ru": "Посмотреть открытые вакансии"
|
| 406 |
+
},
|
| 407 |
+
|
| 408 |
+
// Section 2: Mission
|
| 409 |
+
"mission-tag": { "fr": "Notre Impact", "en": "Our Impact", "es": "Nuestro Impacto", "zh-CN": "我们的影响", "ja": "私たちの影響", "de": "Unser Beitrag", "pt-BR": "Nosso Impacto", "ru": "Наш вклад" },
|
| 410 |
+
"mission-title": { "fr": "Le cœur de l'innovation", "en": "The heart of innovation", "es": "El corazón de la innovación", "zh-CN": "创新的核心", "ja": "イノベーションの中心", "de": "Das Herz der Innovation", "pt-BR": "O coração da inovação", "ru": "Сердце инноваций" },
|
| 411 |
+
"mission-text-1": {
|
| 412 |
+
"fr": "Chez GitForge, nous croyons au pouvoir du code pour changer le monde. Notre mission est de fournir à chaque développeur les outils dont il a besoin pour construire, sécuriser et déployer des logiciels plus rapidement que jamais. Nous repoussons constamment les limites de ce qui est possible en DevOps et en développement assisté par IA.",
|
| 413 |
+
"en": "At GitForge, we believe in the power of code to change the world. Our mission is to provide every developer with the tools they need to build, secure, and deploy software faster than ever before. We are constantly pushing the boundaries of what is possible in DevOps and AI-assisted development.",
|
| 414 |
+
"es": "En GitForge, creemos en el poder del código para cambiar el mundo. Nuestra misión es proporcionar a cada desarrollador las herramientas que necesita para construir, asegurar e implementar software más rápido que nunca. Estamos constantemente superando los límites de lo posible en DevOps y desarrollo asistido por IA.",
|
| 415 |
+
"zh-CN": "在 GitForge,我们相信代码拥有改变世界的力量。我们的使命是为每位开发者提供所需的工具,以比以往任何时候都更快的速度构建、保护和部署软件。我们不断突破 DevOps 和 AI 辅助开发的界限。",
|
| 416 |
+
"ja": "GitForge では、世界を変えるコードの力を信じています。私たちの使命は、すべての開発者がこれまで以上に迅速にソフトウェアを構築、保護、デプロイするために必要なツールを提供することです。私たちは、DevOps と AI 支援開発における可能性の限界を常に押し広げています。",
|
| 417 |
+
"de": "Bei GitForge glauben wir an die Kraft von Code, die Welt zu verändern. Unsere Mission ist es, jedem Entwickler die Werkzeuge zur Verfügung zu stellen, die er benötigt, um Software schneller als je zuvor zu erstellen, zu sichern und bereitzustellen. Wir verschieben ständig die Grenzen des Möglichen in DevOps und KI-gestützter Entwicklung.",
|
| 418 |
+
"pt-BR": "Na GitForge, acreditamos no poder do código para mudar o mundo. Nossa missão é fornecer a cada desenvolvedor as ferramentas de que precisam para construir, proteger e implantar software mais rápido do que nunca. Estamos constantemente expandindo os limites do que é possível em DevOps e desenvolvimento assistido por IA.",
|
| 419 |
+
"ru": "В GitForge мы верим в способность кода менять мир. Наша миссия — предоставить каждому разработчику инструменты, необходимые для создания, защиты и развертывания программного обеспечения быстрее, чем когда-либо прежде. Мы постоянно расширяем границы возможного в DevOps и разработке с помощью ИИ."
|
| 420 |
+
},
|
| 421 |
+
"mission-text-2": {
|
| 422 |
+
"fr": "Rejoindre notre équipe signifie travailler sur des projets à fort impact qui influencent la vie quotidienne de millions de développeurs, des contributeurs open source aux grandes équipes d'entreprise.",
|
| 423 |
+
"en": "Joining our team means working on high-impact projects that influence the daily lives of millions of developers, from open-source contributors to large enterprise teams.",
|
| 424 |
+
"es": "Unirse a nuestro equipo significa trabajar en proyectos de alto impacto que influyen en la vida diaria de millones de desarrolladores, desde colaboradores de código abierto hasta grandes equipos empresariales.",
|
| 425 |
+
"zh-CN": "加入我们的团队意味着参与到影响全球数百万开发者日常工作的高影响力项目中,无论是开源贡献者还是大型企业团队。",
|
| 426 |
+
"ja": "私たちのチームに参加するということは、オープンソースの貢献者から大企業のチームまで、何百万もの開発者の日常生活に影響を与える、影響力の大きいプロジェクトに取り組むことを意味します。",
|
| 427 |
+
"de": "Teil unseres Teams zu werden, bedeutet, an hochwirksamen Projekten zu arbeiten, die das tägliche Leben von Millionen von Entwicklern beeinflussen, von Open-Source-Mitwirkenden bis hin zu großen Unternehmens-Teams.",
|
| 428 |
+
"pt-BR": "Juntar-se à nossa equipe significa trabalhar em projetos de alto impacto que influenciam a vida diária de milhões de desenvolvedores, desde colaboradores de código aberto até grandes equipes corporativas.",
|
| 429 |
+
"ru": "Присоединение к нашей команде означает работу над высокоэффективными проектами, которые влияют на повседневную жизнь миллионов разработчиков, от участников с открытым исходным кодом до крупных корпоративных команд."
|
| 430 |
+
},
|
| 431 |
+
|
| 432 |
+
// Section 3: Culture
|
| 433 |
+
"culture-tag": { "fr": "Esprit d'Équipe", "en": "Team Spirit", "es": "Espíritu de Equipo", "zh-CN": "团队精神", "ja": "チームスピリット", "de": "Teamgeist", "pt-BR": "Espírito de Equipe", "ru": "Командный дух" },
|
| 434 |
+
"culture-title": { "fr": "Une Culture d'Ouverture et de Confiance", "en": "A Culture of Openness and Trust", "es": "Una Cultura de Apertura y Confianza", "zh-CN": "开放与信任的文化", "ja": "オープンネスと信頼の文化", "de": "Eine Kultur der Offenheit und des Vertrauens", "pt-BR": "Uma Cultura de Abertura e Confiança", "ru": "Культура открытости и доверия" },
|
| 435 |
+
"culture-point-1": { "fr": "Collaboration Avant Tout : Nous réussissons en tant qu'équipe, pas en tant qu'individus.", "en": "Collaboration First: We succeed as a team, not as individuals.", "es": "Colaboración Primero : Triunfamos como equipo, no como individuos.", "zh-CN": "协作至上:我们以团队而非个人身份取得成功。", "ja": "コラボレーション第一:個人ではなくチームとして成功します。", "de": "Zusammenarbeit zuerst: Wir sind als Team erfolgreich, nicht als Einzelpersonen.", "pt-BR": "Colaboração em Primeiro Lugar : Têm sucesso como equipe, não como indivíduos.", "ru": "Сотрудничество превыше всего : Мы добиваемся успеха как команда, а не как отдельные личности." },
|
| 436 |
+
"culture-point-2": { "fr": "Responsabilité & Autonomie : Vous avez l'espace pour innover et diriger.", "en": "Ownership & Autonomy: You have the space to innovate and lead.", "es": "Propiedad y Autonomía : Tienes el espacio para innovar y liderar.", "zh-CN": "主人翁意识与自主权:您有创新和领导的空间。", "ja": "オーナーシップと自律性:革新と主導権を発揮できる環境があります。", "de": "Verantwortung & Autonomie: Sie haben den Raum, um innovativ zu sein und zu führen.", "pt-BR": "Propriedade e Autonomia : Você tem espaço para inovar e liderar.", "ru": "Ответственность и автономия : У вас есть пространство для инноваций и лидерства." },
|
| 437 |
+
"culture-point-3": { "fr": "Équilibre Travail-Vie Privée : Un rythme durable est la clé du succès à long terme.", "en": "Work-Life Balance: Sustainable pace is key to long-term success.", "es": "Equilibrio Vida-Trabajo : Un ritmo sostenible es clave para el éxito a largo plazo.", "zh-CN": "工作与生活平衡:可持续的节奏是长期成功的关键。", "ja": "ワークライフバランス:持続可能なペースが長期的な成功の鍵です。", "de": "Work-Life-Balance: Ein nachhaltiges Tempo ist der Schlüssel zum langfristigen Erfolg.", "pt-BR": "Equilíbrio Trabalho-Vida Pessoal : Um ritmo sustentável é a chave para o sucesso a longo prazo.", "ru": "Баланс работы и жизни : Устойчивый темп — ключ к долгосрочному успеху." },
|
| 438 |
+
|
| 439 |
+
// Section 4: Benefits
|
| 440 |
+
"benefits-title": { "fr": "Investir dans Votre Bien-Être", "en": "Invest in Your Well-Being", "es": "Invierte en Tu Bienestar", "zh-CN": "投资于您的福祉", "ja": "あなたの幸福に投資する", "de": "Investieren Sie in Ihr Wohlbefinden", "pt-BR": "Invista em Seu Bem-Estar", "ru": "Инвестиции в ваше благополучие" },
|
| 441 |
+
"benefits-subtitle": { "fr": "Nous offrons des avantages compétitifs conçus pour vous soutenir, vous et votre famille.", "en": "We offer competitive benefits designed to support you and your family.", "es": "Ofrecemos beneficios competitivos diseñados para apoyarte a ti y a tu familia.", "zh-CN": "我们提供有竞争力的福利,旨在为您和您的家人提供支持。", "ja": "あなたとあなたの家族をサポートするために設計された、競争力のある福利厚生を提供します。", "de": "Wir bieten wettbewerbsfähige Leistungen, die Sie und Ihre Familie unterstützen sollen.", "pt-BR": "Oferecemos benefícios competitivos projetados para apoiar você e sua família.", "ru": "Мы предлагаем конкурентные льготы, разработанные для поддержки вас и вашей семьи." },
|
| 442 |
+
"benefit-1": { "fr": "Couverture santé complète et programmes de bien-être.", "en": "Comprehensive Health Coverage and Wellness Programs.", "es": "Cobertura de salud integral y programas de bienestar.", "zh-CN": "全面的健康保险和健康计划。", "ja": "包括的な健康保険とウェルネスプログラム。", "de": "Umfassende Krankenversicherung und Wellness-Programme.", "pt-BR": "Cobertura de Saúde Abrangente e Programas de Bem-Estar.", "ru": "Комплексное медицинское страхование и программы оздоровления." },
|
| 443 |
+
"benefit-2": { "fr": "Allocations pour l'apprentissage et le développement.", "en": "Learning & Development Stipends.", "es": "Estipendios para aprendizaje y desarrollo.", "zh-CN": "学习与发展津贴。", "ja": "学習と能力開発のための奨学金。", "de": "Zuschüsse für Lernen und Entwicklung.", "pt-BR": "Estipêndios de Aprendizagem e Desenvolvimento.", "ru": "Стипендии на обучение и развитие." },
|
| 444 |
+
"benefit-3": { "fr": "Politique de travail flexible et opportunités à distance.", "en": "Flexible Work Policy and Remote Opportunities.", "es": "Política de trabajo flexible y oportunidades remotas.", "zh-CN": "灵活的工作政策和远程工作机会。", "ja": "柔軟な勤務制度とリモートワークの機会。", "de": "Flexible Arbeitsrichtlinien und Remote-Möglichkeiten.", "pt-BR": "Política de Trabalho Flexível e Oportunidades Remotas.", "ru": "Гибкая политика работы и удаленные возможности." },
|
| 445 |
+
"benefit-4": { "fr": "Salaire compétitif, plans de primes et options d'achat d'actions.", "en": "Competitive Salary, Bonus Plans, and Stock Options.", "es": "Salario competitivo, planes de bonificación y opciones sobre acciones.", "zh-CN": "有竞争力的薪水、奖金计划和股票期权。", "ja": "競争力のある給与、ボーナスプラン、ストックオプション。", "de": "Wettbewerbsfähiges Gehalt, Bonuspläne und Aktienoptionen.", "pt-BR": "Salário Competitivo, Planos de Bônus e Opções de Ações.", "ru": "Конкурентная зарплата, бонусные планы и опционы на акции." },
|
| 446 |
+
"benefit-5": { "fr": "Congés payés généreux et congé parental.", "en": "Generous Paid Time Off and Parental Leave.", "es": "Generoso tiempo libre pagado y licencia parental.", "zh-CN": "慷慨的带薪休假和育儿假。", "ja": "十分な有給休暇と育児休暇。", "de": "Großzügiger bezahlter Urlaub und Elternzeit.", "pt-BR": "Folga Remunerada Generosa e Licença Parental.", "ru": "Щедрый оплачиваемый отпуск и отпуск по уходу за ребенком." },
|
| 447 |
+
|
| 448 |
+
// Section 5: DEI
|
| 449 |
+
"dei-tag": { "fr": "L'Inclusion est Notre Force", "en": "Inclusion is Our Strength", "es": "La Inclusión es Nuestra Fuerza", "zh-CN": "包容是我们的力量", "ja": "インクルージョンは私たちの強み", "de": "Inklusion ist unsere Stärke", "pt-BR": "Inclusão é Nossa Força", "ru": "Инклюзивность - наша сила" },
|
| 450 |
+
"dei-title": { "fr": "Bâtir une Équipe Véritablement Mondiale", "en": "Building a Truly Global Team", "es": "Construyendo un Equipo Verdaderamente Global", "zh-CN": "打造一个真正的全球团队", "ja": "真にグローバルなチームを構築する", "de": "Aufbau eines wirklich globalen Teams", "pt-BR": "Construindo uma Equipe Verdadeiramente Global", "ru": "Создание по-настоящему глобальной команды" },
|
| 451 |
+
"dei-text-1": {
|
| 452 |
+
"fr": "Nous nous engageons à bâtir un lieu de travail diversifié où chacun se sent respecté et a la possibilité de fournir son meilleur travail. Des perspectives différentes sont essentielles pour construire une plateforme qui sert le monde entier.",
|
| 453 |
+
"en": "We are committed to building a diverse workplace where everyone feels respected and has the opportunity to contribute their best work. Different perspectives are essential to building a platform that serves the world.",
|
| 454 |
+
"es": "Estamos comprometidos a construir un lugar de trabajo diverso donde todos se sientan respetados y tengan la oportunidad de contribuir con su mejor trabajo. Las diferentes perspectivas son esenciales para construir una plataforma que sirva al mundo.",
|
| 455 |
+
"zh-CN": "我们致力于建立一个多元化的工作场所,让每个人都感到受到尊重并有机会做出最大的贡献。不同的视角对于构建服务世界的平台至关重要。",
|
| 456 |
+
"ja": "私たちは、誰もが尊重され、最高の仕事に貢献できる多様な職場を構築することに取り組んでいます。多様な視点は、世界に役立つプラットフォームを構築するために不可欠です。",
|
| 457 |
+
"de": "Wir setzen uns dafür ein, einen vielfältigen Arbeitsplatz zu schaffen, an dem sich jeder respektiert fühlt und die Möglichkeit hat, seine beste Arbeit zu leisten. Unterschiedliche Perspektiven sind unerlässlich, um eine Plattform aufzubauen, die der ganzen Welt dient.",
|
| 458 |
+
"pt-BR": "Estamos comprometidos em construir um local de trabalho diverso onde todos se sintam respeitados e tenham a oportunidade de contribuir com o seu melhor trabalho. Diferentes perspectivas são essenciais para construir uma plataforma que atenda ao mundo.",
|
| 459 |
+
"ru": "Мы стремимся создать разнообразное рабочее место, где каждый чувствует себя уважаемым и имеет возможность внести свой лучший вклад. Различные точки зрения необходимы для создания платформы, которая служит всему миру."
|
| 460 |
+
},
|
| 461 |
+
|
| 462 |
+
// Section 5.5: Investment (Nouvelle section)
|
| 463 |
+
"investment-title": { "fr": "Partenariat Stratégique & Financement d'Amorçage", "en": "Strategic Partnership & Seed Funding", "es": "Asociación Estratégica y Financiación Inicial", "zh-CN": "战略合作与种子基金", "ja": "戦略的パートナーシップとシードファンディング", "de": "Strategische Partnerschaft & Startkapital", "pt-BR": "Parceria Estratégica e Financiamento Inicial", "ru": "Стратегическое партнерство и посевное финансирование" },
|
| 464 |
+
"investment-text-1": { "fr": "GitForge est prête pour un lancement mondial. Nous recherchons des partenaires stratégiques et des investisseurs d'amorçage pour sécuriser notre infrastructure et officialiser nos opérations en France.", "en": "GitForge is ready for global launch. We seek strategic partners and seed investors to secure our infrastructure and formalize our operations in France.", "es": "GitForge está lista para el lanzamiento global. Buscamos socios estratégicos e inversores iniciales para asegurar nuestra infraestructura y formalizar nuestras operaciones en Francia.", "zh-CN": "GitForge 已准备好进行全球发布。我们正在寻找战略合作伙伴和种子投资者,以确保我们的基础设施安全并使我们在法国的运营正式化。", "ja": "GitForge はグローバルローンチの準備ができています。インフラストラクチャを確保し、フランスでの事業を正式化するために、戦略的パートナーとシード投資家を探しています。", "de": "GitForge ist bereit für den globalen Start. Wir suchen strategische Partner und Seed-Investoren, um unsere Infrastruktur zu sichern und unseren Betrieb in Frankreich zu formalisieren.", "pt-BR": "A GitForge está pronta para o lançamento global. Buscamos parceiros estratégicos e investidores anjo para garantir nossa infraestrutura e formalizar nossas operações na França.", "ru": "GitForge готова к глобальному запуску. Мы ищем стратегических партнеров и посевных инвесторов для обеспечения нашей инфраструктуры и формализации наших операций во Франции." },
|
| 465 |
+
"investment-need": { "fr": "Nos besoins immédiats : Enregistrement de l'entreprise (France), infrastructure de serveurs dédiée (Hébergement Dynamique) et acquisition du nom de domaine d'entreprise.", "en": "Our immediate needs: Company registration (France), dedicated server infrastructure (Dynamic Hosting), and corporate domain acquisition.", "es": "Nuestras necesidades inmediatas: Registro de la empresa (Francia), infraestructura de servidor dedicada (Alojamiento Dinámico) y adquisición de dominio corporativo.", "zh-CN": "我们的迫切需求:公司注册(法国)、专用服务器基础设施(动态托管)和企业域名获取。", "ja": "当社の差し迫ったニーズ:会社登録(フランス)、専用サーバーインフラストラクチャ(ダイナミックホスティング)、および企業ドメインの取得。", "de": "Unsere unmittelbaren Bedürfnisse: Unternehmensregistrierung (Frankreich), dedizierte Server-Infrastruktur (Dynamisches Hosting) und Erwerb einer Unternehmensdomäne.", "pt-BR": "Nossas necessidades imediatas: Registro da empresa (França), infraestrutura de servidor dedicada (Hospedagem Dinâmica) e aquisição de domínio corporativo.", "ru": "Наши непосредственные потребности: Регистрация компании (Франция), выделенная серверная инфраструктура (Динамический хостинг) и приобретение корпоративного домена." },
|
| 466 |
+
"investment-cta": { "fr": "Contacter l'Équipe Partenariat", "en": "Contact Partnership Team", "es": "Contactar con el Equipo de Socios", "zh-CN": "联系合作团队", "ja": "パートナーシップチームに連絡する", "de": "Kontaktieren Sie das Partnerschafts-Team", "pt-BR": "Entrar em Contato com a Equipe de Parceria", "ru": "Связаться с отделом партнерства" },
|
| 467 |
+
|
| 468 |
+
// Section 6: Values
|
| 469 |
+
"values-title": { "fr": "Nos Valeurs Fondamentales", "en": "Our Core Values", "es": "Nuestros Valores Fundamentales", "zh-CN": "我们的核心价值观", "ja": "私たちのコアバリュー", "de": "Unsere Grundwerte", "pt-BR": "Nossos Valores Fundamentais", "ru": "Наши основные ценности" },
|
| 470 |
+
"values-subtitle": { "fr": "Ces principes guident nos décisions et notre culture de développement.", "en": "These principles guide our decisions and our development culture.", "es": "Estos principios guían nuestras decisiones y nuestra cultura de desarrollo.", "zh-CN": "这些原则指导着我们的决策和开发文化。", "ja": "これらの原則は、私たちの決定と開発文化を導きます。", "de": "Diese Prinzipien leiten unsere Entscheidungen und unsere Entwicklungskultur.", "pt-BR": "Estes princípios guiam nossas decisões et nossa cultura de desenvolvimento.", "ru": "Эти принципы руководят нашими решениями и нашей культурой разработки." },
|
| 471 |
+
"value-1-title": { "fr": "Innovation", "en": "Innovation", "es": "Innovación", "zh-CN": "创新", "ja": "イノベーション", "de": "Innovation", "pt-BR": "Inovação", "ru": "Инновации" },
|
| 472 |
+
"value-1-text": { "fr": "Nous expérimentons constamment de nouvelles technologies, de l'IA au serverless, pour garder une longueur d'avance.", "en": "We constantly experiment with new technologies, from AI to serverless infrastructure, to stay ahead.", "es": "Experimentamos constantemente con nuevas tecnologías, desde IA hasta infraestructura sin servidor, para mantenernos a la vanguardia.", "zh-CN": "我们不断尝试新技术,从人工智能到无服务器基础设施,以保持领先地位。", "ja": "AIからサーバーレスインフラストラクチャまで、常に新しいテクノロジーを実験し、先行しています。", "de": "Wir experimentieren ständig mit neuen Technologien, von KI bis zur Serverless-Infrastruktur, um immer einen Schritt voraus zu sein.", "pt-BR": "Experimentamos constantemente novas tecnologias, de IA à infraestrutura sem servidor, para nos mantermos à frente.", "ru": "Мы постоянно экспериментируем с новыми технологиями, от ИИ до бессерверной инфраструктуры, чтобы оставаться впереди." },
|
| 473 |
+
"value-2-title": { "fr": "La Sécurité Avant Tout", "en": "Security First", "es": "Seguridad Primero", "zh-CN": "安全第一", "ja": "セキュリティ第一", "de": "Sicherheit zuerst", "pt-BR": "Segurança em Primeiro Lugar", "ru": "Безопасность прежде всего" },
|
| 474 |
+
"value-2-text": { "fr": "La sécurité est intégrée à tout ce que nous construisons, assurant la confiance de nos utilisateurs et clients.", "en": "Security is baked into everything we build, ensuring trust for our users and customers.", "es": "La seguridad está integrada en todo lo que construimos, garantizando la confianza de nuestros usuarios y clientes.", "zh-CN": "我们将安全性融入到我们构建的一切中,确保用户和客户的信任。", "ja": "セキュリティは、私たちが構築するすべてのものに組み込まれており、ユーザーと顧客の信頼を確保します。", "de": "Sicherheit ist in alles integriert, was wir bauen, um das Vertrauen unserer Benutzer und Kunden zu gewährleisten.", "pt-BR": "A segurança está embutida em tudo o que construímos, garantindo a confiança de nossos usuários e clientes.", "ru": "Безопасность встроена во все, что мы создаем, обеспечивая доверие наших пользователей и клиентов." },
|
| 475 |
+
"value-3-title": { "fr": "Impact Mondial", "en": "Global Impact", "es": "Impacto Global", "zh-CN": "全球影响", "ja": "グローバルな影響", "de": "Globaler Einfluss", "pt-BR": "Impacto Global", "ru": "Глобальное влияние" },
|
| 476 |
+
"value-3-text": { "fr": "Nous construisons des produits qui sont utilisés partout, favorisant une mentalité et une responsabilité mondiales.", "en": "We build products that are used everywhere, fostering a global mindset and responsibility.", "es": "Construimos productos que se utilizan en todas partes, fomentando una mentalité et responsabilité globales.", "zh-CN": "我们构建的产品被世界各地使用,培养了全球化的思维和责任感。", "ja": "世界中で使用される製品を構築し、グローバルな考え方と責任を育みます。", "de": "Wir entwickeln Produkte, die überall eingesetzt werden, und fördern so eine globale Denkweise und Verantwortung.", "pt-BR": "Construímos produtos que são usados em todos os lugares, fomentando uma mentalidade e responsabilidade global.", "ru": "Мы создаем продукты, которые используются повсюду, способствуя глобальному мышлению и ответственности." },
|
| 477 |
+
|
| 478 |
+
// Section 7: Positions
|
| 479 |
+
"positions-title": { "fr": "Postes Actuellement Ouverts", "en": "Current Openings", "es": "Vacantes Actuales", "zh-CN": "当前空缺职位", "ja": "現在の募集職種", "de": "Aktuelle Stellenangebote", "pt-BR": "Vagas Atuais", "ru": "Текущие вакансии" },
|
| 480 |
+
"job-1-title": { "fr": "Ingénieur Frontend Senior", "en": "Senior Frontend Engineer", "es": "Ingeniero Frontend Senior", "zh-CN": "高级前端工程师", "ja": "シニアフロントエンドエンジニア", "de": "Senior Frontend-Entwickler", "pt-BR": "Engenheiro Frontend Sênior", "ru": "Старший Frontend-разработчик" },
|
| 481 |
+
"job-1-location": { "fr": "À distance (Europe)", "en": "Remote (Europe)", "es": "Remoto (Europa)", "zh-CN": "远程(欧洲)", "ja": "リモート(ヨーロッパ)", "de": "Remote (Europa)", "pt-BR": "Remoto (Europa)", "ru": "Удаленно (Европа)" },
|
| 482 |
+
"job-1-desc": { "fr": "Développer et maintenir l'interface utilisateur de base de GitForge, en se concentrant sur les performances et l'expérience utilisateur.", "en": "Develop and maintain the core GitForge user interface, focusing on performance and user experience.", "es": "Desarrollar y mantener la interfaz de usuario central de GitForge, centrándose en el rendimiento y la experiencia del usuario.", "zh-CN": "开发和维护 GitForge 核心用户界面,重点关注性能和用户体验。", "ja": "GitForge のコアユーザーインターフェースを開発・保守し、パフォーマンスとユーザーエクスペリエンスに焦点を当てます。", "de": "Entwicklung und Pflege der zentralen GitForge-Benutzeroberfläche mit Fokus auf Leistung und Benutzererfahrung.", "pt-BR": "Desenvolver e manter a interface central do usuário GitForge, com foco em desempenho e experiência do usuário.", "ru": "Разработка и поддержка основного пользовательского интерфейса GitForge, с акцентом на производительность и пользовательский опыт." },
|
| 483 |
+
"job-2-title": { "fr": "Scientifique en Recherche IA/ML", "en": "AI/ML Research Scientist", "es": "Científico de Investigación IA/ML", "zh-CN": "人工智能/机器学习研究科学家", "ja": "AI/ML リサーチサイエンティスト", "de": "KI/ML Forschungs-Wissenschaftler", "pt-BR": "Cientista de Pesquisa em IA/ML", "ru": "Исследователь в области ИИ/МО" },
|
| 484 |
+
"job-2-location": { "fr": "San Francisco, CA", "en": "San Francisco, CA", "es": "San Francisco, CA", "zh-CN": "加利福尼亚州旧金山", "ja": "カリフォルニア州サンフランシスコ", "de": "San Francisco, CA", "pt-BR": "San Francisco, CA", "ru": "Сан-Франциско, Калифорния" },
|
| 485 |
+
"job-2-desc": { "fr": "Mener l'innovation pour GitForge Copilot et nos fonctionnalités de sécurité avancées.", "en": "Drive innovation for GitForge Copilot and our advanced security features.", "es": "Impulsar la innovación para GitForge Copilot y nuestras funciones de seguridad avanzadas.", "zh-CN": "推动 GitForge Copilot 和我们高级安全功能的创新。", "ja": "GitForge Copilot および当社の高度なセキュリティ機能のイノベーションを推進します。", "de": "Förderung der Innovation für GitForge Copilot und unsere erweiterten Sicherheitsfunktionen.", "pt-BR": "Impulsionar a inovação para o GitForge Copilot e nossos recursos avançados de segurança.", "ru": "Развитие инноваций для GitForge Copilot и наших продвинутых функций безопасности." },
|
| 486 |
+
"job-3-title": { "fr": "Designer Produit (UX)", "en": "Product Designer (UX)", "es": "Diseñador de Producto (UX)", "zh-CN": "产品设计师(用户体验)", "ja": "プロダクトデザイナー(UX)", "de": "Produktdesigner (UX)", "pt-BR": "Designer de Produto (UX)", "ru": "Продуктовый дизайнер (UX)" },
|
| 487 |
+
"job-3-location": { "fr": "À distance (Global)", "en": "Remote (Global)", "es": "Remoto (Global)", "zh-CN": "远程(全球)", "ja": "リモート(グローバル)", "de": "Remote (Global)", "pt-BR": "Remoto (Global)", "ru": "Удаленно (Глобально)" },
|
| 488 |
+
"job-3-desc": { "fr": "Façonner le langage de conception et les flux d'utilisateurs sur l'ensemble de la plateforme GitForge.", "en": "Shape the design language and user flows across the entire GitForge platform.", "es": "Dar forma al lenguaje de diseño y los flujos de usuario en toda la plataforma GitForge.", "zh-CN": "塑造整个 GitForge 平台的设计语言和用户流程。", "ja": "GitForge プラットフォーム全体のデザイン言語とユーザーフローを形作ります。", "de": "Gestaltung der Designsprache und Benutzerabläufe auf der gesamten GitForge-Plattform.", "pt-BR": "Moldar a linguagem de design e os fluxos de usuário em toda a plataforma GitForge.", "ru": "Формирование языка дизайна и пользовательских потоков на всей платформе GitForge." },
|
| 489 |
+
"apply-now": { "fr": "Postuler Maintenant →", "en": "Apply Now →", "es": "Aplicar Ahora →", "zh-CN": "立即申请 →", "ja": "今すぐ応募 →", "de": "Jetzt bewerben →", "pt-BR": "Candidatar-se Agora →", "ru": "Подать заявку →" },
|
| 490 |
+
"positions-none-found": { "fr": "Vous ne voyez pas de rôle pour vous ? Envoyez-nous votre CV quand même !", "en": "Don't see a role for you? Send us your CV anyway!", "es": "¿No ves un rol para ti? ¡Envíanos tu CV de todos modos!", "zh-CN": "没有适合您的职位?仍然欢迎发送您的简历!", "ja": "希望の職種が見つかりませんか?それでも履歴書を送ってください!", "de": "Sehen Sie keine passende Rolle für sich? Senden Sie uns trotzdem Ihren Lebenslauf!", "pt-BR": "Não encontrou uma vaga para você? Envie-nos seu CV mesmo assim!", "ru": "Не нашли подходящей роли? Все равно отправьте нам свое резюме!" },
|
| 491 |
+
"btn-general-application": { "fr": "Candidature Générale", "en": "General Application", "es": "Aplicación General", "zh-CN": "一般申请", "ja": "一般応募", "de": "Allgemeine Bewerbung", "pt-BR": "Candidatura Geral", "ru": "Общая заявка" },
|
| 492 |
+
|
| 493 |
+
// Section 8: Hiring Process
|
| 494 |
+
"hiring-title": { "fr": "Notre Processus de Recrutement Simple", "en": "Our Simple Hiring Process", "es": "Nuestro Sencillo Proceso de Contratación", "zh-CN": "我们的简单招聘流程", "ja": "私たちのシンプルな採用プロセス", "de": "Unser einfacher Einstellungsprozess", "pt-BR": "Nuestro Processo de Contratação Simples", "ru": "Наш простой процесс найма" },
|
| 495 |
+
"step-1-title": { "fr": "Candidature", "en": "Application", "es": "Aplicación", "zh-CN": "申请", "ja": "応募", "de": "Bewerbung", "pt-BR": "Candidatura", "ru": "Заявка" },
|
| 496 |
+
"step-1-text": { "fr": "Soumettez votre CV et lettre de motivation via notre portail.", "en": "Submit your CV and cover letter through our portal.", "es": "Envía tu CV y carta de presentación a través de nuestro portal.", "zh-CN": "通过我们的门户网站提交您的简历和求职信。", "ja": "ポータルを通じて履歴書とカバーレターを提出してください。", "de": "Senden Sie Ihren Lebenslauf und Ihr Anschreiben über unser Portal ein.", "pt-BR": "Envie seu CV e carta de apresentação através do nosso portal.", "ru": "Отправьте свое резюме и сопроводительное письмо через наш портал." },
|
| 497 |
+
"step-2-title": { "fr": "Appel de Présélection", "en": "Screening Call", "es": "Llamada de Preselección", "zh-CN": "筛选电话", "ja": "スクリーニングコール", "de": "Screening-Anruf", "pt-BR": "Chamada de Triagem", "ru": "Проверочный звонок" },
|
| 498 |
+
"step-2-text": { "fr": "Une discussion rapide avec un recruteur pour parler de votre expérience et de vos objectifs.", "en": "A quick chat with a recruiter to discuss your background and goals.", "es": "Una charla rápida con un reclutador para discutir tus antecedentes y objetivos.", "zh-CN": "与招聘人员进行快速交流,讨论您的背景和目标。", "ja": "採用担当者との簡単なチャットで、あなたの経歴と目標について話し合います。", "de": "Ein kurzes Gespräch mit einem Personalvermittler, um Ihren Hintergrund und Ihre Ziele zu besprechen.", "pt-BR": "Um bate-papo rápido com um recrutador para discutir sua experiência e objetivos.", "ru": "Быстрый разговор с рекрутером, чтобы обсудить ваш опыт и цели." },
|
| 499 |
+
"step-3-title": { "fr": "Entretiens Techniques", "en": "Technical Interviews", "es": "Entrevistas Técnicas", "zh-CN": "技术面试", "ja": "技術面接", "de": "Technische Interviews", "pt-BR": "Entrevistas Técnicas", "ru": "Технические собеседования" },
|
| 500 |
+
"step-3-text": { "fr": "Discussions approfondies et défis pratiques avec l'équipe d'embauche.", "en": "In-depth discussions and practical challenges with the hiring team.", "es": "Discusiones en profundidad y desafíos prácticos con el equipo de contratación.", "zh-CN": "与招聘团队进行深入讨论和实际挑战。", "ja": "採用チームとの詳細な議論と実践的な課題。", "de": "Ausführliche Gespräche und praktische Herausforderungen mit dem Einstellungsteam.", "pt-BR": "Discussões aprofundadas e desafios práticos com a equipe de contratação.", "ru": "Углубленные обсуждения и практические задания с командой найма." },
|
| 501 |
+
"step-4-title": { "fr": "Offre & Intégration", "en": "Offer & Onboarding", "es": "Oferta e Incorporación", "zh-CN": "录取与入职", "ja": "オファーとオンボーディング", "de": "Angebot & Einarbeitung", "pt-BR": "Oferta e Integração", "ru": "Предложение и адаптация" },
|
| 502 |
+
"step-4-text": { "fr": "Bienvenue chez GitForge ! Construisons ensemble l'avenir du logiciel.", "en": "Welcome to GitForge! Let's build the future of software together.", "es": "¡Bienvenido a GitForge! Construyamos juntos el futuro del software.", "zh-CN": "欢迎加入 GitForge!让我们一起构建软件的未来。", "ja": "GitForge へようこそ!一緒にソフトウェアの未来を築きましょう。", "de": "Willkommen bei GitForge! Lassen Sie uns gemeinsam die Zukunft der Software gestalten.", "pt-BR": "Bem-vindo à GitForge! Vamos construir o futuro do software juntos.", "ru": "Добро пожаловать в GitForge! Давайте вместе строить будущее программного обеспечения." },
|
| 503 |
+
|
| 504 |
+
// Footer Links
|
| 505 |
+
"footer-tagline": { "fr": "La plateforme DevOps unifiée, optimisée par l'IA.", "en": "The unified DevOps platform, powered by AI.", "es": "La plataforma DevOps unificada, impulsada por IA.", "zh-CN": "统一的 DevOps 平台,由 AI 提供支持。", "ja": "AIを搭載した統合DevOpsプラットフォーム。", "de": "Die vereinheitlichte DevOps-Plattform, unterstützt durch KI.", "pt-BR": "A plataforma DevOps unificada, impulsionada por IA.", "ru": "Унифицированная платформа DevOps, работающая на базе ИИ." },
|
| 506 |
+
"footer-product": { "fr": "Produit", "en": "Product", "es": "Producto", "zh-CN": "产品", "ja": "製品", "de": "Produkt", "pt-BR": "Produto", "ru": "Продукт" },
|
| 507 |
+
"footer-platform": { "fr": "Plateforme", "en": "Platform", "es": "Plataforma", "zh-CN": "平台", "ja": "プラットフォーム", "de": "Plattform", "pt-BR": "Plataforma", "ru": "Платформа" },
|
| 508 |
+
"footer-security": { "fr": "Sécurité", "en": "Security", "es": "Seguridad", "zh-CN": "安全", "ja": "セキュリティ", "de": "Sicherheit", "pt-BR": "Segurança", "ru": "Безопасность" },
|
| 509 |
+
"footer-enterprise": { "fr": "Entreprise", "en": "Enterprise", "es": "Empresas", "zh-CN": "企业", "ja": "エンタープライズ", "de": "Enterprise", "pt-BR": "Empresarial", "ru": "Для бизнеса" },
|
| 510 |
+
"footer-pricing": { "fr": "Tarifs", "en": "Pricing", "es": "Precios", "zh-CN": "定价", "ja": "価格", "de": "Preise", "pt-BR": "Preços", "ru": "Цены" },
|
| 511 |
+
"footer-company": { "fr": "Société", "en": "Company", "es": "Compañía", "zh-CN": "公司", "ja": "企業情報", "de": "Unternehmen", "pt-BR": "Empresa", "ru": "Компания" },
|
| 512 |
+
"footer-about": { "fr": "À Propos", "en": "About us", "es": "Acerca de nosotros", "zh-CN": "关于我们", "ja": "私たちについて", "de": "Über uns", "pt-BR": "Sobre nós", "ru": "О нас" },
|
| 513 |
+
"footer-careers": { "fr": "Carrières", "en": "Careers", "es": "Carreras", "zh-CN": "职业", "ja": "採用情報", "de": "Karriere", "pt-BR": "Carreiras", "ru": "Вакансии" },
|
| 514 |
+
"footer-support": { "fr": "Support", "en": "Support", "es": "Soporte", "zh-CN": "支持", "ja": "サポート", "de": "Support", "pt-BR": "Suporte", "ru": "Поддержка" },
|
| 515 |
+
"footer-faq": { "fr": "FAQ", "en": "FAQ", "es": "FAQ", "zh-CN": "常见问题", "ja": "よくある質問", "de": "FAQ", "pt-BR": "FAQ", "ru": "FAQ" },
|
| 516 |
+
"footer-resources": { "fr": "Ressources", "en": "Resources", "es": "Recursos", "zh-CN": "资源", "ja": "リソース", "de": "Ressourcen", "pt-BR": "Recursos", "ru": "Ресурсы" },
|
| 517 |
+
"footer-contact-email": { "fr": "Contact Email", "en": "Contact Email", "es": "Correo de Contacto", "zh-CN": "联系邮箱", "ja": "問い合わせメール", "de": "Kontakt-E-Mail", "pt-BR": "E-mail de Contato", "ru": "Контактный Email" },
|
| 518 |
+
"footer-status": { "fr": "Statut du Service", "en": "Service Status", "es": "Estado del Servicio", "zh-CN": "服务状态", "ja": "サービス状況", "de": "Service-Status", "pt-BR": "Status do Serviço", "ru": "Статус сервиса" },
|
| 519 |
+
"footer-blog": { "fr": "Blog Tech", "en": "Tech Blog", "es": "Blog de Tecnología", "zh-CN": "技术博客", "ja": "技術ブログ", "de": "Tech-Blog", "pt-BR": "Blog de Tecnologia", "ru": "Технический блог" },
|
| 520 |
+
"footer-copilot": { "fr": "Copilot", "en": "Copilot", "es": "Copilot", "zh-CN": "Copilot", "ja": "Copilot", "de": "Copilot", "pt-BR": "Copilot", "ru": "Copilot" },
|
| 521 |
+
"footer-copyright": { "fr": "© 2025 GitForge. Tous droits réservés. Propulsé par la <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plateforme GitForge</a>.", "en": "© 2025 GitForge. All rights reserved. Powered by the <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge Platform</a>.", "es": "© 2025 GitForge. Todos los derechos reservados. Impulsado por la <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plataforma GitForge</a>.", "zh-CN": "© 2025 GitForge. 保留所有权利。由 <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge 平台</a>提供支持。", "ja": "© 2025 GitForge. 全ての権利を保有します。<a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge プラットフォーム</a>によって提供されています。", "de": "© 2025 GitForge. Alle Rechte vorbehalten. Unterstützt durch die <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge Plattform</a>.", "pt-BR": "© 2025 GitForge. Todos os direitos reservados. Alimentado pela <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plataforma GitForge</a>.", "ru": "© 2025 GitForge. Все права защищены. Работает на базе <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Платформы GitForge</a>." }
|
| 522 |
+
};
|
| 523 |
+
|
| 524 |
+
const flags = {
|
| 525 |
+
"en": "🇺🇸",
|
| 526 |
+
"fr": "🇫🇷",
|
| 527 |
+
"es": "🇪🇸",
|
| 528 |
+
"zh-CN": "🇨🇳",
|
| 529 |
+
"ja": "🇯🇵",
|
| 530 |
+
"de": "🇩🇪",
|
| 531 |
+
"pt-BR": "🇧🇷",
|
| 532 |
+
"ru": "🇷🇺"
|
| 533 |
+
};
|
| 534 |
+
|
| 535 |
+
const langNames = {
|
| 536 |
+
"en": "English",
|
| 537 |
+
"fr": "Français",
|
| 538 |
+
"es": "Español",
|
| 539 |
+
"zh-CN": "简体中文 (Simplified Chinese)",
|
| 540 |
+
"ja": "日本語 (Japanese)",
|
| 541 |
+
"de": "Deutsch (German)",
|
| 542 |
+
"pt-BR": "Português (Brasil)",
|
| 543 |
+
"ru": "Русский (Russian)"
|
| 544 |
+
};
|
| 545 |
+
|
| 546 |
+
|
| 547 |
+
function applyTranslations(lang) {
|
| 548 |
+
currentLang = lang;
|
| 549 |
+
// 1. Update all data-translate elements
|
| 550 |
+
document.querySelectorAll('[data-translate]').forEach(element => {
|
| 551 |
+
const key = element.getAttribute('data-translate');
|
| 552 |
+
if (translations[key] && translations[key][lang]) {
|
| 553 |
+
// Use innerHTML for text that contains markdown or nested tags (like in footer-copyright and culture points)
|
| 554 |
+
if (key === 'footer-copyright' || key.startsWith('culture-point-')) {
|
| 555 |
+
let text = translations[key][lang];
|
| 556 |
+
// Replace simple markdown bold (**) with strong tags for culture points
|
| 557 |
+
if (key.startsWith('culture-point-')) {
|
| 558 |
+
text = text.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
| 559 |
+
}
|
| 560 |
+
element.innerHTML = text;
|
| 561 |
+
} else {
|
| 562 |
+
element.textContent = translations[key][lang];
|
| 563 |
+
}
|
| 564 |
+
} else if (translations[key] && translations[key]['en']) {
|
| 565 |
+
// Fallback to English if the specific translation is missing (though all are added now)
|
| 566 |
+
let text = translations[key]['en'];
|
| 567 |
+
if (key === 'footer-copyright' || key.startsWith('culture-point-')) {
|
| 568 |
+
text = text.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
| 569 |
+
element.innerHTML = text;
|
| 570 |
+
} else {
|
| 571 |
+
element.textContent = text;
|
| 572 |
+
}
|
| 573 |
+
}
|
| 574 |
+
});
|
| 575 |
+
|
| 576 |
+
// 2. Update page title, HTML lang attribute, and current language display
|
| 577 |
+
document.documentElement.lang = lang;
|
| 578 |
+
document.getElementById('current-flag').textContent = flags[lang] || '🌐';
|
| 579 |
+
document.getElementById('current-lang-name').textContent = langNames[lang] || 'English';
|
| 580 |
+
document.getElementById('current-lang-name').setAttribute('data-lang-code', lang);
|
| 581 |
+
|
| 582 |
+
// 3. Update active link in nav
|
| 583 |
+
document.querySelectorAll('nav a').forEach(link => {
|
| 584 |
+
link.classList.remove('text-blue-600-var');
|
| 585 |
+
});
|
| 586 |
+
const careersLink = document.querySelector('a[href="/mindus/nexus/careers"]');
|
| 587 |
+
if (careersLink) {
|
| 588 |
+
careersLink.classList.add('text-blue-600-var');
|
| 589 |
+
}
|
| 590 |
+
}
|
| 591 |
+
|
| 592 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 593 |
+
// Language selector toggle logic
|
| 594 |
+
const langButton = document.getElementById('lang-menu-button');
|
| 595 |
+
const langDropdown = document.getElementById('lang-menu-dropdown');
|
| 596 |
+
|
| 597 |
+
langButton.addEventListener('click', (e) => {
|
| 598 |
+
e.stopPropagation();
|
| 599 |
+
// Toggle display
|
| 600 |
+
const isVisible = langDropdown.style.display === 'block';
|
| 601 |
+
langDropdown.style.display = isVisible ? 'none' : 'block';
|
| 602 |
+
});
|
| 603 |
+
|
| 604 |
+
document.addEventListener('click', (e) => {
|
| 605 |
+
if (!langButton.contains(e.target) && !langDropdown.contains(e.target)) {
|
| 606 |
+
langDropdown.style.display = 'none';
|
| 607 |
+
}
|
| 608 |
+
});
|
| 609 |
+
|
| 610 |
+
// Language selection logic
|
| 611 |
+
document.querySelectorAll('.lang-option').forEach(option => {
|
| 612 |
+
option.addEventListener('click', (e) => {
|
| 613 |
+
e.preventDefault();
|
| 614 |
+
const newLang = option.getAttribute('data-lang');
|
| 615 |
+
applyTranslations(newLang);
|
| 616 |
+
langDropdown.style.display = 'none'; // Close dropdown after selection
|
| 617 |
+
});
|
| 618 |
+
});
|
| 619 |
+
|
| 620 |
+
// Initial load: Apply English translations by default
|
| 621 |
+
applyTranslations(currentLang);
|
| 622 |
+
});
|
| 623 |
+
</script>
|
| 624 |
+
</body>
|
| 625 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/chat.html
ADDED
|
@@ -0,0 +1,1799 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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="fr">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>ErnestMind 2.5 - Chat IA</title>
|
| 8 |
+
<link rel="icon" href="https://i.imgur.com/7Gn3toV.png" type="image/png">
|
| 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/highlight.js/11.9.0/styles/atom-one-dark.min.css">
|
| 13 |
+
|
| 14 |
+
<style>
|
| 15 |
+
/* Import de la police Poppins */
|
| 16 |
+
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;400;500;600&display=swap");
|
| 17 |
+
|
| 18 |
+
* {
|
| 19 |
+
font-family: "Poppins", sans-serif;
|
| 20 |
+
margin: 0;
|
| 21 |
+
box-sizing: border-box;
|
| 22 |
+
padding: 0;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* Variables de thème (Mode Sombre par défaut) */
|
| 26 |
+
:root {
|
| 27 |
+
--text-color: #E3E3E3;
|
| 28 |
+
--subheading-color: #828282;
|
| 29 |
+
--placeholder-color: #A6A6A6;
|
| 30 |
+
--primary-color: #242424;
|
| 31 |
+
--secondary-color: #383838;
|
| 32 |
+
--secondary-hover-color: #444;
|
| 33 |
+
--sidebar-bg: #1A1A1A; /* Couleur spécifique pour la barre latérale */
|
| 34 |
+
--sidebar-hover-bg: #2C2C2C;
|
| 35 |
+
--max-sidebar-width: 300px;
|
| 36 |
+
--min-sidebar-width: 80px;
|
| 37 |
+
/* COULEUR MODIFIÉE : Les messages utilisateur et IA partagent maintenant la même couleur de fond */
|
| 38 |
+
--user-message-bg: var(--secondary-color);
|
| 39 |
+
--send-button-text: #EAEAEA;
|
| 40 |
+
/* COULEUR POUR LA SCROLLBAR EN MODE SOMBRE (Gris doux) */
|
| 41 |
+
--scrollbar-thumb-color: #555555;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
/* Thème Clair */
|
| 45 |
+
.light_mode {
|
| 46 |
+
--text-color: #222;
|
| 47 |
+
--subheading-color: #666;
|
| 48 |
+
--placeholder-color: #999;
|
| 49 |
+
--primary-color: #F7F7F7;
|
| 50 |
+
--secondary-color: #FFF;
|
| 51 |
+
--secondary-hover-color: #EFEFEF;
|
| 52 |
+
--sidebar-bg: #EAEAEA;
|
| 53 |
+
--sidebar-hover-bg: #DDD;
|
| 54 |
+
/* COULEUR MODIFIÉE : Les messages utilisateur et IA partagent la couleur du thème clair (white) */
|
| 55 |
+
--user-message-bg: var(--secondary-color);
|
| 56 |
+
--send-button-text: #444;
|
| 57 |
+
/* COULEUR POUR LA SCROLLBAR EN MODE CLAIR (Gris très clair) */
|
| 58 |
+
--scrollbar-thumb-color: #BBBBBB;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
/* --- LAYOUT GLOBAL --- */
|
| 62 |
+
.main-container {
|
| 63 |
+
display: flex;
|
| 64 |
+
min-height: 100vh;
|
| 65 |
+
background: var(--primary-color);
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/* --- BARRE LATÉRALE (Sidebar) --- */
|
| 69 |
+
.sidebar {
|
| 70 |
+
width: var(--min-sidebar-width);
|
| 71 |
+
flex-shrink: 0;
|
| 72 |
+
height: 100vh;
|
| 73 |
+
background: var(--sidebar-bg);
|
| 74 |
+
color: var(--text-color);
|
| 75 |
+
padding: 1rem 0.5rem;
|
| 76 |
+
transition: width 0.3s ease;
|
| 77 |
+
display: flex;
|
| 78 |
+
flex-direction: column;
|
| 79 |
+
justify-content: space-between;
|
| 80 |
+
overflow-y: auto;
|
| 81 |
+
position: fixed;
|
| 82 |
+
left: 0;
|
| 83 |
+
top: 0;
|
| 84 |
+
z-index: 100;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.sidebar.open {
|
| 88 |
+
width: var(--max-sidebar-width);
|
| 89 |
+
box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.sidebar .logo {
|
| 93 |
+
display: flex;
|
| 94 |
+
align-items: center;
|
| 95 |
+
padding: 0.5rem 0.5rem 1.5rem;
|
| 96 |
+
white-space: nowrap;
|
| 97 |
+
overflow: hidden;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.sidebar .logo .icon {
|
| 101 |
+
font-size: 2rem;
|
| 102 |
+
margin-right: 0.5rem;
|
| 103 |
+
color: #007bff; /* Couleur de l'accentuation */
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.sidebar .logo .title {
|
| 107 |
+
font-weight: 600;
|
| 108 |
+
font-size: 1.2rem;
|
| 109 |
+
transition: opacity 0.3s ease;
|
| 110 |
+
opacity: 0;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.sidebar.open .logo .title {
|
| 114 |
+
opacity: 1;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
/* Les éléments de menu (li) */
|
| 118 |
+
.sidebar ul li {
|
| 119 |
+
list-style: none;
|
| 120 |
+
display: flex;
|
| 121 |
+
align-items: center;
|
| 122 |
+
padding: 0.75rem 0.5rem;
|
| 123 |
+
margin: 0.5rem 0;
|
| 124 |
+
cursor: pointer;
|
| 125 |
+
border-radius: 8px;
|
| 126 |
+
white-space: nowrap;
|
| 127 |
+
overflow: hidden;
|
| 128 |
+
transition: background 0.2s;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.sidebar ul li:hover {
|
| 132 |
+
background: var(--sidebar-hover-bg);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.sidebar ul li .icon {
|
| 136 |
+
font-size: 1.5rem;
|
| 137 |
+
margin-right: 1.5rem;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
/* 3. MASQUER/AFFICHER LE TEXTE des éléments de menu (sauf Menu/Thème) */
|
| 141 |
+
.sidebar ul li .text {
|
| 142 |
+
font-weight: 400;
|
| 143 |
+
font-size: 1rem;
|
| 144 |
+
transition: opacity 0.3s ease;
|
| 145 |
+
opacity: 0;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.sidebar.open ul li .text {
|
| 149 |
+
opacity: 1;
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
/* Ajustement pour les boutons TOUJOURS VISIBLES, même en sidebar fermée */
|
| 153 |
+
/* NOTE : Ceci annule l'effet pour ces éléments spécifiques */
|
| 154 |
+
#sidebar-toggle-btn .text,
|
| 155 |
+
#toggle-theme-btn .text {
|
| 156 |
+
opacity: 0; /* Par défaut masqué comme les autres */
|
| 157 |
+
transition: opacity 0.3s ease;
|
| 158 |
+
}
|
| 159 |
+
/* Rendre visibles lorsque la sidebar est ouverte */
|
| 160 |
+
.sidebar.open #sidebar-toggle-btn .text,
|
| 161 |
+
.sidebar.open #toggle-theme-btn .text {
|
| 162 |
+
opacity: 1;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
/* --- EN-TÊTE DU CHAT (Positionnement mis à jour) --- */
|
| 167 |
+
.chat-header {
|
| 168 |
+
/* SUPPRIMÉ: chat-header est maintenant utilisé uniquement pour l'alignement à droite
|
| 169 |
+
des boutons 'Plus' et 'Profil' */
|
| 170 |
+
width: 100%;
|
| 171 |
+
max-width: 900px;
|
| 172 |
+
margin: 0 auto;
|
| 173 |
+
display: flex;
|
| 174 |
+
justify-content: flex-end; /* Alignement à droite */
|
| 175 |
+
align-items: center;
|
| 176 |
+
padding: 1rem 1rem 1rem 0;
|
| 177 |
+
color: var(--text-color);
|
| 178 |
+
position: sticky;
|
| 179 |
+
top: 0;
|
| 180 |
+
background: var(--primary-color);
|
| 181 |
+
z-index: 50;
|
| 182 |
+
|
| 183 |
+
/* AJOUT: Espace pour le titre principal */
|
| 184 |
+
min-height: 50px;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
/* Bouton/Icône de Connexion (Profil) */
|
| 188 |
+
#login-button {
|
| 189 |
+
background: var(--secondary-color);
|
| 190 |
+
width: 40px;
|
| 191 |
+
height: 40px;
|
| 192 |
+
border-radius: 50%;
|
| 193 |
+
display: flex;
|
| 194 |
+
align-items: center;
|
| 195 |
+
justify-content: center;
|
| 196 |
+
cursor: pointer;
|
| 197 |
+
transition: background 0.2s;
|
| 198 |
+
margin-right: 0;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
#login-button:hover {
|
| 202 |
+
background: var(--secondary-hover-color);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
#login-button .icon {
|
| 206 |
+
font-size: 1.5rem;
|
| 207 |
+
color: var(--text-color);
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
/* Nouveau Bouton "ErnestMind Plus" */
|
| 211 |
+
#ernest-plus-button {
|
| 212 |
+
background: var(--secondary-color);
|
| 213 |
+
color: var(--text-color);
|
| 214 |
+
border: none;
|
| 215 |
+
border-radius: 25px;
|
| 216 |
+
padding: 0.5rem 1rem;
|
| 217 |
+
font-size: 1rem;
|
| 218 |
+
font-weight: 500;
|
| 219 |
+
cursor: pointer;
|
| 220 |
+
transition: background 0.2s;
|
| 221 |
+
display: flex;
|
| 222 |
+
align-items: center;
|
| 223 |
+
margin-right: 0.75rem; /* Espace entre Plus et Profil */
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
#ernest-plus-button:hover {
|
| 227 |
+
background: var(--secondary-hover-color);
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
/* Style pour le logo Ernest Plus */
|
| 231 |
+
.plus-logo {
|
| 232 |
+
width: 20px;
|
| 233 |
+
height: 20px;
|
| 234 |
+
margin-right: 0.5rem;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
/* --- NOUVEAU: Bouton ErnestMind 2.5 (Brand Toggle) --- */
|
| 239 |
+
.brand-toggle-btn {
|
| 240 |
+
position: fixed;
|
| 241 |
+
top: 1rem;
|
| 242 |
+
left: calc(var(--min-sidebar-width) + 1rem); /* Décalé de la sidebar fermée */
|
| 243 |
+
z-index: 90;
|
| 244 |
+
/* Styles du bouton */
|
| 245 |
+
background: var(--secondary-color); /* Gris foncé demandé */
|
| 246 |
+
color: var(--text-color);
|
| 247 |
+
border: none;
|
| 248 |
+
border-radius: 25px;
|
| 249 |
+
padding: 0.5rem 1rem;
|
| 250 |
+
font-size: 1rem;
|
| 251 |
+
font-weight: 500;
|
| 252 |
+
cursor: pointer;
|
| 253 |
+
transition: background 0.2s, opacity 0.3s;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.brand-toggle-btn:hover {
|
| 257 |
+
background: var(--secondary-hover-color);
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
/* Cacher le bouton quand la sidebar est ouverte */
|
| 261 |
+
.sidebar.open + .brand-toggle-btn {
|
| 262 |
+
opacity: 0;
|
| 263 |
+
pointer-events: none; /* Rendre in-clicable */
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
/* --- ZONE DE CHAT (Contenu principal) --- */
|
| 268 |
+
.chat-wrapper {
|
| 269 |
+
flex-grow: 1;
|
| 270 |
+
display: flex;
|
| 271 |
+
flex-direction: column;
|
| 272 |
+
padding-left: var(--min-sidebar-width);
|
| 273 |
+
transition: padding-left 0s;
|
| 274 |
+
padding-bottom: 2rem;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
/* Messages (scrollable area) */
|
| 278 |
+
.chat-list {
|
| 279 |
+
flex-grow: 1;
|
| 280 |
+
padding: 0 2rem 1rem;
|
| 281 |
+
overflow-y: auto;
|
| 282 |
+
max-width: 900px;
|
| 283 |
+
width: 100%;
|
| 284 |
+
margin: 0 auto;
|
| 285 |
+
padding-bottom: 25px;
|
| 286 |
+
transition: padding-bottom 0.3s ease;
|
| 287 |
+
|
| 288 |
+
/* AJOUT CSS : Masquer la barre de défilement par défaut */
|
| 289 |
+
scrollbar-width: none; /* Firefox */
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
/* AJOUT CSS : Masquer la barre de défilement par défaut (Chrome/Safari) */
|
| 293 |
+
.chat-list::-webkit-scrollbar {
|
| 294 |
+
width: 8px; /* Taille pour permettre le survol */
|
| 295 |
+
background: transparent; /* Fond transparent par défaut */
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
/* AJOUT CSS : Afficher le pouce de la scrollbar au survol de .chat-list */
|
| 299 |
+
.chat-list:hover::-webkit-scrollbar-thumb {
|
| 300 |
+
background-color: var(--scrollbar-thumb-color); /* Couleur du pouce (gris) */
|
| 301 |
+
border-radius: 10px;
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
/* AJOUT CSS : Masquer le pouce de la scrollbar par défaut */
|
| 305 |
+
.chat-list::-webkit-scrollbar-thumb {
|
| 306 |
+
background-color: transparent; /* Invisible par défaut */
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
/* NOUVELLE CLASSE POUR L'ESPACEMENT DU CHAT LORSQUE LA ZONE DE SAISIE EST ANCRÉE */
|
| 311 |
+
.chat-list.has-docked-area {
|
| 312 |
+
/* Augmente le padding-bottom pour compenser la hauteur de .typing-area.docked */
|
| 313 |
+
padding-bottom: 150px;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
/* Style pour le message initial de bienvenue */
|
| 317 |
+
.initial-welcome {
|
| 318 |
+
display: flex;
|
| 319 |
+
flex-direction: column;
|
| 320 |
+
align-items: flex-start; /* MODIFIÉ : Aligné à gauche */
|
| 321 |
+
justify-content: flex-start; /* MODIFIÉ : Aligné en haut */
|
| 322 |
+
height: 100%;
|
| 323 |
+
text-align: left; /* MODIFIÉ : Aligné à gauche */
|
| 324 |
+
color: var(--text-color);
|
| 325 |
+
padding-top: 5vh; /* Ajustement du padding */
|
| 326 |
+
padding-left: 0.5rem; /* Ajustement pour le chat-list padding */
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.initial-welcome .chat-title {
|
| 330 |
+
font-size: 3rem;
|
| 331 |
+
font-weight: 600;
|
| 332 |
+
color: var(--text-color);
|
| 333 |
+
margin-bottom: 0; /* SUPPRIMÉ: Le sous-texte a été retiré */
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
.initial-welcome p {
|
| 337 |
+
/* SUPPRIMÉ: Ce sélecteur n'est plus pertinent car le paragraphe a été retiré */
|
| 338 |
+
display: none;
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
/* Style pour un message */
|
| 342 |
+
.chat-message {
|
| 343 |
+
display: flex;
|
| 344 |
+
align-items: flex-start;
|
| 345 |
+
margin-bottom: 2rem;
|
| 346 |
+
gap: 1rem;
|
| 347 |
+
padding: 0.5rem;
|
| 348 |
+
border-radius: 12px;
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
/* 3. Messages Utilisateur (Couleur de fond uniforme avec l'IA) */
|
| 352 |
+
.chat-message.user {
|
| 353 |
+
justify-content: flex-end;
|
| 354 |
+
background: var(--user-message-bg); /* Maintenant utilise --secondary-color */
|
| 355 |
+
max-width: fit-content;
|
| 356 |
+
margin-left: auto;
|
| 357 |
+
padding: 1rem;
|
| 358 |
+
display: block;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
/* Contenu du message utilisateur */
|
| 362 |
+
.chat-message.user .text-content {
|
| 363 |
+
color: var(--text-color); /* Le texte prend la couleur du thème (white/dark-gray) */
|
| 364 |
+
text-align: left;
|
| 365 |
+
word-wrap: break-word;
|
| 366 |
+
max-width: 50ch;
|
| 367 |
+
min-width: 0;
|
| 368 |
+
width: fit-content;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
/* Avatar utilisateur masqué */
|
| 372 |
+
.chat-message.user .avatar {
|
| 373 |
+
display: none;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
/* Messages IA (Couleur: Supprimée pour un look simple) */
|
| 378 |
+
.chat-message.ai {
|
| 379 |
+
background: transparent; /* MODIFIÉ : Supprime le fond coloré */
|
| 380 |
+
padding: 1rem 0.5rem 1rem 0; /* Ajustement de l'espacement pour le look épuré */
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
.chat-message .avatar {
|
| 384 |
+
font-size: 1.8rem;
|
| 385 |
+
width: 40px;
|
| 386 |
+
height: 40px;
|
| 387 |
+
border-radius: 50%;
|
| 388 |
+
display: flex;
|
| 389 |
+
align-items: center;
|
| 390 |
+
justify-content: center;
|
| 391 |
+
color: white;
|
| 392 |
+
flex-shrink: 0;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
.chat-message.user .avatar {
|
| 396 |
+
background: #007bff;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
.chat-message.ai .avatar {
|
| 400 |
+
background: #2441c3ff;
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
.chat-message.ai .text-content {
|
| 404 |
+
color: var(--text-color);
|
| 405 |
+
line-height: 1.6;
|
| 406 |
+
flex-grow: 1;
|
| 407 |
+
overflow-x: auto;
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
/* Chargement (Loading dots) */
|
| 411 |
+
.typing-animation {
|
| 412 |
+
display: flex;
|
| 413 |
+
align-items: center;
|
| 414 |
+
font-size: 0.9rem;
|
| 415 |
+
color: var(--subheading-color);
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
/* NOUVEAU: Animation de pensée type Gemini */
|
| 419 |
+
.thought-animation {
|
| 420 |
+
width: 15px;
|
| 421 |
+
height: 15px;
|
| 422 |
+
border: 3px solid #007bff; /* Couleur bleue */
|
| 423 |
+
border-top-color: transparent;
|
| 424 |
+
border-radius: 50%;
|
| 425 |
+
animation: spin 1s linear infinite;
|
| 426 |
+
margin-right: 0.5rem;
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
@keyframes spin {
|
| 430 |
+
0% { transform: rotate(0deg); }
|
| 431 |
+
100% { transform: rotate(360deg); }
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
/* --- STYLES MARKDOWN pour le contenu généré par l'IA --- */
|
| 436 |
+
|
| 437 |
+
.chat-message.ai .text-content h1,
|
| 438 |
+
.chat-message.ai .text-content h2 {
|
| 439 |
+
margin: 1.5rem 0 0.5rem;
|
| 440 |
+
font-weight: 600;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
.chat-message.ai .text-content p {
|
| 444 |
+
margin-bottom: 1rem;
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
.chat-message.ai .text-content ul,
|
| 448 |
+
.chat-message.ai .text-content ol {
|
| 449 |
+
margin: 0.5rem 0 1rem 1.5rem;
|
| 450 |
+
padding: 0;
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
.chat-message.ai .text-content li {
|
| 454 |
+
margin-bottom: 0.5rem;
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
/* Style pour les blocs de code (triple backticks) */
|
| 458 |
+
|
| 459 |
+
/* --- NOUVEAU: Styles pour la Carte de Code et le Bouton Copier --- */
|
| 460 |
+
|
| 461 |
+
/* 1. Conteneur Relatif pour positionner le bouton de copie */
|
| 462 |
+
.chat-message.ai .code-container {
|
| 463 |
+
position: relative; /* Positionnement du bouton de copie à l'intérieur */
|
| 464 |
+
margin: 1rem 0; /* Garde la marge verticale */
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
/* 2. Style de la balise PRE (la carte elle-même) */
|
| 468 |
+
.chat-message.ai .text-content pre {
|
| 469 |
+
/* Suppression des marges pour utiliser le nouveau conteneur .code-container */
|
| 470 |
+
margin: 0;
|
| 471 |
+
|
| 472 |
+
/* Styles existants */
|
| 473 |
+
background: var(--sidebar-bg);
|
| 474 |
+
padding: 1rem;
|
| 475 |
+
border-radius: 8px;
|
| 476 |
+
overflow-x: auto;
|
| 477 |
+
font-size: 0.95rem;
|
| 478 |
+
line-height: 1.4;
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
/* 3. Bouton de Copie */
|
| 482 |
+
.copy-code-btn {
|
| 483 |
+
position: absolute;
|
| 484 |
+
top: 5px;
|
| 485 |
+
right: 5px;
|
| 486 |
+
background: rgba(255, 255, 255, 0.1);
|
| 487 |
+
color: var(--text-color);
|
| 488 |
+
border: none;
|
| 489 |
+
padding: 0.3rem 0.6rem;
|
| 490 |
+
border-radius: 4px;
|
| 491 |
+
cursor: pointer;
|
| 492 |
+
font-size: 0.8rem;
|
| 493 |
+
font-weight: 500;
|
| 494 |
+
opacity: 0; /* Masqué par défaut */
|
| 495 |
+
transition: opacity 0.2s, background 0.2s;
|
| 496 |
+
display: flex;
|
| 497 |
+
align-items: center;
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
/* Afficher le bouton au survol du conteneur */
|
| 501 |
+
.code-container:hover .copy-code-btn {
|
| 502 |
+
opacity: 1;
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
.copy-code-btn:hover {
|
| 506 |
+
background: rgba(255, 255, 255, 0.2);
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
.copy-code-btn .material-symbols-rounded {
|
| 510 |
+
font-size: 1rem;
|
| 511 |
+
margin-right: 0.2rem;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
.chat-message.ai .text-content code {
|
| 516 |
+
/* Style pour le code inline (single backtick) */
|
| 517 |
+
background: var(--secondary-hover-color);
|
| 518 |
+
padding: 0.2rem 0.4rem;
|
| 519 |
+
border-radius: 4px;
|
| 520 |
+
font-weight: 500;
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
/* Assurer que le code dans les blocs reste en couleur texte du thème */
|
| 524 |
+
.chat-message.ai .text-content pre code {
|
| 525 |
+
/* Le fond est géré par highlight.js */
|
| 526 |
+
background: transparent;
|
| 527 |
+
/* La couleur est gérée par highlight.js */
|
| 528 |
+
/* color: var(--text-color); */
|
| 529 |
+
padding: 0;
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
/* --- ZONE DE SAISIE (Typing Area) --- */
|
| 533 |
+
|
| 534 |
+
/* Classe par défaut (CENTRÉE VERTICALEMENT) */
|
| 535 |
+
.typing-area {
|
| 536 |
+
position: absolute; /* Changer à absolute pour le centrage initial */
|
| 537 |
+
top: 50%;
|
| 538 |
+
left: 50%;
|
| 539 |
+
transform: translate(-50%, -50%);
|
| 540 |
+
width: calc(100% - var(--min-sidebar-width)); /* Largeur ajustée */
|
| 541 |
+
padding: 1rem;
|
| 542 |
+
background: transparent; /* Pas de fond visible lors du centrage */
|
| 543 |
+
border-top: none;
|
| 544 |
+
z-index: 10;
|
| 545 |
+
transition: all 0.5s ease; /* Transition pour le mouvement */
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
/* Classe APPLIQUÉE APRÈS LE PREMIER MESSAGE (EN BAS DE L'ÉCRAN) */
|
| 549 |
+
.typing-area.docked {
|
| 550 |
+
position: fixed; /* Changer à fixed pour rester en bas */
|
| 551 |
+
bottom: 0;
|
| 552 |
+
top: auto; /* Annuler 'top: 50%' */
|
| 553 |
+
left: 0; /* Changer 'left: 50%' */
|
| 554 |
+
transform: none; /* Annuler 'translate' */
|
| 555 |
+
width: 100%; /* Reprendre la largeur normale */
|
| 556 |
+
padding: 1rem;
|
| 557 |
+
background: var(--primary-color);
|
| 558 |
+
border-top: 1px solid var(--secondary-color);
|
| 559 |
+
padding-left: calc(var(--min-sidebar-width) + 1rem);
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
/* Assurer que la zone de saisie est centrée par rapport à elle-même au début */
|
| 563 |
+
.typing-area .typing-form {
|
| 564 |
+
max-width: 900px;
|
| 565 |
+
margin: 0 auto;
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
.typing-area .input-wrapper {
|
| 569 |
+
display: flex;
|
| 570 |
+
flex-direction: column; /* Changé à column pour gérer la liste de fichiers au-dessus */
|
| 571 |
+
align-items: stretch;
|
| 572 |
+
background: var(--secondary-color);
|
| 573 |
+
border-radius: 25px;
|
| 574 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 575 |
+
|
| 576 |
+
/* 1. Réduire légèrement la largeur horizontale */
|
| 577 |
+
max-width: 820px;
|
| 578 |
+
margin: 0 auto;
|
| 579 |
+
|
| 580 |
+
/* AJOUT: Ajuster le padding pour le contenu intérieur */
|
| 581 |
+
padding: 0.25rem;
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
/* AJOUT: Conteneur du texte et du bouton d'envoi */
|
| 585 |
+
.typing-area .input-controls {
|
| 586 |
+
display: flex;
|
| 587 |
+
align-items: flex-end; /* Aligner le textarea et le bouton */
|
| 588 |
+
}
|
| 589 |
+
|
| 590 |
+
/* AJOUT: Zone d'affichage des fichiers */
|
| 591 |
+
.typing-area .file-display-area {
|
| 592 |
+
display: flex;
|
| 593 |
+
align-items: center;
|
| 594 |
+
padding: 0.5rem 0;
|
| 595 |
+
margin-left: 0.5rem; /* Aligner avec le textarea */
|
| 596 |
+
overflow-x: auto; /* Défilement horizontal si plus de 4 fichiers */
|
| 597 |
+
max-width: 100%; /* Important pour le défilement */
|
| 598 |
+
white-space: nowrap; /* Empêche les badges de passer à la ligne */
|
| 599 |
+
/* Cacher la barre de défilement pour un look plus propre */
|
| 600 |
+
scrollbar-width: none; /* Firefox */
|
| 601 |
+
}
|
| 602 |
+
.typing-area .file-display-area::-webkit-scrollbar {
|
| 603 |
+
display: none; /* Chrome, Safari, Opera */
|
| 604 |
+
}
|
| 605 |
+
|
| 606 |
+
/* AJOUT: Badge de fichier */
|
| 607 |
+
.file-badge {
|
| 608 |
+
display: inline-flex;
|
| 609 |
+
align-items: center;
|
| 610 |
+
background: var(--primary-color);
|
| 611 |
+
color: var(--text-color);
|
| 612 |
+
padding: 0.3rem 0.6rem;
|
| 613 |
+
border-radius: 15px;
|
| 614 |
+
font-size: 0.8rem;
|
| 615 |
+
margin-right: 0.5rem;
|
| 616 |
+
flex-shrink: 0; /* Empêche le badge de se rétrécir */
|
| 617 |
+
}
|
| 618 |
+
|
| 619 |
+
.file-badge .delete-file-btn {
|
| 620 |
+
background: none;
|
| 621 |
+
border: none;
|
| 622 |
+
color: var(--placeholder-color);
|
| 623 |
+
cursor: pointer;
|
| 624 |
+
margin-left: 0.5rem;
|
| 625 |
+
padding: 0;
|
| 626 |
+
font-size: 1rem;
|
| 627 |
+
line-height: 1;
|
| 628 |
+
transition: color 0.2s;
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
.file-badge .delete-file-btn:hover {
|
| 632 |
+
color: red;
|
| 633 |
+
}
|
| 634 |
+
|
| 635 |
+
/* 2. Icône d'importation de fichiers (+) */
|
| 636 |
+
.typing-area .input-wrapper .file-upload-btn {
|
| 637 |
+
width: 45px;
|
| 638 |
+
height: 45px;
|
| 639 |
+
background: transparent;
|
| 640 |
+
display: flex;
|
| 641 |
+
justify-content: center;
|
| 642 |
+
align-items: center;
|
| 643 |
+
border-radius: 50%;
|
| 644 |
+
cursor: pointer;
|
| 645 |
+
color: var(--placeholder-color); /* Gris clair pour l'icône + */
|
| 646 |
+
outline: none;
|
| 647 |
+
border: none;
|
| 648 |
+
font-size: 24px;
|
| 649 |
+
transition: color 0.2s;
|
| 650 |
+
flex-shrink: 0; /* Empêche le bouton de rétrécir */
|
| 651 |
+
}
|
| 652 |
+
|
| 653 |
+
.typing-area .input-wrapper .file-upload-btn:hover {
|
| 654 |
+
color: var(--text-color);
|
| 655 |
+
}
|
| 656 |
+
|
| 657 |
+
.typing-area .input-wrapper .typing-input {
|
| 658 |
+
flex-grow: 1;
|
| 659 |
+
background: transparent;
|
| 660 |
+
border: none;
|
| 661 |
+
resize: none;
|
| 662 |
+
font-size: 1rem;
|
| 663 |
+
color: var(--text-color);
|
| 664 |
+
/* 1. Augmenter légèrement la hauteur verticale */
|
| 665 |
+
padding: 0.85rem 0.5rem;
|
| 666 |
+
line-height: 1.5;
|
| 667 |
+
max-height: 150px;
|
| 668 |
+
overflow-y: auto;
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
.typing-area .input-wrapper .typing-input::placeholder {
|
| 672 |
+
color: var(--placeholder-color);
|
| 673 |
+
}
|
| 674 |
+
|
| 675 |
+
.typing-area .input-wrapper .typing-input:focus {
|
| 676 |
+
outline: none;
|
| 677 |
+
}
|
| 678 |
+
|
| 679 |
+
/* AJOUT: Style pour l'indicateur de limite de texte */
|
| 680 |
+
.typing-area .char-count {
|
| 681 |
+
font-size: 0.8rem;
|
| 682 |
+
color: var(--placeholder-color);
|
| 683 |
+
margin-right: 1rem;
|
| 684 |
+
align-self: flex-end; /* Aligner à droite sous le textarea */
|
| 685 |
+
padding-bottom: 0.5rem;
|
| 686 |
+
flex-shrink: 0;
|
| 687 |
+
}
|
| 688 |
+
|
| 689 |
+
.typing-area .char-count.error {
|
| 690 |
+
color: red;
|
| 691 |
+
font-weight: 500;
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
|
| 695 |
+
/* Bouton d'Envoi de Texte */
|
| 696 |
+
.typing-area .input-wrapper button.send-button {
|
| 697 |
+
width: 45px;
|
| 698 |
+
height: 45px;
|
| 699 |
+
background: transparent; /* Fond transparent par défaut */
|
| 700 |
+
display: flex;
|
| 701 |
+
justify-content: center;
|
| 702 |
+
align-items: center;
|
| 703 |
+
border-radius: 50%;
|
| 704 |
+
cursor: pointer;
|
| 705 |
+
color: var(--placeholder-color); /* Couleur par défaut (micro) */
|
| 706 |
+
outline: none;
|
| 707 |
+
border: none;
|
| 708 |
+
font-size: 24px;
|
| 709 |
+
transition: background 0.2s, color 0.2s;
|
| 710 |
+
flex-shrink: 0; /* Empêche le bouton de rétrécir */
|
| 711 |
+
margin: 0.25rem; /* Ajuster la position pour le padding du wrapper */
|
| 712 |
+
}
|
| 713 |
+
|
| 714 |
+
/* Style pour l'icône 'send' (actif) */
|
| 715 |
+
.typing-area .input-wrapper button.send-button.active {
|
| 716 |
+
background: #49494bff; /* Fond gris/bleu pour le bouton d'envoi actif */
|
| 717 |
+
color: white;
|
| 718 |
+
}
|
| 719 |
+
|
| 720 |
+
.typing-area .input-wrapper button.send-button.active:hover {
|
| 721 |
+
background: #0074f0ff;
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
.typing-area .disclaimer-text {
|
| 725 |
+
font-size: 0.85rem;
|
| 726 |
+
margin-top: 1rem;
|
| 727 |
+
text-align: center;
|
| 728 |
+
color: var(--placeholder-color);
|
| 729 |
+
}
|
| 730 |
+
|
| 731 |
+
/* Texte de non-responsabilité masqué dans l'état initial centré */
|
| 732 |
+
.typing-area:not(.docked) .disclaimer-text {
|
| 733 |
+
display: none;
|
| 734 |
+
}
|
| 735 |
+
|
| 736 |
+
/* Message d'erreur personnalisé (pour limite de fichier) */
|
| 737 |
+
#file-error-message {
|
| 738 |
+
color: red;
|
| 739 |
+
font-size: 0.9rem;
|
| 740 |
+
text-align: center;
|
| 741 |
+
margin-top: 0.5rem;
|
| 742 |
+
}
|
| 743 |
+
|
| 744 |
+
/* --- NOUVEAU: Carte de Paramètres --- */
|
| 745 |
+
#settings-card {
|
| 746 |
+
position: fixed;
|
| 747 |
+
top: 0;
|
| 748 |
+
/* Démarrer juste à côté de la sidebar fermée (80px) */
|
| 749 |
+
left: var(--min-sidebar-width);
|
| 750 |
+
height: 100vh;
|
| 751 |
+
width: 0; /* Caché par défaut */
|
| 752 |
+
max-width: 340px; /* Rendre un peu plus large (ex: 340px) */
|
| 753 |
+
background: var(--secondary-color); /* Utiliser la couleur secondaire pour le fond de la carte */
|
| 754 |
+
color: var(--text-color);
|
| 755 |
+
box-shadow: 6px 0 15px rgba(0, 0, 0, 0.3);
|
| 756 |
+
overflow-y: auto;
|
| 757 |
+
overflow-x: hidden;
|
| 758 |
+
transition: width 0.3s ease, padding 0.3s ease, left 0.3s ease;
|
| 759 |
+
z-index: 99; /* Moins que la sidebar (100) mais plus que le chat (50) */
|
| 760 |
+
}
|
| 761 |
+
|
| 762 |
+
/* L'état ouvert de la carte */
|
| 763 |
+
#settings-card.open {
|
| 764 |
+
width: 340px; /* Définir la largeur horizontale demandée */
|
| 765 |
+
padding: 1.5rem 1.5rem;
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
/* Ajustement de la position si la sidebar est ouverte */
|
| 769 |
+
.sidebar.open ~ #settings-card {
|
| 770 |
+
left: var(--max-sidebar-width); /* Se positionne après la sidebar ouverte (300px) */
|
| 771 |
+
}
|
| 772 |
+
|
| 773 |
+
/* Style des éléments de formulaire dans la carte */
|
| 774 |
+
#settings-card .setting-group {
|
| 775 |
+
margin-bottom: 1.5rem;
|
| 776 |
+
}
|
| 777 |
+
|
| 778 |
+
#settings-card label {
|
| 779 |
+
display: block;
|
| 780 |
+
font-weight: 500;
|
| 781 |
+
margin-bottom: 0.5rem;
|
| 782 |
+
font-size: 0.95rem;
|
| 783 |
+
color: var(--subheading-color);
|
| 784 |
+
}
|
| 785 |
+
|
| 786 |
+
#settings-card select,
|
| 787 |
+
#settings-card textarea {
|
| 788 |
+
width: 100%;
|
| 789 |
+
padding: 0.6rem 0.8rem;
|
| 790 |
+
border: 1px solid var(--sidebar-hover-bg);
|
| 791 |
+
border-radius: 8px;
|
| 792 |
+
background: var(--primary-color);
|
| 793 |
+
color: var(--text-color);
|
| 794 |
+
font-size: 1rem;
|
| 795 |
+
appearance: none; /* Cache la flèche par défaut pour le style */
|
| 796 |
+
}
|
| 797 |
+
|
| 798 |
+
#settings-card textarea {
|
| 799 |
+
min-height: 80px;
|
| 800 |
+
resize: vertical;
|
| 801 |
+
line-height: 1.4;
|
| 802 |
+
}
|
| 803 |
+
|
| 804 |
+
#settings-card select:focus,
|
| 805 |
+
#settings-card textarea:focus {
|
| 806 |
+
outline: none;
|
| 807 |
+
border-color: #007bff;
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
/* Ajout d'une flèche personnalisée pour les selects */
|
| 811 |
+
.select-wrapper {
|
| 812 |
+
position: relative;
|
| 813 |
+
}
|
| 814 |
+
|
| 815 |
+
.select-wrapper::after {
|
| 816 |
+
content: "expand_more";
|
| 817 |
+
font-family: 'Material Symbols Rounded';
|
| 818 |
+
position: absolute;
|
| 819 |
+
top: 50%;
|
| 820 |
+
right: 10px;
|
| 821 |
+
transform: translateY(-50%);
|
| 822 |
+
pointer-events: none;
|
| 823 |
+
color: var(--subheading-color);
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
/* --- RESPONSIVE / Mobile --- */
|
| 827 |
+
@media (max-width: 768px) {
|
| 828 |
+
.sidebar {
|
| 829 |
+
width: 0;
|
| 830 |
+
box-shadow: none;
|
| 831 |
+
}
|
| 832 |
+
.sidebar.open {
|
| 833 |
+
width: 80%;
|
| 834 |
+
}
|
| 835 |
+
.chat-wrapper {
|
| 836 |
+
padding-left: 0;
|
| 837 |
+
}
|
| 838 |
+
/* Ajustement pour le mode centré */
|
| 839 |
+
.typing-area {
|
| 840 |
+
width: 100%;
|
| 841 |
+
left: 0;
|
| 842 |
+
transform: translateY(-50%);
|
| 843 |
+
}
|
| 844 |
+
/* Ajustement pour le mode docké */
|
| 845 |
+
.typing-area.docked {
|
| 846 |
+
padding: 1rem 0.5rem;
|
| 847 |
+
padding-left: 0.5rem;
|
| 848 |
+
}
|
| 849 |
+
.brand-toggle-btn {
|
| 850 |
+
/* Cacher le bouton 'ErnestMind 2.5' sur mobile */
|
| 851 |
+
display: none;
|
| 852 |
+
}
|
| 853 |
+
/* Ajustement pour le message utilisateur sur mobile */
|
| 854 |
+
.chat-message.user .text-content {
|
| 855 |
+
max-width: 90%;
|
| 856 |
+
}
|
| 857 |
+
/* Ajustement pour l'en-tête sur mobile */
|
| 858 |
+
.chat-header {
|
| 859 |
+
padding: 1rem 0.5rem; /* Ajustement pour le bord de l'écran */
|
| 860 |
+
}
|
| 861 |
+
/* AJOUT MOBILE : ajuster l'espace si la zone ancrée est utilisée */
|
| 862 |
+
.chat-list.has-docked-area {
|
| 863 |
+
padding-bottom: 150px;
|
| 864 |
+
}
|
| 865 |
+
|
| 866 |
+
/* AJOUT MOBILE : Carte de paramètres */
|
| 867 |
+
#settings-card.open {
|
| 868 |
+
width: 100%; /* Prend toute la largeur sur mobile */
|
| 869 |
+
left: 0;
|
| 870 |
+
max-width: 100%;
|
| 871 |
+
}
|
| 872 |
+
|
| 873 |
+
.sidebar.open ~ #settings-card {
|
| 874 |
+
/* Si la sidebar est ouverte sur mobile, la carte est décalée */
|
| 875 |
+
left: 80%; /* Pour laisser la sidebar visible */
|
| 876 |
+
}
|
| 877 |
+
}
|
| 878 |
+
</style>
|
| 879 |
+
</head>
|
| 880 |
+
|
| 881 |
+
<body>
|
| 882 |
+
<div class="main-container">
|
| 883 |
+
<aside id="sidebar" class="sidebar">
|
| 884 |
+
<div>
|
| 885 |
+
<div class="logo">
|
| 886 |
+
<span class="icon material-symbols-rounded">psychology</span>
|
| 887 |
+
<span class="title">ErnestMind 2.5</span>
|
| 888 |
+
</div>
|
| 889 |
+
<ul class="sidebar-menu">
|
| 890 |
+
<li id="sidebar-toggle-btn">
|
| 891 |
+
<span class="icon material-symbols-rounded">menu</span>
|
| 892 |
+
<span class="text">Menu</span>
|
| 893 |
+
</li>
|
| 894 |
+
<li class="new-chat">
|
| 895 |
+
<span class="icon material-symbols-rounded">add</span>
|
| 896 |
+
<span class="text">Nouveau Chat</span>
|
| 897 |
+
</li>
|
| 898 |
+
<li>
|
| 899 |
+
<span class="icon material-symbols-rounded">history</span>
|
| 900 |
+
<span class="text">Historique</span>
|
| 901 |
+
</li>
|
| 902 |
+
</ul>
|
| 903 |
+
<ul class="recent-chats-list" id="recent-chats-list">
|
| 904 |
+
</ul>
|
| 905 |
+
</div>
|
| 906 |
+
<ul class="sidebar-footer">
|
| 907 |
+
<li id="settings-button">
|
| 908 |
+
<span class="icon material-symbols-rounded">settings</span>
|
| 909 |
+
<span class="text">Paramètres</span>
|
| 910 |
+
</li>
|
| 911 |
+
<li id="toggle-theme-btn">
|
| 912 |
+
<span class="icon material-symbols-rounded">dark_mode</span>
|
| 913 |
+
<span class="text">Thème</span>
|
| 914 |
+
</li>
|
| 915 |
+
</ul>
|
| 916 |
+
</aside>
|
| 917 |
+
|
| 918 |
+
<div id="settings-card">
|
| 919 |
+
<h2 style="font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 600;">Paramètres de l'IA</h2>
|
| 920 |
+
<hr style="border: none; border-bottom: 1px solid var(--sidebar-hover-bg); margin-bottom: 1.5rem;">
|
| 921 |
+
|
| 922 |
+
<div class="setting-group">
|
| 923 |
+
<label for="model-select">Sélection du Modèle (Version)</label>
|
| 924 |
+
<div class="select-wrapper">
|
| 925 |
+
<select id="model-select">
|
| 926 |
+
<option value="ernest_2_5" selected>ErnestMind 2.5 (Défaut)</option>
|
| 927 |
+
<option value="ernest_2_0">ErnestMind 2.0</option>
|
| 928 |
+
<option value="ernest_1_5">ErnestMind 1.5</option>
|
| 929 |
+
<option value="ernest_fast">Version Rapide/Légère</option>
|
| 930 |
+
<option value="ernest_plus">Version Plus (Abonnés)</option>
|
| 931 |
+
</select>
|
| 932 |
+
</div>
|
| 933 |
+
</div>
|
| 934 |
+
|
| 935 |
+
<div class="setting-group">
|
| 936 |
+
<label for="tone-select">Tonalité de la Réponse</label>
|
| 937 |
+
<div class="select-wrapper">
|
| 938 |
+
<select id="tone-select">
|
| 939 |
+
<option value="casual" selected>Décontracté (Défaut)</option>
|
| 940 |
+
<option value="formal">Formel</option>
|
| 941 |
+
<option value="technical">Technique</option>
|
| 942 |
+
<option value="creative">Créatif</option>
|
| 943 |
+
</select>
|
| 944 |
+
</div>
|
| 945 |
+
</div>
|
| 946 |
+
|
| 947 |
+
<div class="setting-group">
|
| 948 |
+
<label for="length-select">Longueur Maximale de la Réponse</label>
|
| 949 |
+
<div class="select-wrapper">
|
| 950 |
+
<select id="length-select">
|
| 951 |
+
<option value="medium" selected>Moyen (Défaut)</option>
|
| 952 |
+
<option value="short">Court</option>
|
| 953 |
+
<option value="long">Long</option>
|
| 954 |
+
</select>
|
| 955 |
+
</div>
|
| 956 |
+
</div>
|
| 957 |
+
|
| 958 |
+
<div class="setting-group">
|
| 959 |
+
<label for="persona-textarea">"Persona" par Défaut (Prompt système)</label>
|
| 960 |
+
<textarea id="persona-textarea" rows="4" placeholder="Ex: Agir comme un développeur Python expert."></textarea>
|
| 961 |
+
</div>
|
| 962 |
+
|
| 963 |
+
<button style="width: 100%; padding: 0.75rem; background: #007bff; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s;">
|
| 964 |
+
Sauvegarder les Paramètres
|
| 965 |
+
</button>
|
| 966 |
+
</div>
|
| 967 |
+
<button class="brand-toggle-btn" title="ErnestMind 2.5 - Revenir à l'accueil">ErnestMind 2.5</button>
|
| 968 |
+
<main class="chat-wrapper">
|
| 969 |
+
<div class="chat-header">
|
| 970 |
+
<div class="initial-welcome" id="initial-welcome-header">
|
| 971 |
+
<h1 class="chat-title" style="font-size: 2.2rem; margin-right: auto;">ErnestMind</h1>
|
| 972 |
+
</div>
|
| 973 |
+
<button id="ernest-plus-button" title="Abonnez-vous à ErnestMind Plus">
|
| 974 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="Plus Logo" class="plus-logo"> ErnestMind Plus
|
| 975 |
+
</button>
|
| 976 |
+
<button id="login-button" title="Connexion / Profil">
|
| 977 |
+
<span class="icon material-symbols-rounded">person</span>
|
| 978 |
+
</button>
|
| 979 |
+
</div>
|
| 980 |
+
<div class="chat-list">
|
| 981 |
+
<div id="initial-welcome" class="initial-welcome">
|
| 982 |
+
<h1 class="chat-title">ErnestMind</h1>
|
| 983 |
+
</div>
|
| 984 |
+
</div>
|
| 985 |
+
<div class="typing-area">
|
| 986 |
+
<form action="#" class="typing-form">
|
| 987 |
+
<div class="input-wrapper">
|
| 988 |
+
<div id="file-display-area" class="file-display-area">
|
| 989 |
+
</div>
|
| 990 |
+
<div class="input-controls">
|
| 991 |
+
<button class="file-upload-btn" type="button" title="Importer des fichiers (max. 10)">
|
| 992 |
+
<span class="icon material-symbols-rounded">add</span>
|
| 993 |
+
</button>
|
| 994 |
+
<input type="file" id="file-input" multiple style="display: none;">
|
| 995 |
+
<textarea rows="1" placeholder="Entrez un prompt ici" class="typing-input" required
|
| 996 |
+
maxlength="1000000"></textarea>
|
| 997 |
+
<span id="char-count" class="char-count">0 / 1000000</span>
|
| 998 |
+
<button id="send-btn" class="icon material-symbols-rounded send-button" type="submit"
|
| 999 |
+
title="Envoyer le message"> mic_none </button>
|
| 1000 |
+
</div>
|
| 1001 |
+
</div>
|
| 1002 |
+
<p id="file-error-message" style="display:none;">Vous pouvez importer un maximum de 10 fichiers.</p>
|
| 1003 |
+
<p class="disclaimer-text"> Veuillez vérifier les réponses. ErnestMind 2.5 peut être inexact. </p>
|
| 1004 |
+
</form>
|
| 1005 |
+
</div>
|
| 1006 |
+
</main>
|
| 1007 |
+
</div>
|
| 1008 |
+
|
| 1009 |
+
|
| 1010 |
+
|
| 1011 |
+
<script src="https://cdn.jsdelivr.net/npm/marked@12.0.2/lib/marked.umd.min.js"></script>
|
| 1012 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
| 1013 |
+
<script>
|
| 1014 |
+
// Références aux éléments du DOM
|
| 1015 |
+
const typingArea = document.querySelector(".typing-area");
|
| 1016 |
+
const typingForm = document.querySelector(".typing-form");
|
| 1017 |
+
const typingInput = document.querySelector(".typing-input");
|
| 1018 |
+
const chatList = document.querySelector(".chat-list");
|
| 1019 |
+
const sidebar = document.getElementById("sidebar");
|
| 1020 |
+
const sidebarToggleBtn = document.getElementById("sidebar-toggle-btn");
|
| 1021 |
+
const toggleThemeBtn = document.getElementById("toggle-theme-btn");
|
| 1022 |
+
const recentChatsList = document.getElementById("recent-chats-list");
|
| 1023 |
+
const initialWelcome = document.getElementById("initial-welcome");
|
| 1024 |
+
const initialWelcomeHeader = document.getElementById("initial-welcome-header");
|
| 1025 |
+
// NOUVEAU
|
| 1026 |
+
// NOUVEAUX ÉLÉMENTS
|
| 1027 |
+
const fileUploadBtn = document.querySelector(".file-upload-btn");
|
| 1028 |
+
const fileInput = document.getElementById("file-input");
|
| 1029 |
+
const loginButton = document.getElementById("login-button");
|
| 1030 |
+
// const loginSidebarBtn = document.getElementById("login-sidebar-btn"); // SUPPRIMÉ
|
| 1031 |
+
const brandToggleButton = document.querySelector(".brand-toggle-btn");
|
| 1032 |
+
const ernestPlusButton = document.getElementById("ernest-plus-button");
|
| 1033 |
+
const sendButton = document.getElementById("send-btn");
|
| 1034 |
+
// AJOUT DES NOUVEAUX ÉLÉMENTS
|
| 1035 |
+
const fileDisplayArea = document.getElementById("file-display-area");
|
| 1036 |
+
const fileErrorMessage = document.getElementById("file-error-message");
|
| 1037 |
+
const charCountSpan = document.getElementById("char-count");
|
| 1038 |
+
|
| 1039 |
+
// >>> NOUVELLES RÉFÉRENCES POUR LA CARTE DE PARAMÈTRES <<<
|
| 1040 |
+
const settingsCard = document.getElementById("settings-card");
|
| 1041 |
+
const settingsButton = document.getElementById("settings-button");
|
| 1042 |
+
// <<< FIN NOUVELLES RÉFÉRENCES <<<
|
| 1043 |
+
|
| 1044 |
+
// CHANGEMENT : MAX_TEXT_LENGTH de 200000 à 1000000
|
| 1045 |
+
const MAX_TEXT_LENGTH = 1000000;
|
| 1046 |
+
const MAX_FILES = 10;
|
| 1047 |
+
// Variables d'état
|
| 1048 |
+
let userMessage = null;
|
| 1049 |
+
let isResponseGenerating = false;
|
| 1050 |
+
const MAX_RECENT_CHATS = 5;
|
| 1051 |
+
// Stockage de la connexion EventSource active pour pouvoir l'arrêter
|
| 1052 |
+
let activeEventSource = null;
|
| 1053 |
+
// AJOUT: Stockage des fichiers sélectionnés
|
| 1054 |
+
let selectedFiles = [];
|
| 1055 |
+
|
| 1056 |
+
// Configuration de l'API (Remplacer par votre endpoint réel si nécessaire)
|
| 1057 |
+
const API_URL = "/generate";
|
| 1058 |
+
|
| 1059 |
+
|
| 1060 |
+
// --- GESTION DE LA CARTE DE PARAMÈTRES (SETTINGS CARD) ---
|
| 1061 |
+
|
| 1062 |
+
// 1. Ouvrir/Fermer la carte via le bouton dans le footer de la sidebar
|
| 1063 |
+
settingsButton.addEventListener('click', (e) => {
|
| 1064 |
+
e.stopPropagation(); // Empêche l'événement de se propager plus loin
|
| 1065 |
+
settingsCard.classList.toggle('open');
|
| 1066 |
+
});
|
| 1067 |
+
|
| 1068 |
+
// 2. Fermer la carte quand on clique n'importe où en dehors de la carte
|
| 1069 |
+
document.addEventListener('click', (e) => {
|
| 1070 |
+
// Si la carte de paramètres est ouverte
|
| 1071 |
+
if (settingsCard.classList.contains('open')) {
|
| 1072 |
+
// Et que le clic n'est PAS dans la carte ET n'est PAS dans le bouton des paramètres
|
| 1073 |
+
if (!settingsCard.contains(e.target) && e.target !== settingsButton && !settingsButton.contains(e.target)) {
|
| 1074 |
+
// Ferme la carte
|
| 1075 |
+
settingsCard.classList.remove('open');
|
| 1076 |
+
}
|
| 1077 |
+
}
|
| 1078 |
+
});
|
| 1079 |
+
|
| 1080 |
+
|
| 1081 |
+
/**
|
| 1082 |
+
* Fonctions utilitaires pour la Base de Données (Simulée avec localStorage)
|
| 1083 |
+
*/
|
| 1084 |
+
|
| 1085 |
+
// Met à jour l'icône du thème
|
| 1086 |
+
const updateThemeIcon = (isLightmode) => {
|
| 1087 |
+
const iconSpan = toggleThemeBtn.querySelector('.icon');
|
| 1088 |
+
if (iconSpan) {
|
| 1089 |
+
iconSpan.textContent = isLightmode ? "dark_mode" : "light_mode";
|
| 1090 |
+
}
|
| 1091 |
+
};
|
| 1092 |
+
|
| 1093 |
+
// Gère la transition de la zone de saisie
|
| 1094 |
+
const dockTypingArea = (shouldDock) => {
|
| 1095 |
+
if (shouldDock) {
|
| 1096 |
+
typingArea.classList.add('docked');
|
| 1097 |
+
// AJOUT: Mettre à jour le padding-bottom du chat-list
|
| 1098 |
+
chatList.classList.add('has-docked-area');
|
| 1099 |
+
// Masquer le titre au centre et afficher celui de l'en-tête
|
| 1100 |
+
if (initialWelcome) initialWelcome.style.display = 'none';
|
| 1101 |
+
if (initialWelcomeHeader) initialWelcomeHeader.style.display = 'flex';
|
| 1102 |
+
} else {
|
| 1103 |
+
typingArea.classList.remove('docked');
|
| 1104 |
+
// AJOUT: Retirer le padding-bottom du chat-list
|
| 1105 |
+
chatList.classList.remove('has-docked-area');
|
| 1106 |
+
// Afficher le titre au centre et masquer celui de l'en-tête
|
| 1107 |
+
if (initialWelcome) initialWelcome.style.display = 'flex';
|
| 1108 |
+
if (initialWelcomeHeader) initialWelcomeHeader.style.display = 'none';
|
| 1109 |
+
}
|
| 1110 |
+
}
|
| 1111 |
+
// Fonction pour le post-traitement de la réponse IA (Highlight et Bouton Copier)
|
| 1112 |
+
const postProcessAiResponse = (htmlContent) => {
|
| 1113 |
+
const tempDiv = document.createElement('div');
|
| 1114 |
+
tempDiv.innerHTML = htmlContent;
|
| 1115 |
+
|
| 1116 |
+
// Trouver tous les blocs <pre> et les préparer
|
| 1117 |
+
tempDiv.querySelectorAll('pre').forEach(preElement => {
|
| 1118 |
+
// 1. Appliquer la coloration syntaxique (Highlight.js)
|
| 1119 |
+
// highlightElement nécessite la balise <code>
|
| 1120 |
+
const codeElement = preElement.querySelector('code');
|
| 1121 |
+
if (codeElement) {
|
| 1122 |
+
hljs.highlightElement(codeElement);
|
| 1123 |
+
}
|
| 1124 |
+
|
| 1125 |
+
// 2. Créer le conteneur pour le positionnement relatif et les marges
|
| 1126 |
+
const container = document.createElement('div');
|
| 1127 |
+
container.classList.add('code-container');
|
| 1128 |
+
preElement.parentNode.insertBefore(container, preElement);
|
| 1129 |
+
container.appendChild(preElement); // Déplacer <pre> dans le nouveau conteneur
|
| 1130 |
+
|
| 1131 |
+
// 3. Ajouter le bouton de copie
|
| 1132 |
+
const copyBtn = document.createElement('button');
|
| 1133 |
+
copyBtn.classList.add('copy-code-btn');
|
| 1134 |
+
copyBtn.innerHTML = '<span class="material-symbols-rounded">content_copy</span>Copier';
|
| 1135 |
+
|
| 1136 |
+
// Stocker le code brut
|
| 1137 |
+
const codeText = preElement.querySelector('code').innerText;
|
| 1138 |
+
|
| 1139 |
+
// Utilisation d'une fonction anonyme pour passer les arguments (y compris l'élément)
|
| 1140 |
+
copyBtn.onclick = (e) => {
|
| 1141 |
+
e.preventDefault(); // Empêcher soumission de formulaire/autre
|
| 1142 |
+
copyCode(copyBtn, codeText);
|
| 1143 |
+
};
|
| 1144 |
+
|
| 1145 |
+
container.appendChild(copyBtn);
|
| 1146 |
+
});
|
| 1147 |
+
|
| 1148 |
+
return tempDiv.innerHTML;
|
| 1149 |
+
}
|
| 1150 |
+
|
| 1151 |
+
|
| 1152 |
+
// Charge les données de l'historique du chat et du thème
|
| 1153 |
+
const loadLocalstorageData = () => {
|
| 1154 |
+
// 1. Charger le Thème
|
| 1155 |
+
const isLightmode = (localStorage.getItem("themeColor") === "light_mode");
|
| 1156 |
+
document.body.classList.toggle("light_mode", isLightmode);
|
| 1157 |
+
updateThemeIcon(isLightmode); // Mettre à jour l'icône
|
| 1158 |
+
|
| 1159 |
+
// 2. Charger les Messages du Chat Actuel
|
| 1160 |
+
const savedChats = localStorage.getItem("currentChatMessages") || "[]";
|
| 1161 |
+
const messages = JSON.parse(savedChats);
|
| 1162 |
+
|
| 1163 |
+
if (messages.length > 0) {
|
| 1164 |
+
// S'il y a des messages, masquer le message de bienvenue initial
|
| 1165 |
+
if (initialWelcome) initialWelcome.style.display = 'none';
|
| 1166 |
+
if (initialWelcomeHeader) initialWelcomeHeader.style.display = 'flex'; // Afficher le titre d'en-tête
|
| 1167 |
+
|
| 1168 |
+
messages.forEach(message => {
|
| 1169 |
+
let content;
|
| 1170 |
+
// MODIFIÉ : Conversion du contenu IA de Markdown en HTML puis POST-TRAITEMENT
|
| 1171 |
+
if (message.type === 'ai') {
|
| 1172 |
+
const rawHTML = marked.parse(message.content, { breaks: true });
|
| 1173 |
+
content = postProcessAiResponse(rawHTML);
|
| 1174 |
+
} else {
|
| 1175 |
+
content = message.content;
|
| 1176 |
+
}
|
| 1177 |
+
|
| 1178 |
+
const messageElement = createChatMessageElement(message.type, content);
|
| 1179 |
+
chatList.appendChild(messageElement);
|
| 1180 |
+
});
|
| 1181 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1182 |
+
dockTypingArea(true); // Verrouiller la zone de saisie en bas si historique
|
| 1183 |
+
} else {
|
| 1184 |
+
// S'il n'y a pas de message, afficher le message de bienvenue
|
| 1185 |
+
if (initialWelcome) initialWelcome.style.display = 'flex';
|
| 1186 |
+
if (initialWelcomeHeader) initialWelcomeHeader.style.display = 'none'; // Masquer le titre d'en-tête
|
| 1187 |
+
dockTypingArea(false); // Laisser la zone de saisie centrée
|
| 1188 |
+
}
|
| 1189 |
+
|
| 1190 |
+
// 3. Charger les Chats Récents
|
| 1191 |
+
const recentChats = JSON.parse(localStorage.getItem("recentChats") || "[]");
|
| 1192 |
+
renderRecentChats(recentChats);
|
| 1193 |
+
|
| 1194 |
+
// 4. Initialiser le compteur de caractères et le bouton d'envoi
|
| 1195 |
+
updateCharCount();
|
| 1196 |
+
updateSendButtonIcon();
|
| 1197 |
+
}
|
| 1198 |
+
|
| 1199 |
+
// Sauvegarde un message
|
| 1200 |
+
const saveMessage = (type, content) => {
|
| 1201 |
+
const savedChats = localStorage.getItem("currentChatMessages") || "[]";
|
| 1202 |
+
const messages = JSON.parse(savedChats);
|
| 1203 |
+
messages.push({ type, content, timestamp: new Date().toISOString() });
|
| 1204 |
+
localStorage.setItem("currentChatMessages", JSON.stringify(messages));
|
| 1205 |
+
}
|
| 1206 |
+
|
| 1207 |
+
// Sauvegarde un nouveau chat dans l'historique
|
| 1208 |
+
const saveNewRecentChat = (title) => {
|
| 1209 |
+
let recentChats = JSON.parse(localStorage.getItem("recentChats") || "[]");
|
| 1210 |
+
const newChat = {
|
| 1211 |
+
id: Date.now(),
|
| 1212 |
+
title: title,
|
| 1213 |
+
timestamp: new Date().toISOString()
|
| 1214 |
+
};
|
| 1215 |
+
|
| 1216 |
+
// Ajouter le nouveau chat en haut
|
| 1217 |
+
recentChats.unshift(newChat);
|
| 1218 |
+
|
| 1219 |
+
// Limiter à MAX_RECENT_CHATS
|
| 1220 |
+
if (recentChats.length > MAX_RECENT_CHATS) {
|
| 1221 |
+
recentChats = recentChats.slice(0, MAX_RECENT_CHATS);
|
| 1222 |
+
}
|
| 1223 |
+
|
| 1224 |
+
localStorage.setItem("recentChats", JSON.stringify(recentChats));
|
| 1225 |
+
renderRecentChats(recentChats);
|
| 1226 |
+
}
|
| 1227 |
+
|
| 1228 |
+
// Rendu des chats récents
|
| 1229 |
+
const renderRecentChats = (chats) => {
|
| 1230 |
+
recentChatsList.innerHTML = '';
|
| 1231 |
+
if (chats.length === 0) {
|
| 1232 |
+
const emptyItem = document.createElement('li');
|
| 1233 |
+
emptyItem.classList.add('empty');
|
| 1234 |
+
emptyItem.innerHTML = `<span class="text" style="opacity:1;">Aucun chat récent</span>`;
|
| 1235 |
+
recentChatsList.appendChild(emptyItem);
|
| 1236 |
+
return;
|
| 1237 |
+
}
|
| 1238 |
+
|
| 1239 |
+
chats.forEach(chat => {
|
| 1240 |
+
const li = document.createElement('li');
|
| 1241 |
+
li.innerHTML = `
|
| 1242 |
+
<span class="icon material-symbols-rounded">chat</span>
|
| 1243 |
+
<span class="text">${chat.title}</span>
|
| 1244 |
+
`;
|
| 1245 |
+
recentChatsList.appendChild(li);
|
| 1246 |
+
});
|
| 1247 |
+
}
|
| 1248 |
+
|
| 1249 |
+
|
| 1250 |
+
// --- LOGIQUE DE CHAT ---
|
| 1251 |
+
|
| 1252 |
+
// Garde la référence au div de réponse IA en cours de construction
|
| 1253 |
+
let currentAiResponseDiv = null;
|
| 1254 |
+
|
| 1255 |
+
/**
|
| 1256 |
+
* Crée un élément de message (pour utilisateur ou IA).
|
| 1257 |
+
* @param {string} type - 'user' ou 'ai'.
|
| 1258 |
+
* @param {string} content - Le contenu du message. (Peut être HTML pour l'IA)
|
| 1259 |
+
* @returns {HTMLElement} L'élément HTML du message.
|
| 1260 |
+
*/
|
| 1261 |
+
const createChatMessageElement = (type, content) => {
|
| 1262 |
+
const chatDiv = document.createElement("div");
|
| 1263 |
+
chatDiv.classList.add("chat-message", type);
|
| 1264 |
+
const icon = type === "user" ? "person" : "psychology";
|
| 1265 |
+
|
| 1266 |
+
if (type === "user") {
|
| 1267 |
+
// Le style CSS applique la nouvelle couleur de fond uniforme
|
| 1268 |
+
const html = `<div class="text-content">${content}</div>`;
|
| 1269 |
+
chatDiv.innerHTML = html;
|
| 1270 |
+
} else {
|
| 1271 |
+
// Structure IA inchangée
|
| 1272 |
+
const html = `
|
| 1273 |
+
<span class="avatar material-symbols-rounded">${icon}</span>
|
| 1274 |
+
<div class="text-content">${content}</div>
|
| 1275 |
+
`;
|
| 1276 |
+
chatDiv.innerHTML = html;
|
| 1277 |
+
}
|
| 1278 |
+
|
| 1279 |
+
return chatDiv;
|
| 1280 |
+
}
|
| 1281 |
+
|
| 1282 |
+
// NOUVELLE FONCTION: Envoie le prompt et gère le streaming SSE avec EventSource
|
| 1283 |
+
const generateResponse = async (userText, files) => {
|
| 1284 |
+
if (isResponseGenerating) return;
|
| 1285 |
+
|
| 1286 |
+
// 1. Démarrer le chargement et créer le message IA vide
|
| 1287 |
+
isResponseGenerating = true;
|
| 1288 |
+
sendButton.textContent = "stop"; // CHANGER L'ICÔNE EN 'stop'
|
| 1289 |
+
sendButton.classList.add('active'); // Garder le bouton actif/stylisé pour 'stop'
|
| 1290 |
+
|
| 1291 |
+
// Créer le message de l'IA avec animation de "Raisonnement en cours..."
|
| 1292 |
+
const loadingHtml = '<div class="typing-animation"><div class="thought-animation"></div>Raisonnement en cours...</div>';
|
| 1293 |
+
currentAiResponseDiv = createChatMessageElement("ai", loadingHtml);
|
| 1294 |
+
chatList.appendChild(currentAiResponseDiv);
|
| 1295 |
+
|
| 1296 |
+
// Défilement forcé : doit avoir été fait dans handleOutgoingChat avant cet appel
|
| 1297 |
+
// chatList.scrollTo(0, chatList.scrollHeight);
|
| 1298 |
+
|
| 1299 |
+
// Variable pour stocker le texte généré par l'IA (en Markdown brut)
|
| 1300 |
+
let fullGeneratedText = "";
|
| 1301 |
+
|
| 1302 |
+
// --- MODIFICATION ICI : Préparation de la requête fetch (pour POST MULTIPART) ---
|
| 1303 |
+
const formData = new FormData();
|
| 1304 |
+
formData.append('prompt', userText);
|
| 1305 |
+
|
| 1306 |
+
// Ajouter les fichiers au FormData
|
| 1307 |
+
files.forEach((file) => {
|
| 1308 |
+
// 'file' doit correspondre au nom de champ attendu par l'API (ici, 'file')
|
| 1309 |
+
formData.append('file', file, file.name);
|
| 1310 |
+
});
|
| 1311 |
+
|
| 1312 |
+
const requestOptions = {
|
| 1313 |
+
method: 'POST',
|
| 1314 |
+
// NE PAS DÉFINIR Content-Type. fetch le fera automatiquement pour FormData.
|
| 1315 |
+
body: formData
|
| 1316 |
+
};
|
| 1317 |
+
|
| 1318 |
+
// Envoie la requête POST synchrone pour commencer le stream SSE sur le serveur
|
| 1319 |
+
try {
|
| 1320 |
+
const response = await fetch(API_URL, requestOptions);
|
| 1321 |
+
|
| 1322 |
+
if (!response.ok) {
|
| 1323 |
+
// Si l'appel POST échoue, cela signifie une erreur côté Flask (proxy)
|
| 1324 |
+
// Tenter de lire le JSON si possible, sinon utiliser le statut
|
| 1325 |
+
let errorDetails = `Erreur HTTP ${response.status} du proxy.`;
|
| 1326 |
+
try {
|
| 1327 |
+
const errorJson = await response.json();
|
| 1328 |
+
errorDetails = errorJson.error || errorDetails;
|
| 1329 |
+
} catch (e) {
|
| 1330 |
+
// Ignorer l'erreur de parsing si ce n'est pas du JSON
|
| 1331 |
+
}
|
| 1332 |
+
throw new Error(errorDetails);
|
| 1333 |
+
}
|
| 1334 |
+
|
| 1335 |
+
// IMPORTANT: L'EventSource ne fonctionne pas directement avec une requête POST.
|
| 1336 |
+
// Nous devons passer par un ReadableStream et le décoder manuellement.
|
| 1337 |
+
|
| 1338 |
+
const reader = response.body.getReader();
|
| 1339 |
+
const decoder = new TextDecoder("utf-8");
|
| 1340 |
+
let buffer = "";
|
| 1341 |
+
|
| 1342 |
+
// Retirer l'animation de chargement et préparer la zone de texte
|
| 1343 |
+
const textContentDiv = currentAiResponseDiv.querySelector('.text-content');
|
| 1344 |
+
textContentDiv.innerHTML = ''; // Vider le contenu du chargement
|
| 1345 |
+
|
| 1346 |
+
while(true) {
|
| 1347 |
+
const { value, done } = await reader.read();
|
| 1348 |
+
if (done) break;
|
| 1349 |
+
|
| 1350 |
+
// Ajouter le nouveau morceau de données au buffer
|
| 1351 |
+
buffer += decoder.decode(value, { stream: true });
|
| 1352 |
+
|
| 1353 |
+
// Traiter les événements SSE
|
| 1354 |
+
let events = buffer.split('\n\n');
|
| 1355 |
+
buffer = events.pop(); // Garder l'événement incomplet dans le buffer
|
| 1356 |
+
|
| 1357 |
+
events.forEach(eventStr => {
|
| 1358 |
+
if (!eventStr) return;
|
| 1359 |
+
|
| 1360 |
+
let eventType = null;
|
| 1361 |
+
let eventData = null;
|
| 1362 |
+
|
| 1363 |
+
// Parse les lignes de l'événement (data: ..., event: ...)
|
| 1364 |
+
eventStr.split('\n').forEach(line => {
|
| 1365 |
+
if (line.startsWith('event: ')) {
|
| 1366 |
+
eventType = line.substring(7).trim();
|
| 1367 |
+
} else if (line.startsWith('data: ')) {
|
| 1368 |
+
eventData = line.substring(6).trim();
|
| 1369 |
+
}
|
| 1370 |
+
});
|
| 1371 |
+
|
| 1372 |
+
if (eventType === 'token' && eventData) {
|
| 1373 |
+
try {
|
| 1374 |
+
const data = JSON.parse(eventData);
|
| 1375 |
+
const token = data.text;
|
| 1376 |
+
|
| 1377 |
+
if (token) {
|
| 1378 |
+
// 1. CONCATÉNER le nouveau token au texte complet (Markdown)
|
| 1379 |
+
fullGeneratedText += token;
|
| 1380 |
+
|
| 1381 |
+
// 2. CONVERTIR le texte complet actuel de Markdown en HTML
|
| 1382 |
+
const renderedHTML = marked.parse(fullGeneratedText, { breaks: true });
|
| 1383 |
+
|
| 1384 |
+
// 3. POST-TRAITEMENT : Ajouter le bouton Copier et appliquer Highlight.js
|
| 1385 |
+
const processedHTML = postProcessAiResponse(renderedHTML);
|
| 1386 |
+
|
| 1387 |
+
// 4. REMPLACER le contenu de la div avec le nouveau HTML converti et manipulé
|
| 1388 |
+
textContentDiv.innerHTML = processedHTML;
|
| 1389 |
+
|
| 1390 |
+
// 5. Défilement forcé pour que le nouveau texte soit visible
|
| 1391 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1392 |
+
}
|
| 1393 |
+
} catch (e) {
|
| 1394 |
+
console.error("Erreur de parsing JSON pour le token:", e);
|
| 1395 |
+
}
|
| 1396 |
+
} else if (eventType === 'end') {
|
| 1397 |
+
// C'est la fin du stream, on sort de la boucle principale
|
| 1398 |
+
reader.cancel();
|
| 1399 |
+
}
|
| 1400 |
+
});
|
| 1401 |
+
}
|
| 1402 |
+
|
| 1403 |
+
// 4. Sauvegarder la réponse complète de l'IA (le texte brut en Markdown)
|
| 1404 |
+
// Note : On sauvegarde le brut Markdown, pas le HTML traité.
|
| 1405 |
+
saveMessage("ai", fullGeneratedText);
|
| 1406 |
+
|
| 1407 |
+
// 5. Sauvegarder dans l'historique récent (seulement pour la première paire de messages)
|
| 1408 |
+
const totalMessages = chatList.querySelectorAll('.chat-message').length;
|
| 1409 |
+
if (totalMessages === 2) {
|
| 1410 |
+
// Ajoute un préfixe si des fichiers sont inclus
|
| 1411 |
+
let chatTitle = userText;
|
| 1412 |
+
if (files.length > 0) {
|
| 1413 |
+
chatTitle = `[${files.length} Fichiers] ` + chatTitle;
|
| 1414 |
+
}
|
| 1415 |
+
saveNewRecentChat(chatTitle.substring(0, 30) + (chatTitle.length > 30 ? "..." : ""));
|
| 1416 |
+
}
|
| 1417 |
+
|
| 1418 |
+
} catch (error) {
|
| 1419 |
+
console.error("Erreur lors de la génération de la réponse:", error);
|
| 1420 |
+
|
| 1421 |
+
let errorMessage = `Désolé, une erreur est survenue lors de la connexion à l'IA : ${error.message}.`;
|
| 1422 |
+
|
| 1423 |
+
// Assurez-vous que l'élément de chargement existe avant de tenter de le modifier/supprimer
|
| 1424 |
+
const textContentDiv = currentAiResponseDiv ? currentAiResponseDiv.querySelector('.text-content') : null;
|
| 1425 |
+
|
| 1426 |
+
if (textContentDiv) {
|
| 1427 |
+
textContentDiv.innerHTML = `<div style="color:red;">${errorMessage}</div>`;
|
| 1428 |
+
} else {
|
| 1429 |
+
// Si le message n'a pas pu être créé (cas rare), ajouter un nouveau message d'erreur
|
| 1430 |
+
const errorDiv = createChatMessageElement("ai", `<div style="color:red;">${errorMessage}</div>`);
|
| 1431 |
+
chatList.appendChild(errorDiv);
|
| 1432 |
+
}
|
| 1433 |
+
|
| 1434 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1435 |
+
|
| 1436 |
+
} finally {
|
| 1437 |
+
isResponseGenerating = false;
|
| 1438 |
+
sendButton.textContent = "send"; // REMETTRE L'ICÔNE EN 'send'
|
| 1439 |
+
sendButton.classList.remove('active'); // Enlever la classe active
|
| 1440 |
+
updateSendButtonIcon(); // Rétablit l'icône appropriée (micro ou send)
|
| 1441 |
+
currentAiResponseDiv = null;
|
| 1442 |
+
}
|
| 1443 |
+
}
|
| 1444 |
+
|
| 1445 |
+
|
| 1446 |
+
/**
|
| 1447 |
+
* Copie le code dans le presse-papiers et met à jour le bouton.
|
| 1448 |
+
* @param {HTMLElement} btn - Le bouton de copie.
|
| 1449 |
+
* @param {string} code - Le texte à copier.
|
| 1450 |
+
*/
|
| 1451 |
+
const copyCode = (btn, code) => {
|
| 1452 |
+
if (navigator.clipboard) {
|
| 1453 |
+
navigator.clipboard.writeText(code).then(() => {
|
| 1454 |
+
// Mettre à jour le texte du bouton après la copie
|
| 1455 |
+
const originalText = btn.innerHTML;
|
| 1456 |
+
btn.innerHTML = '<span class="material-symbols-rounded">done</span>Copié!';
|
| 1457 |
+
setTimeout(() => {
|
| 1458 |
+
btn.innerHTML = originalText;
|
| 1459 |
+
}, 2000);
|
| 1460 |
+
}).catch(err => {
|
| 1461 |
+
console.error('Erreur lors de la copie: ', err);
|
| 1462 |
+
});
|
| 1463 |
+
} else {
|
| 1464 |
+
alert("Votre navigateur ne supporte pas l'API Clipboard.");
|
| 1465 |
+
}
|
| 1466 |
+
};
|
| 1467 |
+
|
| 1468 |
+
// --- NOUVELLE LOGIQUE POUR LA GESTION DES FICHIERS ---
|
| 1469 |
+
|
| 1470 |
+
/**
|
| 1471 |
+
* Met à jour l'affichage des badges de fichiers dans la zone de saisie.
|
| 1472 |
+
*/
|
| 1473 |
+
const renderFileBadges = () => {
|
| 1474 |
+
fileDisplayArea.innerHTML = ''; // Nettoyer l'affichage
|
| 1475 |
+
|
| 1476 |
+
if (selectedFiles.length === 0) {
|
| 1477 |
+
fileDisplayArea.style.display = 'none';
|
| 1478 |
+
} else {
|
| 1479 |
+
fileDisplayArea.style.display = 'flex';
|
| 1480 |
+
}
|
| 1481 |
+
|
| 1482 |
+
selectedFiles.forEach((file, index) => {
|
| 1483 |
+
const badge = document.createElement('div');
|
| 1484 |
+
badge.classList.add('file-badge');
|
| 1485 |
+
|
| 1486 |
+
// Afficher le nom tronqué et la taille (optionnel)
|
| 1487 |
+
const displayName = file.name.length > 20 ? file.name.substring(0, 17) + '...' : file.name;
|
| 1488 |
+
|
| 1489 |
+
badge.innerHTML = `
|
| 1490 |
+
<span>${displayName}</span>
|
| 1491 |
+
<button class="delete-file-btn" data-index="${index}" title="Supprimer le fichier">
|
| 1492 |
+
<span class="material-symbols-rounded">close</span>
|
| 1493 |
+
</button>
|
| 1494 |
+
`;
|
| 1495 |
+
|
| 1496 |
+
fileDisplayArea.appendChild(badge);
|
| 1497 |
+
});
|
| 1498 |
+
|
| 1499 |
+
// Ajouter l'écouteur pour la suppression
|
| 1500 |
+
fileDisplayArea.querySelectorAll('.delete-file-btn').forEach(btn => {
|
| 1501 |
+
btn.addEventListener('click', (e) => {
|
| 1502 |
+
e.stopPropagation();
|
| 1503 |
+
const indexToDelete = parseInt(e.currentTarget.getAttribute('data-index'));
|
| 1504 |
+
// Supprimer du tableau et rafraîchir
|
| 1505 |
+
selectedFiles.splice(indexToDelete, 1);
|
| 1506 |
+
// Réinitialiser le fileInput pour permettre la sélection du fichier supprimé à nouveau (si on utilisait un vrai FileList)
|
| 1507 |
+
fileInput.value = '';
|
| 1508 |
+
renderFileBadges();
|
| 1509 |
+
updateSendButtonIcon(); // Mettre à jour l'icône si des fichiers sont supprimés
|
| 1510 |
+
});
|
| 1511 |
+
});
|
| 1512 |
+
|
| 1513 |
+
// Mise à jour de l'icône d'envoi lorsque l'état des fichiers change
|
| 1514 |
+
updateSendButtonIcon();
|
| 1515 |
+
};
|
| 1516 |
+
|
| 1517 |
+
// --- NOUVELLE LOGIQUE POUR LA LIMITE DE CARACTÈRES ---
|
| 1518 |
+
|
| 1519 |
+
/**
|
| 1520 |
+
* Met à jour le compteur de caractères.
|
| 1521 |
+
*/
|
| 1522 |
+
const updateCharCount = () => {
|
| 1523 |
+
const currentLength = typingInput.value.length;
|
| 1524 |
+
charCountSpan.textContent = `${currentLength} / ${MAX_TEXT_LENGTH}`;
|
| 1525 |
+
|
| 1526 |
+
if (currentLength > MAX_TEXT_LENGTH) {
|
| 1527 |
+
charCountSpan.classList.add('error');
|
| 1528 |
+
} else {
|
| 1529 |
+
charCountSpan.classList.remove('error');
|
| 1530 |
+
}
|
| 1531 |
+
};
|
| 1532 |
+
|
| 1533 |
+
// --- NOUVELLE LOGIQUE POUR L'ICÔNE DU BOUTON D'ENVOI ---
|
| 1534 |
+
|
| 1535 |
+
/**
|
| 1536 |
+
* Change l'icône du bouton d'envoi en fonction du contenu du texte ou de la présence de fichiers.
|
| 1537 |
+
* - 'mic_none' si le texte est vide ET aucun fichier sélectionné.
|
| 1538 |
+
* - 'send' si du texte est présent OU des fichiers sont sélectionnés.
|
| 1539 |
+
*/
|
| 1540 |
+
const updateSendButtonIcon = () => {
|
| 1541 |
+
if (isResponseGenerating) {
|
| 1542 |
+
// Si la réponse est en cours, on ne touche pas à l'icône 'stop'
|
| 1543 |
+
return;
|
| 1544 |
+
}
|
| 1545 |
+
|
| 1546 |
+
const hasText = typingInput.value.trim().length > 0;
|
| 1547 |
+
const hasFiles = selectedFiles.length > 0;
|
| 1548 |
+
|
| 1549 |
+
if (hasText || hasFiles) {
|
| 1550 |
+
sendButton.textContent = "send";
|
| 1551 |
+
sendButton.classList.add('active'); // Activer le style
|
| 1552 |
+
} else {
|
| 1553 |
+
sendButton.textContent = "mic_none";
|
| 1554 |
+
sendButton.classList.remove('active'); // Retirer le style
|
| 1555 |
+
}
|
| 1556 |
+
};
|
| 1557 |
+
|
| 1558 |
+
|
| 1559 |
+
/**
|
| 1560 |
+
* Gère l'envoi du message utilisateur.
|
| 1561 |
+
*/
|
| 1562 |
+
const handleOutgoingChat = () => {
|
| 1563 |
+
if (isResponseGenerating) return; // Empêcher l'envoi pendant la génération
|
| 1564 |
+
|
| 1565 |
+
userMessage = typingInput.value.trim();
|
| 1566 |
+
|
| 1567 |
+
// Vérifier la limite de caractères
|
| 1568 |
+
if (userMessage.length > MAX_TEXT_LENGTH) {
|
| 1569 |
+
alert(`Erreur: Le texte saisi dépasse la limite de ${MAX_TEXT_LENGTH} caractères.`);
|
| 1570 |
+
return;
|
| 1571 |
+
}
|
| 1572 |
+
|
| 1573 |
+
if (!userMessage && selectedFiles.length === 0) {
|
| 1574 |
+
// Si c'est vide (et l'icône est 'mic_none'), on peut déclencher l'enregistrement vocal (non implémenté)
|
| 1575 |
+
console.log("Tentative d'enregistrement vocal (non implémenté)");
|
| 1576 |
+
return;
|
| 1577 |
+
}
|
| 1578 |
+
|
| 1579 |
+
|
| 1580 |
+
// 2. Ancrer la zone de saisie en bas dès le premier message
|
| 1581 |
+
dockTypingArea(true);
|
| 1582 |
+
|
| 1583 |
+
// Masquer le message de bienvenue initial (maintenant fait dans dockTypingArea)
|
| 1584 |
+
// if (initialWelcome) initialWelcome.style.display = 'none';
|
| 1585 |
+
|
| 1586 |
+
// 1. Préparer le contenu du message utilisateur
|
| 1587 |
+
let contentForDisplay = userMessage;
|
| 1588 |
+
if (selectedFiles.length > 0) {
|
| 1589 |
+
const fileListHtml = selectedFiles.map(f => `<span style="font-size:0.9em; display:block; color:#007bff;">[Fichier: ${f.name}]</span>`).join('');
|
| 1590 |
+
contentForDisplay = fileListHtml + (userMessage ? `<br><br>${userMessage}` : '');
|
| 1591 |
+
}
|
| 1592 |
+
|
| 1593 |
+
|
| 1594 |
+
// 2. Afficher le message de l'utilisateur
|
| 1595 |
+
const userDiv = createChatMessageElement("user", contentForDisplay);
|
| 1596 |
+
chatList.appendChild(userDiv);
|
| 1597 |
+
|
| 1598 |
+
// NOUVEAU: Défilement forcé pour que le nouveau message (et la réponse IA) soit affiché en haut de la fenêtre.
|
| 1599 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1600 |
+
|
| 1601 |
+
// 3. Sauvegarder le message
|
| 1602 |
+
saveMessage("user", contentForDisplay); // Sauvegarde le HTML de l'utilisateur pour l'historique local
|
| 1603 |
+
|
| 1604 |
+
// 4. Obtenir la réponse de l'IA (passe le texte et les fichiers)
|
| 1605 |
+
generateResponse(userMessage, selectedFiles);
|
| 1606 |
+
|
| 1607 |
+
// 5. Nettoyer l'entrée et l'état des fichiers
|
| 1608 |
+
typingInput.value = "";
|
| 1609 |
+
typingInput.style.height = 'auto'; // Réinitialiser la hauteur
|
| 1610 |
+
selectedFiles = []; // Vider le tableau des fichiers
|
| 1611 |
+
renderFileBadges(); // Nettoyer l'affichage des badges
|
| 1612 |
+
updateCharCount(); // Réinitialiser le compteur
|
| 1613 |
+
updateSendButtonIcon(); // Rétablit l'icône à 'mic_none'
|
| 1614 |
+
typingInput.focus();
|
| 1615 |
+
}
|
| 1616 |
+
|
| 1617 |
+
// Fonction pour gérer la navigation vers Connexion/Profil (utilisée par les deux boutons)
|
| 1618 |
+
const handleLoginNavigation = () => {
|
| 1619 |
+
console.log("Naviguer vers la page de Connexion / Profil...");
|
| 1620 |
+
alert("Fonctionnalité de Connexion / Profil (non implémentée)");
|
| 1621 |
+
}
|
| 1622 |
+
|
| 1623 |
+
// Fonction pour gérer la navigation vers la page principale (utilisée par le bouton de marque)
|
| 1624 |
+
const handleBrandNavigation = () => {
|
| 1625 |
+
console.log("Naviguer vers la page d'accueil...");
|
| 1626 |
+
alert("Fonctionnalité de navigation Accueil (non implémentée)");
|
| 1627 |
+
}
|
| 1628 |
+
|
| 1629 |
+
// Fonction pour gérer le bouton Ernest Plus
|
| 1630 |
+
const handleErnestPlusNavigation = () => {
|
| 1631 |
+
console.log("Naviguer vers la page ErnestMind Plus...");
|
| 1632 |
+
alert("Fonctionnalité d'abonnement ErnestMind Plus (non implémentée)");
|
| 1633 |
+
}
|
| 1634 |
+
|
| 1635 |
+
|
| 1636 |
+
// --- GESTION DES ÉVÉNEMENTS ---
|
| 1637 |
+
|
| 1638 |
+
// Événement de soumission du formulaire
|
| 1639 |
+
typingForm.addEventListener("submit", (e) => {
|
| 1640 |
+
e.preventDefault();
|
| 1641 |
+
|
| 1642 |
+
// Logique pour le bouton 'stop'
|
| 1643 |
+
if (isResponseGenerating) {
|
| 1644 |
+
// Pour EventSource, vous devez le fermer
|
| 1645 |
+
if (activeEventSource) {
|
| 1646 |
+
activeEventSource.close();
|
| 1647 |
+
activeEventSource = null;
|
| 1648 |
+
}
|
| 1649 |
+
// Réinitialiser l'état (pour cette simulation simple)
|
| 1650 |
+
console.log("Arrêt de la génération de réponse...");
|
| 1651 |
+
isResponseGenerating = false;
|
| 1652 |
+
sendButton.textContent = "send";
|
| 1653 |
+
sendButton.classList.remove('active');
|
| 1654 |
+
// Retirer l'animation de chargement si elle existe et remplacer par un message
|
| 1655 |
+
if (currentAiResponseDiv) {
|
| 1656 |
+
const textContentDiv = currentAiResponseDiv.querySelector('.text-content');
|
| 1657 |
+
// On ne supprime pas le message, on le laisse tel quel et on ajoute un indicateur
|
| 1658 |
+
if (textContentDiv && textContentDiv.querySelector('.typing-animation')) {
|
| 1659 |
+
// On met à jour l'affichage avec le HTML déjà converti
|
| 1660 |
+
// NOTE: fullGeneratedText n'est pas accessible ici facilement sans un changement
|
| 1661 |
+
// On va simplement afficher un message d'arrêt.
|
| 1662 |
+
textContentDiv.innerHTML = 'Génération arrêtée. Veuillez soumettre une nouvelle requête.';
|
| 1663 |
+
}
|
| 1664 |
+
}
|
| 1665 |
+
currentAiResponseDiv = null;
|
| 1666 |
+
updateSendButtonIcon(); // Rétablit l'icône appropriée (micro ou send)
|
| 1667 |
+
} else {
|
| 1668 |
+
handleOutgoingChat();
|
| 1669 |
+
}
|
| 1670 |
+
});
|
| 1671 |
+
|
| 1672 |
+
// Auto-redimensionnement du textarea
|
| 1673 |
+
typingInput.addEventListener("input", () => {
|
| 1674 |
+
typingInput.style.height = 'auto';
|
| 1675 |
+
typingInput.style.height = typingInput.scrollHeight + 'px';
|
| 1676 |
+
updateCharCount(); // Mettre à jour le compteur à chaque saisie
|
| 1677 |
+
updateSendButtonIcon(); // Mettre à jour l'icône d'envoi
|
| 1678 |
+
});
|
| 1679 |
+
|
| 1680 |
+
// Gestion du bouton 'Nouveau Chat'
|
| 1681 |
+
document.querySelector(".new-chat").addEventListener("click", () => {
|
| 1682 |
+
// S'assurer d'arrêter le stream si on clique sur Nouveau Chat
|
| 1683 |
+
if (activeEventSource) {
|
| 1684 |
+
activeEventSource.close();
|
| 1685 |
+
activeEventSource = null;
|
| 1686 |
+
}
|
| 1687 |
+
isResponseGenerating = false;
|
| 1688 |
+
sendButton.textContent = "send";
|
| 1689 |
+
|
| 1690 |
+
localStorage.removeItem("currentChatMessages"); // Efface la discussion en cours
|
| 1691 |
+
chatList.innerHTML = ''; // Nettoyer l'affichage
|
| 1692 |
+
|
| 1693 |
+
// Nettoyer l'état des fichiers
|
| 1694 |
+
selectedFiles = [];
|
| 1695 |
+
renderFileBadges();
|
| 1696 |
+
typingInput.value = "";
|
| 1697 |
+
typingInput.style.height = 'auto';
|
| 1698 |
+
updateCharCount();
|
| 1699 |
+
|
| 1700 |
+
// 2. Annuler l'ancrage de la zone de saisie pour la centrer
|
| 1701 |
+
dockTypingArea(false);
|
| 1702 |
+
|
| 1703 |
+
// Recharger les chats récents (qui affichera "Aucun chat récent")
|
| 1704 |
+
const recentChats = JSON.parse(localStorage.getItem("recentChats") || "[]");
|
| 1705 |
+
renderRecentChats(recentChats);
|
| 1706 |
+
|
| 1707 |
+
updateSendButtonIcon(); // Rétablit l'icône à 'mic_none'
|
| 1708 |
+
});
|
| 1709 |
+
|
| 1710 |
+
|
| 1711 |
+
// Gestion du changement de thème
|
| 1712 |
+
toggleThemeBtn.addEventListener("click", () => {
|
| 1713 |
+
document.body.classList.toggle("light_mode");
|
| 1714 |
+
const isLightmode = document.body.classList.contains("light_mode");
|
| 1715 |
+
localStorage.setItem("themeColor", isLightmode ? "light_mode" : "dark_mode");
|
| 1716 |
+
updateThemeIcon(isLightmode); // Mettre à jour l'icône
|
| 1717 |
+
});
|
| 1718 |
+
|
| 1719 |
+
// Gestion du clic sur le bouton de connexion/profil (en-tête du chat)
|
| 1720 |
+
loginButton.addEventListener('click', handleLoginNavigation);
|
| 1721 |
+
|
| 1722 |
+
// Gestion du clic sur le NOUVEAU bouton de marque
|
| 1723 |
+
brandToggleButton.addEventListener('click', handleBrandNavigation);
|
| 1724 |
+
|
| 1725 |
+
// Gestion du clic sur le NOUVEAU bouton Ernest Plus
|
| 1726 |
+
ernestPlusButton.addEventListener('click', handleErnestPlusNavigation);
|
| 1727 |
+
|
| 1728 |
+
// Gestion du clic sur le bouton d'importation de fichiers (+)
|
| 1729 |
+
fileUploadBtn.addEventListener('click', () => {
|
| 1730 |
+
fileInput.click(); // Ouvre la fenêtre de sélection de fichiers
|
| 1731 |
+
});
|
| 1732 |
+
|
| 1733 |
+
// Gestion de la sélection de fichiers (Mise à jour pour la limite de 10)
|
| 1734 |
+
fileInput.addEventListener('change', (event) => {
|
| 1735 |
+
const files = Array.from(event.target.files);
|
| 1736 |
+
|
| 1737 |
+
// Vider le tableau des fichiers si une nouvelle sélection a lieu
|
| 1738 |
+
selectedFiles = [];
|
| 1739 |
+
fileErrorMessage.style.display = 'none';
|
| 1740 |
+
|
| 1741 |
+
if (files.length > 0) {
|
| 1742 |
+
if (files.length > MAX_FILES) {
|
| 1743 |
+
fileErrorMessage.style.display = 'block';
|
| 1744 |
+
// Ne prendre que les 10 premiers
|
| 1745 |
+
selectedFiles = files.slice(0, MAX_FILES);
|
| 1746 |
+
// L'input doit être vidé pour permettre de resélectionner le même fichier si l'utilisateur annule plus tard
|
| 1747 |
+
fileInput.value = '';
|
| 1748 |
+
} else {
|
| 1749 |
+
selectedFiles = files;
|
| 1750 |
+
}
|
| 1751 |
+
|
| 1752 |
+
renderFileBadges();
|
| 1753 |
+
}
|
| 1754 |
+
});
|
| 1755 |
+
|
| 1756 |
+
|
| 1757 |
+
// --- LOGIQUE DYNAMIQUE DE LA BARRE LATÉRALE ---
|
| 1758 |
+
|
| 1759 |
+
|
| 1760 |
+
// A) Ouvrir la sidebar au survol de la zone de la sidebar
|
| 1761 |
+
sidebar.addEventListener('mouseenter', () => {
|
| 1762 |
+
// Uniquement sur desktop
|
| 1763 |
+
if (window.innerWidth > 768) {
|
| 1764 |
+
sidebar.classList.add('open');
|
| 1765 |
+
}
|
| 1766 |
+
});
|
| 1767 |
+
|
| 1768 |
+
// B) Fermer la sidebar quand la souris quitte la zone
|
| 1769 |
+
sidebar.addEventListener('mouseleave', () => {
|
| 1770 |
+
// Uniquement sur desktop
|
| 1771 |
+
if (window.innerWidth > 768) {
|
| 1772 |
+
sidebar.classList.remove('open');
|
| 1773 |
+
}
|
| 1774 |
+
});
|
| 1775 |
+
|
| 1776 |
+
// C) Bouton Menu pour ouvrir/fermer (pour mobile/accessibilité)
|
| 1777 |
+
sidebarToggleBtn.addEventListener('click', (e) => {
|
| 1778 |
+
e.stopPropagation(); // Empêche la fermeture immédiate
|
| 1779 |
+
sidebar.classList.toggle('open');
|
| 1780 |
+
});
|
| 1781 |
+
|
| 1782 |
+
// D) Fermer la sidebar quand on clique n'importe où ailleurs (pour mobile/touch)
|
| 1783 |
+
document.addEventListener('click', (e) => {
|
| 1784 |
+
// Si la sidebar est ouverte ET que le clic n'est PAS dans la sidebar
|
| 1785 |
+
if (sidebar.classList.contains('open') && !sidebar.contains(e.target)) {
|
| 1786 |
+
// Ferme la sidebar seulement si l'écran est petit (comportement mobile)
|
| 1787 |
+
if (window.innerWidth <= 768) {
|
| 1788 |
+
sidebar.classList.remove('open');
|
| 1789 |
+
}
|
| 1790 |
+
}
|
| 1791 |
+
});
|
| 1792 |
+
|
| 1793 |
+
|
| 1794 |
+
// --- INITIALISATION ---
|
| 1795 |
+
window.onload = loadLocalstorageData;
|
| 1796 |
+
</script>
|
| 1797 |
+
</body>
|
| 1798 |
+
|
| 1799 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/checkout.html
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr" class="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<link rel="icon" type="image/png" href="https://i.imgur.com/7Gn3toV.png">
|
| 7 |
+
<title>Paiement - GitForge</title>
|
| 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 |
+
<script src="https://js.stripe.com/v3/"></script>
|
| 12 |
+
<style>
|
| 13 |
+
/* Variables de Thème - Couleurs Noir Foncé (Mode Sombre par défaut) */
|
| 14 |
+
:root, html.dark {
|
| 15 |
+
--bg-page: #181818; /* Noir très foncé, pas de bleu marine */
|
| 16 |
+
--bg-card: #282828;
|
| 17 |
+
--text-main: #EAEAEA;
|
| 18 |
+
--text-secondary: #B0B0B0;
|
| 19 |
+
--border-color: #404040;
|
| 20 |
+
--shadow-color: rgba(0, 0, 0, 0.5);
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
/* Mode Clair */
|
| 24 |
+
html.light {
|
| 25 |
+
--bg-page: #F5F5F5;
|
| 26 |
+
--bg-card: #FFFFFF;
|
| 27 |
+
--text-main: #202020;
|
| 28 |
+
--text-secondary: #5C5C5C;
|
| 29 |
+
--border-color: #E0E0E0;
|
| 30 |
+
--shadow-color: rgba(0, 0, 0, 0.1);
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
/* Application des variables */
|
| 34 |
+
body {
|
| 35 |
+
background-color: var(--bg-page);
|
| 36 |
+
color: var(--text-main);
|
| 37 |
+
transition: background-color 0.3s, color 0.3s;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.bg-gray-900 { background-color: var(--bg-page) !important; }
|
| 41 |
+
.text-white { color: var(--text-main) !important; }
|
| 42 |
+
.bg-gray-800, .bg-gray-800\/50 {
|
| 43 |
+
background-color: var(--bg-card) !important;
|
| 44 |
+
box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
|
| 45 |
+
}
|
| 46 |
+
.text-gray-400 { color: var(--text-secondary) !important; }
|
| 47 |
+
.border-gray-700, .border-gray-800 { border-color: var(--border-color) !important; }
|
| 48 |
+
.text-gray-300 { color: var(--text-secondary) !important; } /* Utilisation de la même couleur pour uniformité */
|
| 49 |
+
.bg-gray-700 { background-color: #404040 !important; }
|
| 50 |
+
.theme-switch {
|
| 51 |
+
background: none;
|
| 52 |
+
border: none;
|
| 53 |
+
cursor: pointer;
|
| 54 |
+
color: var(--text-main);
|
| 55 |
+
font-size: 24px;
|
| 56 |
+
transition: color 0.2s;
|
| 57 |
+
padding: 0.5rem; /* Espace autour du bouton */
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
/* Style pour l'élément Stripe Elements (input) */
|
| 61 |
+
#card-element {
|
| 62 |
+
padding: 1rem;
|
| 63 |
+
border: 1px solid var(--border-color);
|
| 64 |
+
background-color: var(--bg-card);
|
| 65 |
+
border-radius: 0.5rem;
|
| 66 |
+
margin-bottom: 1rem;
|
| 67 |
+
color: var(--text-main); /* Assurez-vous que le texte par défaut est lisible */
|
| 68 |
+
}
|
| 69 |
+
</style>
|
| 70 |
+
</head>
|
| 71 |
+
<body class="min-h-screen">
|
| 72 |
+
|
| 73 |
+
<div class="container mx-auto p-4 sm:p-6 lg:p-8 max-w-7xl">
|
| 74 |
+
|
| 75 |
+
<header class="sticky top-0 z-50 flex flex-col sm:flex-row justify-between items-center py-4 border-b border-blue-500/50 mb-8 bg-gray-900" style="background-color: var(--bg-page); transition: background-color 0.3s;">
|
| 76 |
+
<a href="/" class="text-4xl font-extrabold text-blue-500 tracking-wider mb-4 sm:mb-0">
|
| 77 |
+
GitForge
|
| 78 |
+
</a>
|
| 79 |
+
<nav class="flex items-center space-x-4">
|
| 80 |
+
<a href="/mindus/nexus/documentation" class="px-4 py-2 text-white hover:text-blue-300 transition duration-200 font-medium">
|
| 81 |
+
Documentation
|
| 82 |
+
</a>
|
| 83 |
+
<a href="/mindus/nexus/a-propos" class="px-4 py-2 text-white hover:text-blue-300 transition duration-200 font-medium">
|
| 84 |
+
À Propos
|
| 85 |
+
</a>
|
| 86 |
+
|
| 87 |
+
<button id="theme-toggle" class="theme-switch" aria-label="Basculer le thème">
|
| 88 |
+
<span class="material-symbols-rounded">light_mode</span>
|
| 89 |
+
</button>
|
| 90 |
+
|
| 91 |
+
{% if is_logged_in %}
|
| 92 |
+
<a href="/mindus/nexus/dashboard" class="px-4 py-2 bg-blue-600 border border-blue-600 hover:bg-blue-700 font-medium transition duration-200">
|
| 93 |
+
Dashboard
|
| 94 |
+
</a>
|
| 95 |
+
{% else %}
|
| 96 |
+
<a href="/mindus/nexus/connexion" class="px-4 py-2 bg-blue-600 border border-blue-600 hover:bg-blue-700 font-medium transition duration-200">
|
| 97 |
+
Connexion
|
| 98 |
+
</a>
|
| 99 |
+
{% endif %}
|
| 100 |
+
</nav>
|
| 101 |
+
</header>
|
| 102 |
+
|
| 103 |
+
<main class="flex flex-col items-center">
|
| 104 |
+
|
| 105 |
+
<div class="max-w-xl w-full p-6 sm:p-8 bg-gray-800 shadow-2xl border-t-4 border-blue-500">
|
| 106 |
+
|
| 107 |
+
<h1 class="text-3xl font-extrabold text-white mb-6 text-center">
|
| 108 |
+
Finaliser votre Commande
|
| 109 |
+
</h1>
|
| 110 |
+
|
| 111 |
+
<div class="mb-8 border border-gray-700 p-4">
|
| 112 |
+
<h2 class="text-xl font-bold text-white mb-3 border-b border-gray-700 pb-2">
|
| 113 |
+
Récapitulatif
|
| 114 |
+
</h2>
|
| 115 |
+
|
| 116 |
+
<div class="space-y-2 text-gray-300">
|
| 117 |
+
<div class="flex justify-between">
|
| 118 |
+
<span>Plan Sélectionné:</span>
|
| 119 |
+
<span class="font-semibold text-white">{{ plan.title }}</span>
|
| 120 |
+
</div>
|
| 121 |
+
<div class="text-sm italic text-gray-400">
|
| 122 |
+
{{ plan.description }}
|
| 123 |
+
</div>
|
| 124 |
+
<div class="flex justify-between pt-2 border-t border-gray-700 font-bold text-lg text-yellow-400">
|
| 125 |
+
<span>Total (TVA incluse):</span>
|
| 126 |
+
<span>{{ plan.price_display }}</span>
|
| 127 |
+
</div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
|
| 131 |
+
<form id="payment-form">
|
| 132 |
+
<h2 class="text-xl font-bold text-white mb-4">
|
| 133 |
+
Informations de Paiement
|
| 134 |
+
</h2>
|
| 135 |
+
|
| 136 |
+
<div id="card-element" class="shadow-md">
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<div id="card-errors" role="alert" class="text-red-500 text-sm mb-4"></div>
|
| 140 |
+
|
| 141 |
+
<button id="submit-button" class="w-full px-6 py-3 bg-blue-600 text-white text-lg font-bold shadow-md hover:bg-blue-700 transition duration-300" type="submit">
|
| 142 |
+
Payer maintenant {{ plan.price_display }}
|
| 143 |
+
</button>
|
| 144 |
+
</form>
|
| 145 |
+
|
| 146 |
+
</div>
|
| 147 |
+
|
| 148 |
+
</main>
|
| 149 |
+
|
| 150 |
+
<footer class="mt-12 pt-6 border-t border-gray-700 text-center text-gray-500 text-sm">
|
| 151 |
+
© 2025 GitForge. Paiement Sécurisé par Stripe.
|
| 152 |
+
</footer>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<script>
|
| 156 |
+
// Logique de bascule du mode sombre/clair (à inclure pour l'uniformité)
|
| 157 |
+
const themeToggle = document.getElementById('theme-toggle');
|
| 158 |
+
const htmlElement = document.documentElement;
|
| 159 |
+
const iconElement = themeToggle.querySelector('.material-symbols-rounded');
|
| 160 |
+
const savedTheme = localStorage.getItem('theme');
|
| 161 |
+
if (savedTheme === 'light') {
|
| 162 |
+
htmlElement.classList.remove('dark');
|
| 163 |
+
htmlElement.classList.add('light');
|
| 164 |
+
iconElement.textContent = 'dark_mode';
|
| 165 |
+
} else {
|
| 166 |
+
htmlElement.classList.add('dark');
|
| 167 |
+
htmlElement.classList.remove('light');
|
| 168 |
+
iconElement.textContent = 'light_mode';
|
| 169 |
+
}
|
| 170 |
+
themeToggle.addEventListener('click', () => {
|
| 171 |
+
if (htmlElement.classList.contains('light')) {
|
| 172 |
+
htmlElement.classList.remove('light');
|
| 173 |
+
htmlElement.classList.add('dark');
|
| 174 |
+
localStorage.setItem('theme', 'dark');
|
| 175 |
+
iconElement.textContent = 'light_mode';
|
| 176 |
+
} else {
|
| 177 |
+
htmlElement.classList.add('light');
|
| 178 |
+
htmlElement.classList.remove('dark');
|
| 179 |
+
localStorage.setItem('theme', 'light');
|
| 180 |
+
iconElement.textContent = 'dark_mode';
|
| 181 |
+
}
|
| 182 |
+
});
|
| 183 |
+
|
| 184 |
+
// =======================================================
|
| 185 |
+
// LOGIQUE D'INTÉGRATION STRIPE ELEMENTS
|
| 186 |
+
// =======================================================
|
| 187 |
+
const planId = new URLSearchParams(window.location.search).get('plan');
|
| 188 |
+
const stripe = Stripe("{{ stripe_public_key }}"); // Clé publique injectée par Jinja
|
| 189 |
+
const elements = stripe.elements();
|
| 190 |
+
const cardElement = elements.create('card', {
|
| 191 |
+
style: {
|
| 192 |
+
base: {
|
| 193 |
+
color: htmlElement.classList.contains('light') ? '#202020' : '#EAEAEA',
|
| 194 |
+
fontFamily: 'system-ui, sans-serif',
|
| 195 |
+
fontSmoothing: 'antialiased',
|
| 196 |
+
fontSize: '16px',
|
| 197 |
+
'::placeholder': {
|
| 198 |
+
color: htmlElement.classList.contains('light') ? '#5C5C5C' : '#B0B0B0',
|
| 199 |
+
},
|
| 200 |
+
},
|
| 201 |
+
invalid: {
|
| 202 |
+
color: '#EF4444',
|
| 203 |
+
iconColor: '#EF4444',
|
| 204 |
+
},
|
| 205 |
+
}
|
| 206 |
+
});
|
| 207 |
+
|
| 208 |
+
cardElement.mount('#card-element');
|
| 209 |
+
|
| 210 |
+
const form = document.getElementById('payment-form');
|
| 211 |
+
const submitButton = document.getElementById('submit-button');
|
| 212 |
+
const cardErrors = document.getElementById('card-errors');
|
| 213 |
+
let clientSecret = null; // Pour stocker le Client Secret reçu du backend
|
| 214 |
+
|
| 215 |
+
// 1. Récupérer le Client Secret du backend au chargement de la page
|
| 216 |
+
async function fetchClientSecret() {
|
| 217 |
+
try {
|
| 218 |
+
// Requête au backend pour créer le PaymentIntent
|
| 219 |
+
const response = await fetch('/api/create-payment-intent', {
|
| 220 |
+
method: 'POST',
|
| 221 |
+
headers: {
|
| 222 |
+
'Content-Type': 'application/json'
|
| 223 |
+
},
|
| 224 |
+
body: JSON.stringify({ plan_id: planId })
|
| 225 |
+
});
|
| 226 |
+
|
| 227 |
+
if (!response.ok) {
|
| 228 |
+
throw new Error('Erreur lors de la création du PaymentIntent.');
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
const data = await response.json();
|
| 232 |
+
clientSecret = data.client_secret;
|
| 233 |
+
|
| 234 |
+
} catch (error) {
|
| 235 |
+
console.error('Erreur Stripe:', error);
|
| 236 |
+
cardErrors.textContent = "Erreur: Impossible d'initialiser le paiement. Veuillez réessayer.";
|
| 237 |
+
submitButton.disabled = true;
|
| 238 |
+
}
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
// 2. Traiter la soumission du formulaire
|
| 242 |
+
form.addEventListener('submit', async (event) => {
|
| 243 |
+
event.preventDefault();
|
| 244 |
+
|
| 245 |
+
if (!clientSecret) {
|
| 246 |
+
cardErrors.textContent = "Veuillez patienter pendant l'initialisation du paiement.";
|
| 247 |
+
return;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
submitButton.disabled = true;
|
| 251 |
+
submitButton.textContent = 'Traitement en cours...';
|
| 252 |
+
|
| 253 |
+
// Confirmer le paiement côté client avec le clientSecret et l'élément Stripe
|
| 254 |
+
const { error, paymentIntent } = await stripe.confirmCardPayment(clientSecret, {
|
| 255 |
+
payment_method: {
|
| 256 |
+
card: cardElement,
|
| 257 |
+
billing_details: {
|
| 258 |
+
// Idéalement, les détails de l'utilisateur (email/nom) devraient être fournis ici
|
| 259 |
+
},
|
| 260 |
+
}
|
| 261 |
+
});
|
| 262 |
+
|
| 263 |
+
if (error) {
|
| 264 |
+
// Afficher les erreurs (ex: carte refusée, données invalides)
|
| 265 |
+
cardErrors.textContent = error.message;
|
| 266 |
+
submitButton.disabled = false;
|
| 267 |
+
submitButton.textContent = 'Payer maintenant {{ plan.price_display }}';
|
| 268 |
+
} else if (paymentIntent.status === 'succeeded') {
|
| 269 |
+
// Le paiement a réussi
|
| 270 |
+
window.location.href = `/dashboard?payment=success&intent=${paymentIntent.id}`;
|
| 271 |
+
}
|
| 272 |
+
});
|
| 273 |
+
|
| 274 |
+
// Démarrage : Récupérer le client secret au chargement
|
| 275 |
+
fetchClientSecret();
|
| 276 |
+
</script>
|
| 277 |
+
</body>
|
| 278 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/conditions_utilisation.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/connexion.html
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Connexion - 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; /* Pour que l'input reste blanc en mode clair */
|
| 22 |
+
--ring-color: #a78bfa; /* Violet clair pour le focus */
|
| 23 |
+
--ring-offset-color: #f9fafb; /* Couleur de l'arrière-plan de la page */
|
| 24 |
+
}
|
| 25 |
+
</style>
|
| 26 |
+
</head>
|
| 27 |
+
<body class="bg-[--bg-page] text-[--text-primary] min-h-screen flex items-center justify-center p-4">
|
| 28 |
+
|
| 29 |
+
<div class="w-full max-w-md">
|
| 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">Connexion</h2>
|
| 32 |
+
<p id="message" class="text-center mb-4"></p>
|
| 33 |
+
|
| 34 |
+
<form id="login-form" class="space-y-5">
|
| 35 |
+
<div>
|
| 36 |
+
<label for="email" class="block text-sm font-medium text-[--text-secondary] mb-1">Adresse E-mail</label>
|
| 37 |
+
<input type="email" id="email" name="email" required
|
| 38 |
+
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"
|
| 39 |
+
placeholder="Votre adresse e-mail">
|
| 40 |
+
</div>
|
| 41 |
+
|
| 42 |
+
<div>
|
| 43 |
+
<label for="password" class="block text-sm font-medium text-[--text-secondary] mb-1">Mot de passe</label>
|
| 44 |
+
<div class="relative">
|
| 45 |
+
<input type="password" id="password" name="password" required minlength="8"
|
| 46 |
+
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"
|
| 47 |
+
placeholder="Votre mot de passe">
|
| 48 |
+
<button type="button" id="toggle-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">
|
| 49 |
+
<span class="material-symbols-rounded text-xl">visibility</span>
|
| 50 |
+
</button>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
|
| 54 |
+
<button type="submit" id="submit-button"
|
| 55 |
+
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">
|
| 56 |
+
Se connecter
|
| 57 |
+
</button>
|
| 58 |
+
</form>
|
| 59 |
+
|
| 60 |
+
<div class="mt-6 text-center text-sm">
|
| 61 |
+
<p class="text-[--text-secondary]">
|
| 62 |
+
Pas encore de compte ?
|
| 63 |
+
<a href="/mindus/nexus/inscription" class="font-medium text-indigo-600 hover:text-indigo-500">
|
| 64 |
+
S'inscrire
|
| 65 |
+
</a>
|
| 66 |
+
</p>
|
| 67 |
+
<p class="text-[--text-secondary] mt-2">
|
| 68 |
+
<a href="/mindus/nexus/mot_de_passe_oublie" class="font-medium text-indigo-600 hover:text-indigo-500">
|
| 69 |
+
Mot de passe oublié ?
|
| 70 |
+
</a>
|
| 71 |
+
</p>
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
|
| 76 |
+
<script>
|
| 77 |
+
// L'URL de l'API pointe directement vers l'endpoint local du backend Flask
|
| 78 |
+
const LOGIN_ENDPOINT = "/api/login";
|
| 79 |
+
|
| 80 |
+
const form = document.getElementById('login-form');
|
| 81 |
+
const messageElement = document.getElementById('message');
|
| 82 |
+
const submitButton = document.getElementById('submit-button');
|
| 83 |
+
|
| 84 |
+
// --- LOGIQUE D'AFFICHAGE/MASQUAGE DU MOT DE PASSE ---
|
| 85 |
+
function setupPasswordToggle(inputId, toggleId) {
|
| 86 |
+
const passwordInput = document.getElementById(inputId);
|
| 87 |
+
const toggleButton = document.getElementById(toggleId);
|
| 88 |
+
const icon = toggleButton.querySelector('.material-symbols-rounded');
|
| 89 |
+
|
| 90 |
+
toggleButton.addEventListener('click', () => {
|
| 91 |
+
const isPassword = passwordInput.type === 'password';
|
| 92 |
+
passwordInput.type = isPassword ? 'text' : 'password';
|
| 93 |
+
icon.textContent = isPassword ? 'visibility_off' : 'visibility';
|
| 94 |
+
});
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
setupPasswordToggle('password', 'toggle-password');
|
| 98 |
+
// ---------------------------------------------------
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
form.addEventListener('submit', async (e) => {
|
| 102 |
+
e.preventDefault();
|
| 103 |
+
messageElement.textContent = ''; // Réinitialiser le message
|
| 104 |
+
messageElement.className = 'text-center mb-4'; // Réinitialiser les classes
|
| 105 |
+
submitButton.disabled = true;
|
| 106 |
+
submitButton.textContent = 'Connexion en cours...';
|
| 107 |
+
|
| 108 |
+
const formData = new FormData(form);
|
| 109 |
+
const data = Object.fromEntries(formData.entries());
|
| 110 |
+
|
| 111 |
+
try {
|
| 112 |
+
const response = await fetch(LOGIN_ENDPOINT, {
|
| 113 |
+
method: 'POST',
|
| 114 |
+
headers: {
|
| 115 |
+
'Content-Type': 'application/json',
|
| 116 |
+
},
|
| 117 |
+
body: JSON.stringify(data)
|
| 118 |
+
});
|
| 119 |
+
|
| 120 |
+
const result = await response.json();
|
| 121 |
+
|
| 122 |
+
if (response.ok && result.success) {
|
| 123 |
+
messageElement.textContent = 'Connexion réussie ! Redirection en cours...';
|
| 124 |
+
messageElement.className = 'text-green-600 mb-4 font-bold'; // Utilisation d'un vert clair
|
| 125 |
+
|
| 126 |
+
// Le backend retourne la redirection dans la clé 'redirect'
|
| 127 |
+
// Dans user_routes.py, l'API de connexion retourne url_for('user_bp.dashboard')
|
| 128 |
+
const redirectUrl = result.redirect || 'dashboard';
|
| 129 |
+
|
| 130 |
+
// Redirection vers la page principale de l'application
|
| 131 |
+
setTimeout(() => {
|
| 132 |
+
window.location.href = redirectUrl;
|
| 133 |
+
}, 1500);
|
| 134 |
+
|
| 135 |
+
} else {
|
| 136 |
+
// Afficher le message d'erreur du backend
|
| 137 |
+
messageElement.textContent = result.message || 'Email ou mot de passe invalide.';
|
| 138 |
+
messageElement.className = 'text-red-600 mb-4 font-bold'; // Utilisation d'un rouge clair
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
} catch (error) {
|
| 142 |
+
console.error('Erreur lors de la communication avec le backend:', error);
|
| 143 |
+
messageElement.textContent = 'Erreur de connexion au serveur ou réseau indisponible.';
|
| 144 |
+
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 145 |
+
} finally {
|
| 146 |
+
// Réactiver le bouton si la redirection n'a pas eu lieu
|
| 147 |
+
if (messageElement.className.indexOf('text-green-600') === -1) {
|
| 148 |
+
submitButton.disabled = false;
|
| 149 |
+
submitButton.textContent = "Se connecter";
|
| 150 |
+
}
|
| 151 |
+
}
|
| 152 |
+
});
|
| 153 |
+
|
| 154 |
+
// --- LOGIQUE DU THÈME ENLEVÉE ---
|
| 155 |
+
</script>
|
| 156 |
+
</body>
|
| 157 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/create_new_issue.html
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - New Issue</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 |
+
<style>
|
| 12 |
+
/* Inter Font Configuration */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Theme Variables and Transitions */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Light Mode Theme */
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E; /* Green button */
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
--danger-color: #CF222E;
|
| 31 |
+
--danger-hover: #B8202A;
|
| 32 |
+
}
|
| 33 |
+
/* Utility classes for theme 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); }
|
| 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-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 41 |
+
.bg-danger-color-var { background-color: var(--danger-color); } .hover\:bg-danger-hover-var:hover { background-color: var(--danger-hover); }
|
| 42 |
+
|
| 43 |
+
/* Repository Navigation Link Styles */
|
| 44 |
+
.repo-nav-link {
|
| 45 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 46 |
+
margin-right: 0.5rem;
|
| 47 |
+
}
|
| 48 |
+
.repo-nav-link.active {
|
| 49 |
+
border-bottom-color: #F78166; /* Using a vibrant orange/red for active tab like the image */
|
| 50 |
+
color: var(--text-color) !important;
|
| 51 |
+
font-weight: 600;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
/* Sidebar Styles */
|
| 55 |
+
#sidebar {
|
| 56 |
+
position: fixed;
|
| 57 |
+
top: 0;
|
| 58 |
+
left: 0;
|
| 59 |
+
width: 300px;
|
| 60 |
+
height: 100%;
|
| 61 |
+
background-color: var(--bg-card);
|
| 62 |
+
transform: translateX(-100%);
|
| 63 |
+
transition: transform 0.3s ease-in-out;
|
| 64 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 65 |
+
z-index: 100;
|
| 66 |
+
}
|
| 67 |
+
#sidebar.open {
|
| 68 |
+
transform: translateX(0);
|
| 69 |
+
}
|
| 70 |
+
#overlay {
|
| 71 |
+
position: fixed;
|
| 72 |
+
top: 0;
|
| 73 |
+
left: 0;
|
| 74 |
+
width: 100%;
|
| 75 |
+
height: 100%;
|
| 76 |
+
background: rgba(0, 0, 0, 0.5);
|
| 77 |
+
z-index: 90;
|
| 78 |
+
display: none;
|
| 79 |
+
}
|
| 80 |
+
#overlay.open {
|
| 81 |
+
display: block;
|
| 82 |
+
}
|
| 83 |
+
</style>
|
| 84 |
+
</head>
|
| 85 |
+
|
| 86 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 87 |
+
|
| 88 |
+
<div id="overlay"></div>
|
| 89 |
+
|
| 90 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 91 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 92 |
+
<span class="material-symbols-rounded text-3xl">data_object</span>
|
| 93 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 94 |
+
<span class="material-symbols-rounded text-2xl">close</span>
|
| 95 |
+
</button>
|
| 96 |
+
</div>
|
| 97 |
+
|
| 98 |
+
<nav class="space-y-1">
|
| 99 |
+
<a href="/mindus/nexus/dashboard" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 100 |
+
<span class="material-symbols-rounded mr-3 text-lg">home</span> Home
|
| 101 |
+
</a>
|
| 102 |
+
<a href="/mindus/nexus/issue?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg bg-active-var transition-colors-theme font-semibold text-link-var">
|
| 103 |
+
<span class="material-symbols-rounded mr-3 text-lg">bug_report</span> Issues
|
| 104 |
+
</a>
|
| 105 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 106 |
+
<span class="material-symbols-rounded mr-3 text-lg">merge</span> Pull requests
|
| 107 |
+
</a>
|
| 108 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 109 |
+
<span class="material-symbols-rounded mr-3 text-lg">box</span> Projects
|
| 110 |
+
</a>
|
| 111 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 112 |
+
<span class="material-symbols-rounded mr-3 text-lg">chat</span> Discussions
|
| 113 |
+
</a>
|
| 114 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 115 |
+
<span class="material-symbols-rounded mr-3 text-lg">developer_mode</span> Codespaces
|
| 116 |
+
</a>
|
| 117 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 118 |
+
<span class="material-symbols-rounded mr-3 text-lg">smart_toy</span> Copilot
|
| 119 |
+
</a>
|
| 120 |
+
</nav>
|
| 121 |
+
|
| 122 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 123 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 124 |
+
<span class="material-symbols-rounded mr-3 text-lg">explore</span> Explore
|
| 125 |
+
</a>
|
| 126 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 127 |
+
<span class="material-symbols-rounded mr-3 text-lg">storefront</span> Marketplace
|
| 128 |
+
</a>
|
| 129 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 130 |
+
<span class="material-symbols-rounded mr-3 text-lg">link</span> MCP registry
|
| 131 |
+
</a>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme sticky top-0 z-50">
|
| 137 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 138 |
+
<div class="flex justify-between items-center h-16">
|
| 139 |
+
|
| 140 |
+
<div class="flex items-center space-x-4">
|
| 141 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 142 |
+
<span class="material-symbols-rounded text-2xl">menu</span>
|
| 143 |
+
</button>
|
| 144 |
+
|
| 145 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 146 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 147 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 148 |
+
<span id="repo-user">{{ repo_user }}</span> / <span id="repo-name">{{ repo_name }}</span>
|
| 149 |
+
<span class="material-symbols-rounded text-base ml-2 text-secondary-var">lock</span>
|
| 150 |
+
</a>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<div class="flex items-center space-x-3">
|
| 154 |
+
<div class="hidden sm:block">
|
| 155 |
+
<input type="text" placeholder="Type / to search"
|
| 156 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 157 |
+
</div>
|
| 158 |
+
<a href="/mindus/nexus/notentification" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 159 |
+
<span class="material-symbols-rounded">notifications</span>
|
| 160 |
+
</a>
|
| 161 |
+
<a href="mindus/nexus/nouveau_project" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 162 |
+
<span class="material-symbols-rounded">add</span>
|
| 163 |
+
</a>
|
| 164 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 165 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 166 |
+
</a>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 172 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 173 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 174 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 175 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 176 |
+
</a>
|
| 177 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 178 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues <span class="ml-1 px-1 bg-active-var rounded-full text-xs font-normal">0</span>
|
| 179 |
+
</a>
|
| 180 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 181 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests
|
| 182 |
+
</a>
|
| 183 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 184 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 185 |
+
</a>
|
| 186 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 187 |
+
<span class="material-symbols-rounded text-base mr-1">box</span> Projects
|
| 188 |
+
</a>
|
| 189 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 190 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 191 |
+
</a>
|
| 192 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 193 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 194 |
+
</a>
|
| 195 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 196 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 197 |
+
</a>
|
| 198 |
+
</nav>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
</header>
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 205 |
+
|
| 206 |
+
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6 space-y-3 md:space-y-0">
|
| 207 |
+
<div class="flex items-center space-x-2 w-full md:w-auto">
|
| 208 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 209 |
+
Filters <span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 210 |
+
</button>
|
| 211 |
+
<input type="text" placeholder="is:issue is:open"
|
| 212 |
+
class="w-full md:w-96 p-1.5 text-sm rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<div class="flex items-center space-x-3 w-full md:w-auto justify-end">
|
| 216 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 217 |
+
Labels <span class="ml-1 font-semibold">0</span>
|
| 218 |
+
</button>
|
| 219 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 220 |
+
Milestones <span class="ml-1 font-semibold">0</span>
|
| 221 |
+
</button>
|
| 222 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 223 |
+
New issue
|
| 224 |
+
</a>
|
| 225 |
+
|
| 226 |
+
</div>
|
| 227 |
+
</div>
|
| 228 |
+
|
| 229 |
+
<h1 class="text-3xl font-semibold text-color-var mb-6">Create a new issue</h1>
|
| 230 |
+
|
| 231 |
+
<form id="create-issue-form" class="flex flex-col md:flex-row gap-6">
|
| 232 |
+
|
| 233 |
+
<div class="md:w-3/4">
|
| 234 |
+
<input type="text" id="issue-title" name="title" placeholder="Title" required
|
| 235 |
+
class="w-full p-2 text-xl font-semibold rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var mb-4"
|
| 236 |
+
maxlength="255">
|
| 237 |
+
|
| 238 |
+
<textarea id="issue-description" name="description" rows="15" placeholder="Leave a comment (markdown supported)"
|
| 239 |
+
class="w-full p-3 text-sm rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var resize-y"></textarea>
|
| 240 |
+
|
| 241 |
+
<input type="hidden" id="repo-slug-hidden" name="repo_slug" value="{{ repo_slug }}">
|
| 242 |
+
|
| 243 |
+
<div class="flex items-center justify-between mt-4">
|
| 244 |
+
<div>
|
| 245 |
+
<button type="submit"
|
| 246 |
+
class="inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 247 |
+
Submit new issue
|
| 248 |
+
</button>
|
| 249 |
+
</div>
|
| 250 |
+
<div>
|
| 251 |
+
<a href="/mindus/nexus/issues?repo_slug={{ repo_slug }}" class="text-secondary-var hover:text-color-var text-sm">Cancel</a>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
<div id="alert-message" class="mt-4 p-3 rounded-lg text-sm hidden" role="alert"></div>
|
| 256 |
+
|
| 257 |
+
</div>
|
| 258 |
+
|
| 259 |
+
<div class="md:w-1/4 space-y-4">
|
| 260 |
+
|
| 261 |
+
<div class="border-b border-color-var pb-2">
|
| 262 |
+
<h3 class="text-sm font-semibold text-color-var mb-2">Assignees</h3>
|
| 263 |
+
<select id="issue-assigned-to" name="assigned_to"
|
| 264 |
+
class="w-full p-1.5 text-sm rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var text-secondary-var">
|
| 265 |
+
<option value="">No one assigned</option>
|
| 266 |
+
<option value="user_1">Utilisateur 1</option>
|
| 267 |
+
<option value="user_2">Utilisateur 2</option>
|
| 268 |
+
</select>
|
| 269 |
+
</div>
|
| 270 |
+
|
| 271 |
+
<div class="border-b border-color-var pb-2">
|
| 272 |
+
<h3 class="text-sm font-semibold text-color-var mb-2">Labels</h3>
|
| 273 |
+
<p class="text-xs text-secondary-var">None yet</p>
|
| 274 |
+
<input type="text" id="issue-labels" name="labels" placeholder="bug, enhancement"
|
| 275 |
+
class="w-full p-1.5 text-sm rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var text-secondary-var mt-2">
|
| 276 |
+
<p class="text-xs text-secondary-var mt-1">Séparez les labels par une virgule.</p>
|
| 277 |
+
</div>
|
| 278 |
+
|
| 279 |
+
<div class="pb-2">
|
| 280 |
+
<h3 class="text-sm font-semibold text-color-var mb-2">Milestone</h3>
|
| 281 |
+
<select id="issue-milestone" name="milestone" disabled
|
| 282 |
+
class="w-full p-1.5 text-sm rounded-lg border border-color-var bg-active-var focus:outline-none text-secondary-var cursor-not-allowed">
|
| 283 |
+
<option value="">No milestone</option>
|
| 284 |
+
</select>
|
| 285 |
+
</div>
|
| 286 |
+
</div>
|
| 287 |
+
</form>
|
| 288 |
+
|
| 289 |
+
</main>
|
| 290 |
+
|
| 291 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 292 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 293 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 294 |
+
<span class="material-symbols-rounded text-xl">data_object</span>
|
| 295 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 296 |
+
</div>
|
| 297 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 298 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 299 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Privacy</a>
|
| 300 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Security</a>
|
| 301 |
+
<a href="/mindus/nexus/satut" class="hover:text-link-var">Status</a>
|
| 302 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 303 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 304 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 305 |
+
</nav>
|
| 306 |
+
</div>
|
| 307 |
+
</footer>
|
| 308 |
+
|
| 309 |
+
<script>
|
| 310 |
+
// SIDEBAR LOGIC
|
| 311 |
+
const sidebar = document.getElementById('sidebar');
|
| 312 |
+
const overlay = document.getElementById('overlay');
|
| 313 |
+
const openButton = document.getElementById('open-sidebar');
|
| 314 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 315 |
+
|
| 316 |
+
const toggleSidebar = () => {
|
| 317 |
+
sidebar.classList.toggle('open');
|
| 318 |
+
overlay.classList.toggle('open');
|
| 319 |
+
};
|
| 320 |
+
|
| 321 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 322 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 323 |
+
overlay.addEventListener('click', toggleSidebar); // Close when clicking overlay
|
| 324 |
+
|
| 325 |
+
// Prevent scrolling when sidebar is open (for better mobile UX)
|
| 326 |
+
const body = document.body;
|
| 327 |
+
const observer = new MutationObserver(() => {
|
| 328 |
+
if (sidebar.classList.contains('open')) {
|
| 329 |
+
body.style.overflow = 'hidden';
|
| 330 |
+
} else {
|
| 331 |
+
body.style.overflow = '';
|
| 332 |
+
}
|
| 333 |
+
});
|
| 334 |
+
|
| 335 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 336 |
+
|
| 337 |
+
// ISSUE FORM SUBMISSION LOGIC
|
| 338 |
+
const form = document.getElementById('create-issue-form');
|
| 339 |
+
const alertMessage = document.getElementById('alert-message');
|
| 340 |
+
const repoSlugHidden = document.getElementById('repo-slug-hidden');
|
| 341 |
+
|
| 342 |
+
const displayAlert = (message, isSuccess) => {
|
| 343 |
+
alertMessage.textContent = message;
|
| 344 |
+
alertMessage.classList.remove('hidden', 'bg-red-100', 'text-red-700', 'bg-green-100', 'text-green-700');
|
| 345 |
+
if (isSuccess) {
|
| 346 |
+
alertMessage.classList.add('bg-green-100', 'text-green-700', 'border', 'border-green-400');
|
| 347 |
+
setTimeout(() => {
|
| 348 |
+
// Rediriger vers la page de la liste d'issues après succès
|
| 349 |
+
const issuesUrl = `/mindus/nexus/new_issue?repo_slug=${repoSlugHidden.value}`;
|
| 350 |
+
window.location.href = issuesUrl;
|
| 351 |
+
}, 1500);
|
| 352 |
+
} else {
|
| 353 |
+
alertMessage.classList.add('bg-red-100', 'text-red-700', 'border', 'border-red-400');
|
| 354 |
+
}
|
| 355 |
+
};
|
| 356 |
+
|
| 357 |
+
form.addEventListener('submit', async (e) => {
|
| 358 |
+
e.preventDefault();
|
| 359 |
+
|
| 360 |
+
const title = document.getElementById('issue-title').value.trim();
|
| 361 |
+
const description = document.getElementById('issue-description').value.trim();
|
| 362 |
+
const assignedTo = document.getElementById('issue-assigned-to').value || null;
|
| 363 |
+
const labelsRaw = document.getElementById('issue-labels').value.trim();
|
| 364 |
+
const labels = labelsRaw ? labelsRaw.split(',').map(label => label.trim()).filter(label => label) : [];
|
| 365 |
+
const repoSlug = repoSlugHidden.value; // Récupère le slug du dépôt
|
| 366 |
+
|
| 367 |
+
if (!title) {
|
| 368 |
+
displayAlert("Le titre de l'Issue est requis.", false);
|
| 369 |
+
return;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
const issueData = {
|
| 373 |
+
repo_slug: repoSlug,
|
| 374 |
+
title: title,
|
| 375 |
+
description: description,
|
| 376 |
+
assigned_to: assignedTo,
|
| 377 |
+
labels: labels
|
| 378 |
+
};
|
| 379 |
+
|
| 380 |
+
// Cacher l'alerte précédente
|
| 381 |
+
alertMessage.classList.add('hidden');
|
| 382 |
+
|
| 383 |
+
try {
|
| 384 |
+
const response = await fetch("/api/issue/create", {
|
| 385 |
+
method: "POST",
|
| 386 |
+
headers: {
|
| 387 |
+
"Content-Type": "application/json",
|
| 388 |
+
},
|
| 389 |
+
body: JSON.stringify(issueData),
|
| 390 |
+
});
|
| 391 |
+
|
| 392 |
+
const result = await response.json();
|
| 393 |
+
|
| 394 |
+
if (result.success) {
|
| 395 |
+
displayAlert(result.message || "Issue créée avec succès.", true);
|
| 396 |
+
// La redirection se fait dans displayAlert après un petit délai
|
| 397 |
+
} else {
|
| 398 |
+
displayAlert(result.message || "Échec de la création de l'Issue.", false);
|
| 399 |
+
}
|
| 400 |
+
} catch (error) {
|
| 401 |
+
console.error("Erreur lors de l'envoi du formulaire:", error);
|
| 402 |
+
displayAlert("Une erreur réseau s'est produite lors de la création de l'Issue.", false);
|
| 403 |
+
}
|
| 404 |
+
});
|
| 405 |
+
|
| 406 |
+
</script>
|
| 407 |
+
</body>
|
| 408 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/customers_stories.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/dashboard.html
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Dashboard</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.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 |
+
<style>
|
| 12 |
+
/* Configuration de la police Inter */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Variables de Thème et Styles */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Dark Mode (Default) */
|
| 19 |
+
:root, .dark {
|
| 20 |
+
--bg-page: #0D1117;
|
| 21 |
+
--bg-header: #161B22;
|
| 22 |
+
--bg-card: #161B22;
|
| 23 |
+
--bg-active: #30363d;
|
| 24 |
+
--border-color: #30363d;
|
| 25 |
+
--text-color: #E6EDF3;
|
| 26 |
+
--text-secondary: #8B949E;
|
| 27 |
+
--text-link: #58A6FF;
|
| 28 |
+
--primary-color: #238636;
|
| 29 |
+
--primary-hover: #2EA043;
|
| 30 |
+
}
|
| 31 |
+
/* Light Mode (UNIQUE Theme) */
|
| 32 |
+
.light {
|
| 33 |
+
--bg-page: #FFFFFF;
|
| 34 |
+
--bg-header: #F6F8FA;
|
| 35 |
+
--bg-card: #FFFFFF;
|
| 36 |
+
--bg-active: #F3F4F6;
|
| 37 |
+
--border-color: #D0D7DE;
|
| 38 |
+
--text-color: #24292F;
|
| 39 |
+
--text-secondary: #57606A;
|
| 40 |
+
--text-link: #0969DA;
|
| 41 |
+
--primary-color: #2DA44E;
|
| 42 |
+
--primary-hover: #2C974B;
|
| 43 |
+
}
|
| 44 |
+
/* Utility classes for variables */
|
| 45 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 46 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 47 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 48 |
+
.text-link-var { color: var(--text-link); } .hover\:text-link-hover-var:hover { color: var(--text-link); }
|
| 49 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 50 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 51 |
+
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 52 |
+
.repo-nav-link { padding: 0.5rem 1rem; border-bottom: 2px solid transparent; margin-right: 0.5rem; }
|
| 53 |
+
.repo-nav-link.active { border-bottom-color: var(--text-link); color: var(--text-color) !important; font-weight: 600; }
|
| 54 |
+
|
| 55 |
+
/* Style for Dashboard Sidebar links (Repo links in the new sidebar) */
|
| 56 |
+
.sidebar-repo-link {
|
| 57 |
+
display: flex; align-items: center; padding: 0.25rem 0.5rem; border-radius: 0.25rem;
|
| 58 |
+
color: var(--text-color); font-size: 0.875rem; /* text-sm */
|
| 59 |
+
}
|
| 60 |
+
.sidebar-repo-link:hover {
|
| 61 |
+
background-color: var(--bg-active);
|
| 62 |
+
}
|
| 63 |
+
.sidebar-repo-link.active {
|
| 64 |
+
background-color: var(--bg-active);
|
| 65 |
+
font-weight: 600;
|
| 66 |
+
}
|
| 67 |
+
</style>
|
| 68 |
+
</head>
|
| 69 |
+
|
| 70 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme flex flex-col">
|
| 71 |
+
|
| 72 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 73 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 74 |
+
<div class="flex justify-between items-center h-16">
|
| 75 |
+
<div class="flex items-center space-x-4">
|
| 76 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6">
|
| 77 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden sm:inline">Dashboard</span>
|
| 78 |
+
|
| 79 |
+
<span class="text-secondary-var hidden sm:inline">/</span>
|
| 80 |
+
<div class="hidden sm:block">
|
| 81 |
+
<div class="relative">
|
| 82 |
+
<input type="text" placeholder="Type / to search"
|
| 83 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg pl-8 p-1.5 text-sm w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 84 |
+
<span class="material-symbols-rounded absolute left-2 top-1/2 transform -translate-y-1/2 text-secondary-var text-lg pointer-events-none">search</span>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
</div>
|
| 88 |
+
|
| 89 |
+
<div class="flex items-center space-x-3 text-color-var">
|
| 90 |
+
|
| 91 |
+
<button title="Toggle Theme" class="p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 92 |
+
<span class="material-symbols-rounded">add</span>
|
| 93 |
+
</button>
|
| 94 |
+
<button title="Notifications" class="p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 95 |
+
<span class="material-symbols-rounded">notifications</span>
|
| 96 |
+
</button>
|
| 97 |
+
<button title="Quick Actions" class="p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 98 |
+
<span class="material-symbols-rounded">inbox</span>
|
| 99 |
+
</button>
|
| 100 |
+
<button title="Feedback" class="p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 101 |
+
<span class="material-symbols-rounded">live_help</span>
|
| 102 |
+
</button>
|
| 103 |
+
<button title="Settings" class="p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 104 |
+
<span class="material-symbols-rounded">settings</span>
|
| 105 |
+
</button>
|
| 106 |
+
<a href="/mindus/nexus/profile" title="My Profile"
|
| 107 |
+
class="p-1 rounded-full text-color-var hover:text-link-var transition-colors-theme">
|
| 108 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 109 |
+
</a>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
</header>
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
<div id="main-content" class="flex-grow max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 transition-colors-theme w-full">
|
| 118 |
+
<div class="grid grid-cols-1 lg:grid-cols-4 xl:grid-cols-5 gap-8">
|
| 119 |
+
|
| 120 |
+
<div class="lg:col-span-1 space-y-4 order-1">
|
| 121 |
+
<h2 class="text-lg font-semibold text-color-var">Top repositories</h2>
|
| 122 |
+
|
| 123 |
+
<div class="mb-4">
|
| 124 |
+
<input type="text" placeholder="Find a repository..."
|
| 125 |
+
class="w-full bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<a href="/mindus/nexus/nouveau_project"
|
| 129 |
+
class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 130 |
+
<span class="material-symbols-rounded text-base mr-1">add</span>
|
| 131 |
+
New
|
| 132 |
+
</a>
|
| 133 |
+
|
| 134 |
+
<div id="repositories-list" class="space-y-1 mt-4">
|
| 135 |
+
<div id="loading-repos" class="text-center p-4 text-secondary-var">
|
| 136 |
+
<span class="material-symbols-rounded animate-spin text-2xl mb-2">progress_activity</span>
|
| 137 |
+
<p>Loading your repositories...</p>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div id="no-repos-message" class="hidden text-center p-4">
|
| 142 |
+
<p class="text-secondary-var">No repositories found.</p>
|
| 143 |
+
</div>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<div class="lg:col-span-3 xl:col-span-3 space-y-8 order-2">
|
| 147 |
+
<h1 class="text-2xl font-bold text-color-var">Home</h1>
|
| 148 |
+
|
| 149 |
+
<div class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 150 |
+
<h2 class="text-xl font-bold text-color-var mb-4">Ask anything</h2>
|
| 151 |
+
|
| 152 |
+
<div class="relative mb-6">
|
| 153 |
+
<div class="flex flex-col border border-color-var rounded-lg p-1.5 bg-page-var transition-colors-theme min-h-[5rem]">
|
| 154 |
+
<input type="text" id="copilot-input" placeholder="Add repositories, files, and spaces"
|
| 155 |
+
class="flex-grow bg-transparent text-color-var p-2 text-base focus:outline-none w-full"
|
| 156 |
+
onkeypress="handleCopilotInput(event)">
|
| 157 |
+
|
| 158 |
+
<div class="flex justify-between items-center p-1">
|
| 159 |
+
<button class="p-1 rounded-full text-secondary-var hover:text-color-var transition-colors-theme">
|
| 160 |
+
<span class="material-symbols-rounded text-lg">add</span>
|
| 161 |
+
</button>
|
| 162 |
+
|
| 163 |
+
<button class="p-1 rounded-full text-secondary-var hover:text-color-var transition-colors-theme">
|
| 164 |
+
<span class="material-symbols-rounded text-lg">arrow_forward</span>
|
| 165 |
+
</button>
|
| 166 |
+
</div>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
|
| 170 |
+
<div class="flex space-x-3 text-sm text-secondary-var mb-4">
|
| 171 |
+
<button class="flex items-center px-3 py-1 rounded-full border border-color-var hover:bg-active-var transition-colors-theme">
|
| 172 |
+
<span class="material-symbols-rounded text-base mr-1">task</span> Task <span class="text-xs ml-2 px-1 bg-primary-color-var text-white rounded-full">New</span>
|
| 173 |
+
</button>
|
| 174 |
+
<button class="flex items-center px-3 py-1 rounded-full border border-color-var hover:bg-active-var transition-colors-theme">
|
| 175 |
+
<span class="material-symbols-rounded text-base mr-1">note_add</span> Create issue
|
| 176 |
+
</button>
|
| 177 |
+
<button class="flex items-center px-3 py-1 rounded-full border border-color-var hover:bg-active-var transition-colors-theme">
|
| 178 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Write code
|
| 179 |
+
</button>
|
| 180 |
+
<button class="flex items-center px-3 py-1 rounded-full border border-color-var hover:bg-active-var transition-colors-theme">
|
| 181 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Git <span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 182 |
+
</button>
|
| 183 |
+
</div>
|
| 184 |
+
|
| 185 |
+
<div class="w-full border-t border-color-var/50 my-4"></div>
|
| 186 |
+
|
| 187 |
+
<button class="flex items-center px-4 py-2 rounded-full border border-color-var hover:bg-active-var transition-colors-theme text-sm text-color-var">
|
| 188 |
+
<span class="material-symbols-rounded text-base mr-1">call_split</span> Pull requests <span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 189 |
+
</button>
|
| 190 |
+
|
| 191 |
+
</div>
|
| 192 |
+
|
| 193 |
+
<div class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 194 |
+
<div class="flex justify-between items-center mb-4">
|
| 195 |
+
<h2 class="text-xl font-semibold text-color-var flex items-center">
|
| 196 |
+
Feed
|
| 197 |
+
</h2>
|
| 198 |
+
<button class="flex items-center px-3 py-1 rounded-lg border border-color-var hover:bg-active-var transition-colors-theme text-sm text-secondary-var">
|
| 199 |
+
<span class="material-symbols-rounded text-base mr-1">filter_list</span> Filter
|
| 200 |
+
</button>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<div class="border-t border-color-var/50 pt-4">
|
| 204 |
+
<div class="flex justify-between items-center mb-4">
|
| 205 |
+
<h3 class="text-lg font-semibold text-color-var flex items-center">
|
| 206 |
+
<span class="material-symbols-rounded text-xl mr-2">trending_up</span> Trending repositories
|
| 207 |
+
<a href="#" class="text-link-var text-sm ml-2 font-normal">See more</a>
|
| 208 |
+
</h3>
|
| 209 |
+
<span class="text-secondary-var text-sm">...</span>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="flex justify-between items-start p-3 hover:bg-active-var rounded-lg transition-colors-theme border border-color-var/50">
|
| 213 |
+
<div>
|
| 214 |
+
<a href="#" class="text-link-var text-lg font-semibold">simstudioai/sim</a>
|
| 215 |
+
<p class="text-secondary-var text-sm mt-1">Open-source platform to build and deploy AI agent workflows.</p>
|
| 216 |
+
<div class="flex items-center space-x-3 text-xs text-secondary-var mt-2">
|
| 217 |
+
<span class="text-color-var">TypeScript</span>
|
| 218 |
+
<span>⭐ 21.2k</span>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
<button class="flex items-center px-3 py-1 text-sm border border-color-var rounded-lg hover:bg-active-var transition-colors-theme text-color-var">
|
| 222 |
+
<span class="material-symbols-rounded text-base mr-1">star</span> Star
|
| 223 |
+
</button>
|
| 224 |
+
</div>
|
| 225 |
+
<div class="flex justify-between items-start p-3 mt-3 hover:bg-active-var rounded-lg transition-colors-theme border border-color-var/50">
|
| 226 |
+
<div>
|
| 227 |
+
<a href="#" class="text-link-var text-lg font-semibold">IAmTomShaw/f1-race-replay</a>
|
| 228 |
+
<p class="text-secondary-var text-sm mt-1">Replay F1 races in 3D using data.</p>
|
| 229 |
+
<div class="flex items-center space-x-3 text-xs text-secondary-var mt-2">
|
| 230 |
+
<span class="text-color-var">JavaScript</span>
|
| 231 |
+
<span>⭐ 1.5k</span>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
<button class="flex items-center px-3 py-1 text-sm border border-color-var rounded-lg hover:bg-active-var transition-colors-theme text-color-var">
|
| 235 |
+
<span class="material-symbols-rounded text-base mr-1">star</span> Star
|
| 236 |
+
</button>
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
</div>
|
| 240 |
+
|
| 241 |
+
</div>
|
| 242 |
+
</div>
|
| 243 |
+
|
| 244 |
+
<div class="lg:col-span-1 space-y-8 order-3">
|
| 245 |
+
|
| 246 |
+
<a href="/mindus/nexus/deploy_new_app"
|
| 247 |
+
class="w-full inline-flex items-center justify-center px-3 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 248 |
+
<span class="material-symbols-rounded text-base mr-1">rocket_launch</span>
|
| 249 |
+
Deploy new app
|
| 250 |
+
</a>
|
| 251 |
+
|
| 252 |
+
<div class="bg-card-var p-4 rounded-lg border border-color-var transition-colors-theme">
|
| 253 |
+
<h2 class="text-lg font-semibold text-color-var mb-4 border-b pb-2 border-color-var/50">Latest from our changelog</h2>
|
| 254 |
+
|
| 255 |
+
<div class="space-y-4 text-sm">
|
| 256 |
+
<div class="pb-2 border-b border-color-var/50">
|
| 257 |
+
<p class="text-secondary-var text-xs mb-1">3 days ago</p>
|
| 258 |
+
<p class="text-color-var font-medium">Gemini 3 Pro is now available in Visual Studio...</p>
|
| 259 |
+
</div>
|
| 260 |
+
<div class="pb-2 border-b border-color-var/50">
|
| 261 |
+
<p class="text-secondary-var text-xs mb-1">3 days ago</p>
|
| 262 |
+
<p class="text-color-var font-medium">Better diagnostics for VNET injected runners and...</p>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="pb-2 border-b border-color-var/50">
|
| 265 |
+
<p class="text-secondary-var text-xs mb-1">3 days ago</p>
|
| 266 |
+
<p class="text-color-var font-medium">Review commit-by-commit, improved...</p>
|
| 267 |
+
</div>
|
| 268 |
+
<div>
|
| 269 |
+
<p class="text-secondary-var text-xs mb-1">4 days ago</p>
|
| 270 |
+
<p class="text-color-var font-medium">Post as Admin now available in GitHub...</p>
|
| 271 |
+
</div>
|
| 272 |
+
</div>
|
| 273 |
+
|
| 274 |
+
<a href="#" class="block mt-4 text-link-var text-sm hover:underline">View changelog →</a>
|
| 275 |
+
</div>
|
| 276 |
+
</div>
|
| 277 |
+
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
|
| 281 |
+
<footer class="mt-auto w-full bg-header-var border-t border-color-var transition-colors-theme py-4">
|
| 282 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-sm">
|
| 283 |
+
<p class="text-secondary-var mb-2">© 2025 GitForge, Inc.</p>
|
| 284 |
+
<nav class="space-x-4">
|
| 285 |
+
<a href="/mindus/nexus/conditions_utilisation" class="text-link-var hover:text-link-hover-var">Terms of Service</a>
|
| 286 |
+
<a href="/mindus/nexus/mentions_legales" class="text-link-var hover:text-link-hover-var">Legal Notices</a>
|
| 287 |
+
<a href="/mindus/nexus/politique_confidentialite" class="text-link-var hover:text-link-hover-var">Privacy Policy</a>
|
| 288 |
+
</nav>
|
| 289 |
+
</div>
|
| 290 |
+
</footer>
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
<script>
|
| 294 |
+
// --- FONCTIONNALITÉ : GitForge Copilot Redirection ---
|
| 295 |
+
const redirectToCopilot = () => {
|
| 296 |
+
const inputElement = document.getElementById('copilot-input');
|
| 297 |
+
const query = inputElement.value.trim();
|
| 298 |
+
|
| 299 |
+
let url = '/mindus/nexus/gitforge_copilot';
|
| 300 |
+
if (query) {
|
| 301 |
+
url += `?query=${encodeURIComponent(query)}`;
|
| 302 |
+
}
|
| 303 |
+
// Simuler une action car la fonction réelle est dans le backend
|
| 304 |
+
console.log(`Redirecting/Handling Copilot Query: ${query}`);
|
| 305 |
+
// window.location.href = url;
|
| 306 |
+
};
|
| 307 |
+
|
| 308 |
+
// Permettre la redirection en appuyant sur 'Entrée' dans le champ de saisie
|
| 309 |
+
const handleCopilotInput = (event) => {
|
| 310 |
+
if (event.key === 'Enter') {
|
| 311 |
+
redirectToCopilot();
|
| 312 |
+
}
|
| 313 |
+
};
|
| 314 |
+
|
| 315 |
+
// Function to render a single repository *ADAPTÉ À LA SIDEBAR*
|
| 316 |
+
const renderRepository = (repo, user_context) => {
|
| 317 |
+
// La sidebar n'affiche que le nom du dépôt, pas toutes les infos
|
| 318 |
+
const repoPath = `/mindus/nexus/repo_files?repo_slug=${repo.repo_slug}`;
|
| 319 |
+
|
| 320 |
+
return `
|
| 321 |
+
<a href="${repoPath}" class="sidebar-repo-link">
|
| 322 |
+
<span class="material-symbols-rounded">folder</span> ${user_context}/${repo.repo_slug}
|
| 323 |
+
</a>
|
| 324 |
+
`;
|
| 325 |
+
};
|
| 326 |
+
|
| 327 |
+
// --- DYNAMIC LOADING OF REPOSITORIES AND USER PROFILE (CONSERVÉ ET ADAPTÉ) ---
|
| 328 |
+
const loadUserRepositories = async () => {
|
| 329 |
+
const repositoriesList = document.getElementById('repositories-list');
|
| 330 |
+
const loadingMessage = document.getElementById('loading-repos');
|
| 331 |
+
const noReposMessage = document.getElementById('no-repos-message');
|
| 332 |
+
let user_context = "mindus0"; // Default value
|
| 333 |
+
|
| 334 |
+
// 1. Fetch user info (for username) - Conservé pour l'URL de lien du repo
|
| 335 |
+
try {
|
| 336 |
+
const profileResponse = await fetch('/api/profile', { method: 'GET' });
|
| 337 |
+
if (profileResponse.ok) {
|
| 338 |
+
const profileData = await profileResponse.json();
|
| 339 |
+
if (profileData.success) {
|
| 340 |
+
user_context = profileData.user.username; // Use the actual username
|
| 341 |
+
}
|
| 342 |
+
}
|
| 343 |
+
} catch (error) {
|
| 344 |
+
console.error("Error loading user profile:", error);
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
// 2. Fetch repository list via /api/repos (CONSERVÉ ET CONFIRMÉ)
|
| 348 |
+
try {
|
| 349 |
+
const response = await fetch('/api/repos');
|
| 350 |
+
const data = await response.json();
|
| 351 |
+
|
| 352 |
+
// Hide loading indicator
|
| 353 |
+
loadingMessage.classList.add('hidden');
|
| 354 |
+
|
| 355 |
+
if (data.success && data.repos.length > 0) {
|
| 356 |
+
// Fill repository list
|
| 357 |
+
const reposHtml = data.repos.map(repo => renderRepository(repo, user_context)).join('');
|
| 358 |
+
repositoriesList.innerHTML = reposHtml;
|
| 359 |
+
repositoriesList.classList.remove('hidden');
|
| 360 |
+
noReposMessage.classList.add('hidden');
|
| 361 |
+
} else {
|
| 362 |
+
// Show no repositories message
|
| 363 |
+
repositoriesList.innerHTML = '';
|
| 364 |
+
repositoriesList.classList.add('hidden');
|
| 365 |
+
noReposMessage.classList.remove('hidden');
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
} catch (error) {
|
| 369 |
+
console.error("Error loading repositories:", error);
|
| 370 |
+
loadingMessage.classList.add('hidden');
|
| 371 |
+
repositoriesList.innerHTML = `<p class="text-red-500 text-center text-sm">Failed to load repositories. Please try again.</p>`;
|
| 372 |
+
}
|
| 373 |
+
};
|
| 374 |
+
|
| 375 |
+
// Call functions on page load (SEULEMENT loadUserRepositories est conservé)
|
| 376 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 377 |
+
loadUserRepositories();
|
| 378 |
+
});
|
| 379 |
+
</script>
|
| 380 |
+
</body>
|
| 381 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/dependencies.html
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Insights - Dependency Graph</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 10 |
+
<link rel="stylesheet"
|
| 11 |
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 12 |
+
<script src="https://unpkg.com/@popperjs/core@2"></script>
|
| 13 |
+
<script src="https://unpkg.com/tippy.js@6"></script>
|
| 14 |
+
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/dist/tippy.css" />
|
| 15 |
+
<style>
|
| 16 |
+
/* Inter Font Configuration */
|
| 17 |
+
body { font-family: 'Inter', sans-serif; }
|
| 18 |
+
|
| 19 |
+
/* Theme Variables and Transitions (Light Mode) */
|
| 20 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 21 |
+
|
| 22 |
+
.light {
|
| 23 |
+
--bg-page: #FFFFFF;
|
| 24 |
+
--bg-header: #F6F8FA;
|
| 25 |
+
--bg-card: #FFFFFF;
|
| 26 |
+
--bg-active: #F3F4F6;
|
| 27 |
+
--border-color: #D0D7DE;
|
| 28 |
+
--text-color: #24292F;
|
| 29 |
+
--text-secondary: #57606A;
|
| 30 |
+
--text-link: #0969DA;
|
| 31 |
+
--primary-color: #0969DA;
|
| 32 |
+
--primary-hover: #075ECF;
|
| 33 |
+
--btn-green: #2DA44E; /* Bouton "Enable dependency graph" */
|
| 34 |
+
--btn-green-hover: #2C974B;
|
| 35 |
+
--bg-sidebar-active: #E6F0FF; /* Style pour le lien actif dans la barre latérale Insights */
|
| 36 |
+
--text-sidebar-active: #0969DA;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* Utility classes for theme variables */
|
| 40 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 41 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 42 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 43 |
+
.text-link-var { color: var(--text-link); }
|
| 44 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 45 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 46 |
+
.focus\:ring-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 47 |
+
|
| 48 |
+
/* Repository Navigation Link Styles */
|
| 49 |
+
.repo-nav-link {
|
| 50 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 51 |
+
margin-right: 0.5rem;
|
| 52 |
+
white-space: nowrap;
|
| 53 |
+
}
|
| 54 |
+
.repo-nav-link.active {
|
| 55 |
+
border-bottom-color: #F78166; /* Vibrant orange/red for active tab */
|
| 56 |
+
color: var(--text-color) !important;
|
| 57 |
+
font-weight: 600;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
/* Insights Sidebar Styles (specific to this page) */
|
| 61 |
+
.insights-nav-link {
|
| 62 |
+
display: block;
|
| 63 |
+
padding: 0.5rem 0.75rem;
|
| 64 |
+
border-radius: 0.375rem; /* rounded-lg */
|
| 65 |
+
color: var(--text-color);
|
| 66 |
+
transition: background-color 0.15s;
|
| 67 |
+
font-size: 0.875rem; /* text-sm */
|
| 68 |
+
}
|
| 69 |
+
.insights-nav-link:hover:not(.active) {
|
| 70 |
+
background-color: var(--bg-active);
|
| 71 |
+
}
|
| 72 |
+
.insights-nav-link.active {
|
| 73 |
+
background-color: var(--bg-sidebar-active);
|
| 74 |
+
color: var(--text-sidebar-active);
|
| 75 |
+
font-weight: 600;
|
| 76 |
+
}
|
| 77 |
+
/* Styles for disabled/Pro features */
|
| 78 |
+
.pro-feature {
|
| 79 |
+
opacity: 0.6; /* Slight dimming for Pro features */
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
/* Responsive Sidebar Logic (copied from existing file) */
|
| 83 |
+
#sidebar {
|
| 84 |
+
position: fixed;
|
| 85 |
+
top: 0;
|
| 86 |
+
left: 0;
|
| 87 |
+
width: 300px;
|
| 88 |
+
height: 100%;
|
| 89 |
+
background-color: var(--bg-card);
|
| 90 |
+
transform: translateX(-100%);
|
| 91 |
+
transition: transform 0.3s ease-in-out;
|
| 92 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 93 |
+
z-index: 100;
|
| 94 |
+
}
|
| 95 |
+
#sidebar.open {
|
| 96 |
+
transform: translateX(0);
|
| 97 |
+
}
|
| 98 |
+
#overlay {
|
| 99 |
+
position: fixed;
|
| 100 |
+
top: 0;
|
| 101 |
+
left: 0;
|
| 102 |
+
width: 100%;
|
| 103 |
+
height: 100%;
|
| 104 |
+
background: rgba(0, 0, 0, 0.5);
|
| 105 |
+
z-index: 90;
|
| 106 |
+
display: none;
|
| 107 |
+
}
|
| 108 |
+
#overlay.open {
|
| 109 |
+
display: block;
|
| 110 |
+
}
|
| 111 |
+
</style>
|
| 112 |
+
</head>
|
| 113 |
+
|
| 114 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 115 |
+
|
| 116 |
+
<div id="overlay"></div>
|
| 117 |
+
|
| 118 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 119 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 120 |
+
<i data-lucide="git-fork" class="text-3xl text-link-var"></i>
|
| 121 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 122 |
+
<i data-lucide="x" class="text-2xl"></i>
|
| 123 |
+
</button>
|
| 124 |
+
</div>
|
| 125 |
+
|
| 126 |
+
<nav class="space-y-1">
|
| 127 |
+
<a href="/mindus/nexus/dashboard?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 128 |
+
<i data-lucide="home" class="w-5 h-5 mr-3"></i> Home
|
| 129 |
+
</a>
|
| 130 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 131 |
+
<i data-lucide="alert-circle" class="w-5 h-5 mr-3"></i> Issues
|
| 132 |
+
</a>
|
| 133 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 134 |
+
<i data-lucide="git-pull-request" class="w-5 h-5 mr-3"></i> Pull requests
|
| 135 |
+
</a>
|
| 136 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 137 |
+
<i data-lucide="layout-grid" class="w-5 h-5 mr-3"></i> Projects
|
| 138 |
+
</a>
|
| 139 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 140 |
+
<i data-lucide="message-square" class="w-5 h-5 mr-3"></i> Discussions
|
| 141 |
+
</a>
|
| 142 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 143 |
+
<i data-lucide="code" class="w-5 h-5 mr-3"></i> Codespaces
|
| 144 |
+
</a>
|
| 145 |
+
<a href="/mindus/nexus/gitforge_copilot" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 146 |
+
<i data-lucide="cpu" class="w-5 h-5 mr-3"></i> Copilot
|
| 147 |
+
</a>
|
| 148 |
+
</nav>
|
| 149 |
+
|
| 150 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 151 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 152 |
+
<i data-lucide="compass" class="w-5 h-5 mr-3"></i> Explore
|
| 153 |
+
</a>
|
| 154 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 155 |
+
<i data-lucide="store" class="w-5 h-5 mr-3"></i> Marketplace
|
| 156 |
+
</a>
|
| 157 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 158 |
+
<i data-lucide="link" class="w-5 h-5 mr-3"></i> MCP registry
|
| 159 |
+
</a>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 164 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 165 |
+
<div class="flex justify-between items-center h-16">
|
| 166 |
+
|
| 167 |
+
<div class="flex items-center space-x-4">
|
| 168 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 169 |
+
<i data-lucide="menu" class="w-6 h-6"></i>
|
| 170 |
+
</button>
|
| 171 |
+
|
| 172 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 173 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 174 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 175 |
+
<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>
|
| 176 |
+
<i data-lucide="lock" class="w-4 h-4 ml-2 text-secondary-var"></i>
|
| 177 |
+
</a>
|
| 178 |
+
</div>
|
| 179 |
+
|
| 180 |
+
<div class="flex items-center space-x-3">
|
| 181 |
+
<div class="hidden sm:block">
|
| 182 |
+
<input type="text" placeholder="Type / to search"
|
| 183 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 184 |
+
</div>
|
| 185 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 186 |
+
<i data-lucide="bell" class="w-5 h-5"></i>
|
| 187 |
+
</a>
|
| 188 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 189 |
+
<i data-lucide="plus" class="w-5 h-5"></i>
|
| 190 |
+
</a>
|
| 191 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 192 |
+
<i data-lucide="user-circle" class="w-5 h-5"></i>
|
| 193 |
+
</a>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
</div>
|
| 197 |
+
|
| 198 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 199 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 200 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 201 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 202 |
+
<i data-lucide="code" class="w-4 h-4 mr-1"></i> Code
|
| 203 |
+
</a>
|
| 204 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 205 |
+
<i data-lucide="alert-circle" class="w-4 h-4 mr-1"></i> Issues
|
| 206 |
+
</a>
|
| 207 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 208 |
+
<i data-lucide="git-pull-request" class="w-4 h-4 mr-1"></i> Pull requests
|
| 209 |
+
</a>
|
| 210 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 211 |
+
<i data-lucide="check-square" class="w-4 h-4 mr-1"></i> Actions
|
| 212 |
+
</a>
|
| 213 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 214 |
+
<i data-lucide="box" class="w-4 h-4 mr-1"></i> Projects
|
| 215 |
+
</a>
|
| 216 |
+
<a href="/mindus/nexus/security?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 217 |
+
<i data-lucide="shield" class="w-4 h-4 mr-1"></i> Security
|
| 218 |
+
</a>
|
| 219 |
+
<a href="/mindus/nexus/dependencies?repo_slug={{ repo_slug }}" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 220 |
+
<i data-lucide="trending-up" class="w-4 h-4 mr-1"></i> Insights
|
| 221 |
+
</a>
|
| 222 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 223 |
+
<i data-lucide="settings" class="w-4 h-4 mr-1"></i> Settings
|
| 224 |
+
</a>
|
| 225 |
+
</nav>
|
| 226 |
+
</div>
|
| 227 |
+
</div>
|
| 228 |
+
</header>
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 232 |
+
|
| 233 |
+
<div class="flex">
|
| 234 |
+
<aside class="w-56 pr-6 border-r border-color-var/50 hidden lg:block flex-shrink-0">
|
| 235 |
+
<nav class="space-y-1">
|
| 236 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Pulse.">
|
| 237 |
+
Pulse
|
| 238 |
+
</a>
|
| 239 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Contributors.">
|
| 240 |
+
Contributors
|
| 241 |
+
</a>
|
| 242 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Community.">
|
| 243 |
+
Community
|
| 244 |
+
</a>
|
| 245 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Traffic.">
|
| 246 |
+
Traffic
|
| 247 |
+
</a>
|
| 248 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Commits.">
|
| 249 |
+
Commits
|
| 250 |
+
</a>
|
| 251 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Code frequency.">
|
| 252 |
+
Code frequency
|
| 253 |
+
</a>
|
| 254 |
+
|
| 255 |
+
<a href="#" class="insights-nav-link active">
|
| 256 |
+
Dependency graph
|
| 257 |
+
</a>
|
| 258 |
+
|
| 259 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Network.">
|
| 260 |
+
Network
|
| 261 |
+
</a>
|
| 262 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Forks.">
|
| 263 |
+
Forks
|
| 264 |
+
</a>
|
| 265 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Actions usage metrics.">
|
| 266 |
+
Actions usage metrics
|
| 267 |
+
</a>
|
| 268 |
+
<a href="#" class="insights-nav-link pro-feature" data-tippy-content="Upgrade to GitForge Pro to access Actions performance metrics.">
|
| 269 |
+
Actions performance metrics
|
| 270 |
+
</a>
|
| 271 |
+
</nav>
|
| 272 |
+
</aside>
|
| 273 |
+
|
| 274 |
+
<div class="flex-grow pl-6 min-w-0">
|
| 275 |
+
<h1 class="text-2xl font-semibold text-color-var mb-4">Dependency graph</h1>
|
| 276 |
+
|
| 277 |
+
<div class="border-b border-color-var/50 mb-6">
|
| 278 |
+
<nav class="flex space-x-6 text-sm font-medium">
|
| 279 |
+
<a href="#" class="pb-2 border-b-2 border-link-var text-color-var font-semibold transition-colors-theme">Dependencies</a>
|
| 280 |
+
|
| 281 |
+
<a href="#" class="pb-2 border-b-2 border-transparent text-secondary-var hover:border-color-var transition-colors-theme">Dependabot</a>
|
| 282 |
+
</nav>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<div class="flex flex-col items-center justify-center p-12 text-center border border-color-var rounded-lg bg-page-var">
|
| 286 |
+
<i data-lucide="package-search" class="w-12 h-12 text-secondary-var mb-4"></i>
|
| 287 |
+
<h2 class="text-xl font-semibold text-color-var mb-3">Dependency graph is disabled</h2>
|
| 288 |
+
<p class="text-secondary-var mb-6">
|
| 289 |
+
Track this repository's <a href="#" class="text-link-var font-medium hover:underline">dependencies</a> and sub-dependencies.
|
| 290 |
+
</p>
|
| 291 |
+
<button class="inline-flex items-center justify-center px-4 py-2 text-sm text-white font-semibold rounded-lg transition duration-150 whitespace-nowrap"
|
| 292 |
+
style="background-color: var(--btn-green); hover:background-color: var(--btn-green-hover);">
|
| 293 |
+
Enable the dependency graph
|
| 294 |
+
</button>
|
| 295 |
+
<a href="#" class="text-sm text-link-var font-medium hover:underline mt-4">
|
| 296 |
+
Learn more about how we use your data.
|
| 297 |
+
</a>
|
| 298 |
+
</div>
|
| 299 |
+
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
</main>
|
| 303 |
+
|
| 304 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 305 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 306 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 307 |
+
<i data-lucide="git-fork" class="w-5 h-5"></i>
|
| 308 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 309 |
+
</div>
|
| 310 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 311 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 312 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Privacy</a>
|
| 313 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Security</a>
|
| 314 |
+
<a href="/mindus/nexus/statut" class="hover:text-link-var">Status</a>
|
| 315 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 316 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 317 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 318 |
+
</nav>
|
| 319 |
+
</div>
|
| 320 |
+
</footer>
|
| 321 |
+
|
| 322 |
+
<script>
|
| 323 |
+
// Initialiser Lucide Icons
|
| 324 |
+
lucide.createIcons();
|
| 325 |
+
|
| 326 |
+
// ----------------------------------------------------------------------
|
| 327 |
+
// SIDEBAR LOGIC (inchangée)
|
| 328 |
+
// ----------------------------------------------------------------------
|
| 329 |
+
const sidebar = document.getElementById('sidebar');
|
| 330 |
+
const overlay = document.getElementById('overlay');
|
| 331 |
+
const openButton = document.getElementById('open-sidebar');
|
| 332 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 333 |
+
|
| 334 |
+
const toggleSidebar = () => {
|
| 335 |
+
sidebar.classList.toggle('open');
|
| 336 |
+
overlay.classList.toggle('open');
|
| 337 |
+
};
|
| 338 |
+
|
| 339 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 340 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 341 |
+
overlay.addEventListener('click', toggleSidebar);
|
| 342 |
+
|
| 343 |
+
const body = document.body;
|
| 344 |
+
const observer = new MutationObserver(() => {
|
| 345 |
+
if (sidebar.classList.contains('open')) {
|
| 346 |
+
body.style.overflow = 'hidden';
|
| 347 |
+
} else {
|
| 348 |
+
body.style.overflow = '';
|
| 349 |
+
}
|
| 350 |
+
});
|
| 351 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 352 |
+
|
| 353 |
+
// ----------------------------------------------------------------------
|
| 354 |
+
// TIPPY.JS (Tooltips pour fonctionnalités Pro)
|
| 355 |
+
// ----------------------------------------------------------------------
|
| 356 |
+
tippy('.pro-feature', {
|
| 357 |
+
placement: 'right',
|
| 358 |
+
theme: 'dark',
|
| 359 |
+
duration: [100, 100],
|
| 360 |
+
onShow(instance) {
|
| 361 |
+
// Empêche l'affichage du tooltip si la fenêtre est trop petite (mobile)
|
| 362 |
+
// où la sidebar Insights n'est pas visible.
|
| 363 |
+
if (window.innerWidth < 1024) { // 1024px est la breakpoint 'lg'
|
| 364 |
+
return false;
|
| 365 |
+
}
|
| 366 |
+
},
|
| 367 |
+
});
|
| 368 |
+
|
| 369 |
+
</script>
|
| 370 |
+
</body>
|
| 371 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/devops.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/devsecops.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/documentation.html
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Documentation API - GitForge</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
body { font-family: 'Inter', sans-serif; }
|
| 11 |
+
.code-block {
|
| 12 |
+
background-color: #1f2937; /* gray-800 */
|
| 13 |
+
border: 1px solid #3b82f6; /* blue-500 */
|
| 14 |
+
padding: 1rem;
|
| 15 |
+
/* Suppression des bords arrondis pour un look carré */
|
| 16 |
+
overflow-x: auto;
|
| 17 |
+
margin-top: 0.75rem;
|
| 18 |
+
}
|
| 19 |
+
</style>
|
| 20 |
+
</head>
|
| 21 |
+
<body class="bg-gray-900 text-white min-h-screen">
|
| 22 |
+
|
| 23 |
+
<div class="container mx-auto p-4 sm:p-6 lg:p-8 max-w-6xl">
|
| 24 |
+
|
| 25 |
+
<header class="flex flex-col sm:flex-row justify-between items-center py-4 border-b border-blue-500/50 mb-8">
|
| 26 |
+
<a href="/" class="text-4xl font-extrabold text-blue-500 tracking-wider mb-4 sm:mb-0">
|
| 27 |
+
GitForge
|
| 28 |
+
</a>
|
| 29 |
+
<nav class="flex items-center space-x-4">
|
| 30 |
+
<a href="/mindus/nexus/tarifs" class="px-4 py-2 text-white hover:text-blue-300 transition duration-200 font-medium">
|
| 31 |
+
Tarifs
|
| 32 |
+
</a>
|
| 33 |
+
<a href="/mindus/nexus/a-propos" class="px-4 py-2 text-white hover:text-blue-300 transition duration-200 font-medium">
|
| 34 |
+
À Propos
|
| 35 |
+
</a>
|
| 36 |
+
{% if is_logged_in %}
|
| 37 |
+
<a href="/mindus/nexus/dashboard" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 font-medium transition duration-200">
|
| 38 |
+
Dashboard
|
| 39 |
+
</a>
|
| 40 |
+
{% else %}
|
| 41 |
+
<a href="/mindus/nexus/connexion" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 font-medium transition duration-200">
|
| 42 |
+
Connexion
|
| 43 |
+
</a>
|
| 44 |
+
{% endif %}
|
| 45 |
+
</nav>
|
| 46 |
+
</header>
|
| 47 |
+
|
| 48 |
+
<main class="space-y-16">
|
| 49 |
+
|
| 50 |
+
<section class="text-center p-8 bg-gray-800/50 shadow-lg border border-gray-700">
|
| 51 |
+
<h1 class="text-5xl font-extrabold text-white mb-4 leading-tight">
|
| 52 |
+
Documentation de l'API Nexus
|
| 53 |
+
</h1>
|
| 54 |
+
<p class="text-xl text-gray-300 max-w-4xl mx-auto">
|
| 55 |
+
Le guide complet pour intégrer l'authentification et la gestion utilisateur la plus sécurisée du marché dans vos applications, quel que soit votre langage.
|
| 56 |
+
</p>
|
| 57 |
+
</section>
|
| 58 |
+
|
| 59 |
+
<section class="space-y-6">
|
| 60 |
+
<h2 class="text-4xl font-extrabold text-blue-500 border-b-2 border-gray-700 pb-3">
|
| 61 |
+
1. Vue d'Ensemble & Clés API
|
| 62 |
+
</h2>
|
| 63 |
+
<p class="text-gray-300">
|
| 64 |
+
L'API Nexus est structurée autour d'une ressource unique pour l'authentification. Tous les appels nécessitent votre **Clé API** (`X-API-KEY`) pour l'identification de votre application, et un **Token JWT** pour les actions utilisateur spécifiques.
|
| 65 |
+
</p>
|
| 66 |
+
|
| 67 |
+
<div class="grid md:grid-cols-2 gap-6">
|
| 68 |
+
<div class="p-4 bg-gray-800 border-l-4 border-teal-500 shadow-md">
|
| 69 |
+
<h3 class="text-xl font-semibold text-teal-400 mb-2">Endpoint de Base :</h3>
|
| 70 |
+
<p class="font-mono text-sm code-block p-2 border-none">
|
| 71 |
+
<code class="text-gray-100">https://api.nexus-pro.com/v1/auth</code>
|
| 72 |
+
</p>
|
| 73 |
+
<p class="text-xs text-gray-400 mt-2">Ce chemin est la base de toutes les opérations d'authentification.</p>
|
| 74 |
+
</div>
|
| 75 |
+
<div class="p-4 bg-gray-800 border-l-4 border-yellow-500 shadow-md">
|
| 76 |
+
<h3 class="text-xl font-semibold text-yellow-400 mb-2">Clé API (Sécurité) :</h3>
|
| 77 |
+
<p class="font-mono text-sm code-block p-2 border-none">
|
| 78 |
+
<code class="text-gray-100">X-API-KEY: VOTRE_CLE_API_SECRETE</code>
|
| 79 |
+
</p>
|
| 80 |
+
<p class="text-xs text-gray-400 mt-2">À inclure dans l'entête de chaque requête (sauf mention contraire).</p>
|
| 81 |
+
</div>
|
| 82 |
+
</div>
|
| 83 |
+
</section>
|
| 84 |
+
|
| 85 |
+
<section class="space-y-8">
|
| 86 |
+
<h2 class="text-4xl font-extrabold text-blue-500 border-b-2 border-gray-700 pb-3">
|
| 87 |
+
2. Flux d'Authentification
|
| 88 |
+
</h2>
|
| 89 |
+
|
| 90 |
+
<h3 class="text-2xl font-semibold text-white border-b border-gray-800 pb-1">
|
| 91 |
+
2.1 S'inscrire (POST /register)
|
| 92 |
+
</h3>
|
| 93 |
+
<p class="text-gray-300">
|
| 94 |
+
Crée un nouvel utilisateur. Le système retourne le token JWT si l'inscription est réussie.
|
| 95 |
+
</p>
|
| 96 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 97 |
+
<div>
|
| 98 |
+
<p class="text-lg font-bold text-teal-400 mb-2">cURL (Exemple Rapide)</p>
|
| 99 |
+
<pre class="code-block"><code class="language-bash">curl -X POST "https://api.nexus-pro.com/v1/auth/register" \
|
| 100 |
+
-H "X-API-KEY: VOTRE_CLE_API_SECRETE" \
|
| 101 |
+
-H "Content-Type: application/json" \
|
| 102 |
+
-d '{
|
| 103 |
+
"email": "utilisateur@exemple.com",
|
| 104 |
+
"password": "motdepassefort123"
|
| 105 |
+
}'</code></pre>
|
| 106 |
+
</div>
|
| 107 |
+
<div>
|
| 108 |
+
<p class="text-lg font-bold text-teal-400 mb-2">Python (`requests`)</p>
|
| 109 |
+
<pre class="code-block"><code class="language-python">import requests
|
| 110 |
+
import json
|
| 111 |
+
url = "https://api.nexus-pro.com/v1/auth/register"
|
| 112 |
+
headers = {
|
| 113 |
+
"X-API-KEY": "VOTRE_CLE_API_SECRETE",
|
| 114 |
+
"Content-Type": "application/json"
|
| 115 |
+
}
|
| 116 |
+
payload = {"email": "user@example.com", "password": "strongpassword123"}
|
| 117 |
+
response = requests.post(url, headers=headers, json=payload)
|
| 118 |
+
print(response.json())</code></pre>
|
| 119 |
+
</div>
|
| 120 |
+
<div class="md:col-span-2">
|
| 121 |
+
<p class="text-lg font-bold text-teal-400 mb-2">JavaScript (Fetch)</p>
|
| 122 |
+
<pre class="code-block"><code class="language-javascript">const url = 'https://api.nexus-pro.com/v1/auth/register';
|
| 123 |
+
const response = await fetch(url, {
|
| 124 |
+
method: 'POST',
|
| 125 |
+
headers: {
|
| 126 |
+
'X-API-KEY': 'VOTRE_CLE_API_SECRETE',
|
| 127 |
+
'Content-Type': 'application/json'
|
| 128 |
+
},
|
| 129 |
+
body: JSON.stringify({
|
| 130 |
+
email: 'user@example.com',
|
| 131 |
+
password: 'strongpassword123'
|
| 132 |
+
})
|
| 133 |
+
});
|
| 134 |
+
const data = await response.json();
|
| 135 |
+
console.log(data);</code></pre>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<h3 class="text-2xl font-semibold text-white border-b border-gray-800 pb-1 pt-6">
|
| 140 |
+
2.2 Se connecter (POST /login)
|
| 141 |
+
</h3>
|
| 142 |
+
<p class="text-gray-300">
|
| 143 |
+
Authentifie un utilisateur existant. La réponse contient le **Token JWT** pour les requêtes futures.
|
| 144 |
+
</p>
|
| 145 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 146 |
+
<div>
|
| 147 |
+
<p class="text-lg font-bold text-teal-400 mb-2">cURL</p>
|
| 148 |
+
<pre class="code-block"><code class="language-bash">curl -X POST "https://api.nexus-pro.com/v1/auth/login" \
|
| 149 |
+
-H "X-API-KEY: VOTRE_CLE_API_SECRETE" \
|
| 150 |
+
-H "Content-Type: application/json" \
|
| 151 |
+
-d '{
|
| 152 |
+
"email": "utilisateur@exemple.com",
|
| 153 |
+
"password": "motdepassefort123"
|
| 154 |
+
}'</code></pre>
|
| 155 |
+
</div>
|
| 156 |
+
<div>
|
| 157 |
+
<p class="text-lg font-bold text-teal-400 mb-2">Python (`requests`)</p>
|
| 158 |
+
<pre class="code-block"><code class="language-python">import requests
|
| 159 |
+
url = "https://api.nexus-pro.com/v1/auth/login"
|
| 160 |
+
headers = {
|
| 161 |
+
"X-API-KEY": "VOTRE_CLE_API_SECRETE",
|
| 162 |
+
"Content-Type": "application/json"
|
| 163 |
+
}
|
| 164 |
+
payload = {"email": "user@example.com", "password": "strongpassword123"}
|
| 165 |
+
response = requests.post(url, headers=headers, json=payload)
|
| 166 |
+
token = response.json().get('jwt_token')
|
| 167 |
+
print(f"Token: {token}")</code></pre>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
</section>
|
| 171 |
+
|
| 172 |
+
<section class="space-y-8">
|
| 173 |
+
<h2 class="text-4xl font-extrabold text-blue-500 border-b-2 border-gray-700 pb-3">
|
| 174 |
+
3. Gestion des Données Utilisateur (Token Requis)
|
| 175 |
+
</h2>
|
| 176 |
+
<p class="text-gray-300">
|
| 177 |
+
Toutes les requêtes de cette section doivent inclure l'entête <strong class="text-yellow-400">`Authorization: Bearer VOTRE_TOKEN_JWT`</strong> obtenu lors de la connexion.
|
| 178 |
+
</p>
|
| 179 |
+
|
| 180 |
+
<h3 class="text-2xl font-semibold text-white border-b border-gray-800 pb-1">
|
| 181 |
+
3.1 Récupérer les Informations Utilisateur (GET /user)
|
| 182 |
+
</h3>
|
| 183 |
+
<p class="text-gray-300">
|
| 184 |
+
Récupère le profil de l'utilisateur associé au Token JWT fourni.
|
| 185 |
+
</p>
|
| 186 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 187 |
+
<div>
|
| 188 |
+
<p class="text-lg font-bold text-teal-400 mb-2">cURL</p>
|
| 189 |
+
<pre class="code-block"><code class="language-bash">curl -X GET "https://api.nexus-pro.com/v1/auth/user" \
|
| 190 |
+
-H "Authorization: Bearer VOTRE_TOKEN_JWT"</code></pre>
|
| 191 |
+
</div>
|
| 192 |
+
<div>
|
| 193 |
+
<p class="text-lg font-bold text-teal-400 mb-2">JavaScript (Fetch)</p>
|
| 194 |
+
<pre class="code-block"><code class="language-javascript">const url = 'https://api.nexus-pro.com/v1/auth/user';
|
| 195 |
+
const userToken = localStorage.getItem('nexus_jwt'); // Exemple de récupération
|
| 196 |
+
const response = await fetch(url, {
|
| 197 |
+
method: 'GET',
|
| 198 |
+
headers: { 'Authorization': `Bearer ${userToken}` }
|
| 199 |
+
});
|
| 200 |
+
const data = await response.json();
|
| 201 |
+
console.log(data);</code></pre>
|
| 202 |
+
</div>
|
| 203 |
+
</div>
|
| 204 |
+
|
| 205 |
+
<h3 class="text-2xl font-semibold text-white border-b border-gray-800 pb-1 pt-6">
|
| 206 |
+
3.2 Mettre à Jour les Informations (PUT /user/update)
|
| 207 |
+
</h3>
|
| 208 |
+
<p class="text-gray-300">
|
| 209 |
+
Permet de modifier les informations de l'utilisateur (nom, prénom, etc.). Seuls les champs fournis sont mis à jour.
|
| 210 |
+
</p>
|
| 211 |
+
<div class="grid md:grid-cols-2 gap-8">
|
| 212 |
+
<div>
|
| 213 |
+
<p class="text-lg font-bold text-teal-400 mb-2">cURL</p>
|
| 214 |
+
<pre class="code-block"><code class="language-bash">curl -X PUT "https://api.nexus-pro.com/v1/auth/user/update" \
|
| 215 |
+
-H "Authorization: Bearer VOTRE_TOKEN_JWT" \
|
| 216 |
+
-H "Content-Type: application/json" \
|
| 217 |
+
-d '{
|
| 218 |
+
"first_name": "Jean",
|
| 219 |
+
"last_name": "Dupont"
|
| 220 |
+
}'</code></pre>
|
| 221 |
+
</div>
|
| 222 |
+
<div>
|
| 223 |
+
<p class="text-lg font-bold text-teal-400 mb-2">Python (`requests`)</p>
|
| 224 |
+
<pre class="code-block"><code class="language-python">import requests
|
| 225 |
+
url = "https://api.nexus-pro.com/v1/auth/user/update"
|
| 226 |
+
token = "VOTRE_TOKEN_JWT"
|
| 227 |
+
headers = {
|
| 228 |
+
"Authorization": f"Bearer {token}",
|
| 229 |
+
"Content-Type": "application/json"
|
| 230 |
+
}
|
| 231 |
+
payload = {"first_name": "Jean", "last_name": "Dupont"}
|
| 232 |
+
response = requests.put(url, headers=headers, json=payload)
|
| 233 |
+
print(response.json())</code></pre>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
</section>
|
| 237 |
+
|
| 238 |
+
<section class="space-y-6">
|
| 239 |
+
<h2 class="text-4xl font-extrabold text-blue-500 border-b-2 border-gray-700 pb-3">
|
| 240 |
+
4. Logs, Erreurs et Tarification
|
| 241 |
+
</h2>
|
| 242 |
+
<h3 class="text-2xl font-semibold text-white border-b border-gray-800 pb-1">
|
| 243 |
+
Gestion des Erreurs
|
| 244 |
+
</h3>
|
| 245 |
+
<p class="text-gray-300">
|
| 246 |
+
Toutes les erreurs API sont retournées avec un code d'état HTTP standard (4xx pour les erreurs clients, 5xx pour les erreurs serveurs). Le corps de la réponse contiendra une description JSON détaillée de l'erreur.
|
| 247 |
+
</p>
|
| 248 |
+
<div class="code-block bg-gray-800/80 p-4 border-l-4 border-red-500 text-sm">
|
| 249 |
+
<pre><code class="language-json">{
|
| 250 |
+
"error": true,
|
| 251 |
+
"status_code": 401,
|
| 252 |
+
"message": "Token JWT manquant ou invalide. Veuillez vous reconnecter."
|
| 253 |
+
}</code></pre>
|
| 254 |
+
</div>
|
| 255 |
+
|
| 256 |
+
<h3 class="text-2xl font-semibold text-white border-b border-gray-800 pb-1 pt-6">
|
| 257 |
+
Accès aux Logs Détaillés
|
| 258 |
+
</h3>
|
| 259 |
+
<p class="text-gray-300">
|
| 260 |
+
Les utilisateurs du **Plan Professionnel** et supérieur bénéficient d'un accès à l'endpoint `/api-logs` pour un historique complet des tentatives de connexion, des échecs d'authentification et des activités du compte. Cette fonctionnalité est essentielle pour le monitoring de sécurité.
|
| 261 |
+
</p>
|
| 262 |
+
<div class="mt-4">
|
| 263 |
+
<a href="/mindus/nexus/tarifs" class="px-6 py-3 bg-teal-600 text-white text-lg font-bold shadow-md hover:bg-teal-700 transition duration-300">
|
| 264 |
+
Voir les Détails des Plans
|
| 265 |
+
</a>
|
| 266 |
+
</div>
|
| 267 |
+
</section>
|
| 268 |
+
|
| 269 |
+
</main>
|
| 270 |
+
|
| 271 |
+
<footer class="mt-12 pt-6 border-t border-gray-700 text-center text-gray-500 text-sm">
|
| 272 |
+
© 2024 Nexus. Documentation API.
|
| 273 |
+
</footer>
|
| 274 |
+
</div>
|
| 275 |
+
|
| 276 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
| 277 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/python.min.js"></script>
|
| 278 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/javascript.min.js"></script>
|
| 279 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/bash.min.js"></script>
|
| 280 |
+
<script>
|
| 281 |
+
// Active la coloration syntaxique après le chargement du DOM
|
| 282 |
+
hljs.highlightAll();
|
| 283 |
+
</script>
|
| 284 |
+
</body>
|
| 285 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/dynamic_and_static.html
ADDED
|
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 7 |
+
<title>GitForge - Deployment Instance</title>
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
| 10 |
+
<script>
|
| 11 |
+
tailwind.config = {
|
| 12 |
+
theme: {
|
| 13 |
+
extend: {
|
| 14 |
+
colors: {
|
| 15 |
+
'render-purple': '#5A3D97',
|
| 16 |
+
'render-light-purple': '#EFEBF8',
|
| 17 |
+
'render-text': '#4F4F4F',
|
| 18 |
+
'render-dark-text': '#333333',
|
| 19 |
+
'log-bg': '#1E1E1E',
|
| 20 |
+
'log-text': '#FFFFFF',
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
</script>
|
| 26 |
+
<style>
|
| 27 |
+
/* Styles personnalisés pour le défilement et le plein écran */
|
| 28 |
+
.log-card::-webkit-scrollbar {
|
| 29 |
+
width: 8px;
|
| 30 |
+
}
|
| 31 |
+
.log-card::-webkit-scrollbar-thumb {
|
| 32 |
+
background-color: #555;
|
| 33 |
+
border-radius: 4px;
|
| 34 |
+
}
|
| 35 |
+
.log-card::-webkit-scrollbar-track {
|
| 36 |
+
background-color: #1E1E1E;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* Classe pour le mode plein écran des logs */
|
| 40 |
+
.fullscreen-log {
|
| 41 |
+
position: fixed;
|
| 42 |
+
top: 0;
|
| 43 |
+
left: 0;
|
| 44 |
+
width: 100vw;
|
| 45 |
+
height: 100vh;
|
| 46 |
+
z-index: 1000; /* Assurez-vous qu'il soit au-dessus de tout */
|
| 47 |
+
padding: 1rem;
|
| 48 |
+
background-color: #1E1E1E; /* Pour couvrir le fond */
|
| 49 |
+
}
|
| 50 |
+
/* Ajout de styles pour assurer que tous les éléments aient des bords carrés si non géré par suppression de classes */
|
| 51 |
+
.squared-border {
|
| 52 |
+
border-radius: 0 !important;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/* Styles pour masquer/afficher la barre latérale sur mobile */
|
| 56 |
+
/* Masque la barre latérale par défaut sur les petits écrans (<= sm) */
|
| 57 |
+
.mobile-sidebar-hidden {
|
| 58 |
+
transform: translateX(-100%);
|
| 59 |
+
}
|
| 60 |
+
/* Affiche la barre latérale lorsqu'elle a la classe 'mobile-sidebar-shown' */
|
| 61 |
+
.mobile-sidebar-shown {
|
| 62 |
+
transform: translateX(0);
|
| 63 |
+
}
|
| 64 |
+
/* La barre latérale est toujours visible sur les écrans moyens et plus grands */
|
| 65 |
+
@media (min-width: 640px) {
|
| 66 |
+
.mobile-sidebar-hidden {
|
| 67 |
+
transform: translateX(0) !important;
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
/* Overlay pour les mobiles */
|
| 72 |
+
.mobile-overlay {
|
| 73 |
+
position: fixed;
|
| 74 |
+
top: 0;
|
| 75 |
+
left: 0;
|
| 76 |
+
width: 100%;
|
| 77 |
+
height: 100%;
|
| 78 |
+
background-color: rgba(0, 0, 0, 0.5);
|
| 79 |
+
z-index: 40; /* Sous la barre latérale (z-index: 50) */
|
| 80 |
+
}
|
| 81 |
+
</style>
|
| 82 |
+
</head>
|
| 83 |
+
<body class="bg-gray-50 flex h-screen overflow-hidden text-render-text">
|
| 84 |
+
|
| 85 |
+
<div id="mobile-overlay" class="hidden sm:hidden mobile-overlay"></div>
|
| 86 |
+
|
| 87 |
+
<aside id="sidebar" class="w-64 bg-white border-r border-gray-200 flex flex-col flex-shrink-0 fixed sm:static h-full z-50 transition-transform duration-300 ease-in-out mobile-sidebar-hidden">
|
| 88 |
+
|
| 89 |
+
<a href="/mindus/nexus/dashboard" class="p-4 flex items-center border-b border-gray-200 hover:bg-gray-100 transition duration-150">
|
| 90 |
+
<span class="material-icons text-xl text-white bg-render-purple p-1 mr-2">work</span>
|
| 91 |
+
<span class="font-semibold text-lg text-render-dark-text">My Workspace</span>
|
| 92 |
+
</a>
|
| 93 |
+
|
| 94 |
+
<nav class="p-4 space-y-2 border-b border-gray-200">
|
| 95 |
+
<h3 class="text-xs font-semibold uppercase text-gray-500 mb-2">← Environment</h3>
|
| 96 |
+
|
| 97 |
+
<div class="flex items-center space-x-2 text-render-dark-text font-semibold">
|
| 98 |
+
<span class="material-icons text-xl text-gray-600">settings_applications</span>
|
| 99 |
+
<span>GitForge</span>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<a href="#" class="flex items-center space-x-2 p-2 bg-render-light-purple text-render-purple font-semibold">
|
| 103 |
+
<span class="material-icons text-xl">event_note</span>
|
| 104 |
+
<span>Events</span>
|
| 105 |
+
</a>
|
| 106 |
+
|
| 107 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 108 |
+
<span class="material-icons text-xl text-gray-600">settings</span>
|
| 109 |
+
<span>Settings</span>
|
| 110 |
+
</a>
|
| 111 |
+
</nav>
|
| 112 |
+
|
| 113 |
+
<nav class="p-4 space-y-2 border-b border-gray-200">
|
| 114 |
+
<h3 class="text-xs font-semibold uppercase text-gray-500 mb-2">MONITOR</h3>
|
| 115 |
+
<a href="#" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 116 |
+
<span class="material-icons text-xl text-gray-600">text_snippet</span>
|
| 117 |
+
<span>Logs</span>
|
| 118 |
+
</a>
|
| 119 |
+
<a href="#" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 120 |
+
<span class="material-icons text-xl text-gray-600">bar_chart</span>
|
| 121 |
+
<span>Metrics</span>
|
| 122 |
+
</a>
|
| 123 |
+
</nav>
|
| 124 |
+
|
| 125 |
+
<nav class="p-4 space-y-2 flex-grow">
|
| 126 |
+
<h3 class="text-xs font-semibold uppercase text-gray-500 mb-2">MANAGE</h3>
|
| 127 |
+
<a href="#" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 128 |
+
<span class="material-icons text-xl text-gray-600">dns</span>
|
| 129 |
+
<span>Environment</span>
|
| 130 |
+
</a>
|
| 131 |
+
<a href="#" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 132 |
+
<span class="material-icons text-xl text-gray-600">terminal</span>
|
| 133 |
+
<span>Shell <span class="text-pink-500 ml-1">•</span></span>
|
| 134 |
+
</a>
|
| 135 |
+
<a href="#" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 136 |
+
<span class="material-icons text-xl text-gray-600">autorenew</span>
|
| 137 |
+
<span>Scaling <span class="text-pink-500 ml-1">•</span></span>
|
| 138 |
+
</a>
|
| 139 |
+
<a href="#" class="flex items-center space-x-2 p-2 hover:bg-gray-100 transition duration-150">
|
| 140 |
+
<span class="material-icons text-xl text-gray-600">monitor</span>
|
| 141 |
+
<span>Previews</span>
|
| 142 |
+
</a>
|
| 143 |
+
</nav>
|
| 144 |
+
|
| 145 |
+
<div class="p-4 border-t border-gray-200 flex-shrink-0">
|
| 146 |
+
<a href="/mindus/nexus/statut" class="flex items-center space-x-2 text-sm text-gray-600 hover:text-render-dark-text transition duration-150">
|
| 147 |
+
<span class="material-icons text-base text-green-500">check_circle</span>
|
| 148 |
+
<span>Render Status</span>
|
| 149 |
+
</a>
|
| 150 |
+
</div>
|
| 151 |
+
</aside>
|
| 152 |
+
|
| 153 |
+
<main class="flex-1 flex flex-col overflow-y-auto">
|
| 154 |
+
|
| 155 |
+
<header class="bg-white border-b border-gray-200 p-3 flex justify-between items-center flex-shrink-0 z-20">
|
| 156 |
+
<button id="menu-toggle-button" class="sm:hidden text-gray-500 hover:text-render-dark-text mr-3">
|
| 157 |
+
<span class="material-icons text-2xl">menu</span>
|
| 158 |
+
</button>
|
| 159 |
+
|
| 160 |
+
<div class="flex items-center space-x-3 text-sm min-w-0">
|
| 161 |
+
<span class="font-medium text-render-dark-text truncate">My project</span>
|
| 162 |
+
<span class="material-icons text-base text-gray-400 hidden sm:block">chevron_right</span>
|
| 163 |
+
<span class="font-medium text-render-dark-text truncate hidden sm:block">Production</span>
|
| 164 |
+
<span class="material-icons text-base text-gray-400 hidden sm:block">chevron_right</span>
|
| 165 |
+
<span class="font-medium text-render-dark-text truncate">GitForge</span>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div class="flex items-center space-x-2 sm:space-x-4">
|
| 169 |
+
<button class="hidden sm:flex items-center text-gray-500 hover:text-render-dark-text">
|
| 170 |
+
<span class="material-icons text-xl mr-1">search</span>
|
| 171 |
+
<span>Search</span>
|
| 172 |
+
</button>
|
| 173 |
+
<span class="text-gray-300 hidden sm:block">|</span>
|
| 174 |
+
<button class="hidden sm:flex items-center px-3 py-1 text-sm font-semibold text-white bg-green-600 hover:bg-green-700 transition duration-150">
|
| 175 |
+
<span class="material-icons text-base mr-1">add</span>
|
| 176 |
+
<span>New</span>
|
| 177 |
+
</button>
|
| 178 |
+
<button class="px-2 sm:px-3 py-1 text-sm font-semibold text-render-purple border border-render-purple hover:bg-render-light-purple transition duration-150">
|
| 179 |
+
Upgrade
|
| 180 |
+
</button>
|
| 181 |
+
<div class="w-8 h-8 bg-pink-500 text-white flex items-center justify-center text-sm font-bold flex-shrink-0">P</div>
|
| 182 |
+
</div>
|
| 183 |
+
</header>
|
| 184 |
+
|
| 185 |
+
<div class="p-4 sm:p-6 flex-1 overflow-y-auto">
|
| 186 |
+
|
| 187 |
+
<div class="mb-6">
|
| 188 |
+
<h1 class="text-xs font-semibold uppercase text-gray-500 mb-2">WEB SERVICE</h1>
|
| 189 |
+
<div class="flex justify-between items-start flex-col sm:flex-row sm:items-center">
|
| 190 |
+
<div class="flex items-end mb-4 sm:mb-0 flex-wrap">
|
| 191 |
+
<span class="text-2xl sm:text-3xl font-bold text-render-dark-text mr-4 w-full sm:w-auto">{{ user.username if user.username else 'current_user' }}</span>
|
| 192 |
+
<div class="flex mt-2 sm:mt-0">
|
| 193 |
+
<span class="text-sm font-semibold text-gray-500 border border-gray-300 px-2 py-0.5 mr-2">Docker</span>
|
| 194 |
+
<span class="text-sm font-semibold text-gray-500 border border-gray-300 px-2 py-0.5 mr-4">Free</span>
|
| 195 |
+
</div>
|
| 196 |
+
<a href="/mindus/nexus/tarifs" class="text-sm text-render-purple hover:underline mt-2 sm:mt-0">Upgrade your instance →</a>
|
| 197 |
+
</div>
|
| 198 |
+
|
| 199 |
+
<div class="flex items-center space-x-2 relative w-full sm:w-auto">
|
| 200 |
+
<button class="px-4 py-2 text-sm font-semibold text-render-purple border border-render-purple hover:bg-render-light-purple transition duration-150">
|
| 201 |
+
Connect
|
| 202 |
+
</button>
|
| 203 |
+
<div class="relative inline-block text-left">
|
| 204 |
+
<button id="deploy-toggle-new" type="button" class="inline-flex justify-center items-center border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-render-purple transition duration-150" aria-expanded="true" aria-haspopup="true">
|
| 205 |
+
<span>Manual Deploy</span>
|
| 206 |
+
<span class="material-icons text-base ml-1 -mr-1">arrow_drop_down</span>
|
| 207 |
+
</button>
|
| 208 |
+
|
| 209 |
+
<div id="deploy-menu-new" class="hidden origin-top-right absolute right-0 mt-2 w-72 shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none z-30" role="menu" aria-orientation="vertical" aria-labelledby="deploy-toggle-new">
|
| 210 |
+
<div class="py-1" role="none">
|
| 211 |
+
<a href="#" class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 transition duration-150" role="menuitem">Deploy latest commit</a>
|
| 212 |
+
<a href="#" class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 transition duration-150" role="menuitem">Deploy a specific commit</a>
|
| 213 |
+
<a href="#" class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 transition duration-150" role="menuitem">Clear build cache & deploy</a>
|
| 214 |
+
<hr class="my-1 border-gray-100" role="none">
|
| 215 |
+
<a href="#" class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100 transition duration-150" role="menuitem">Restart</a>
|
| 216 |
+
</div>
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
<div id="deploy-menu" class="hidden"></div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
</div>
|
| 223 |
+
|
| 224 |
+
<div class="mt-2 text-sm">
|
| 225 |
+
<p>Service ID: <span class="text-render-dark-text font-mono">srv-d47ogbq9vc738t5ovg</span> <span class="material-icons text-sm align-middle cursor-pointer ml-1 text-gray-500 hover:text-render-purple transition duration-150">content_copy</span></p>
|
| 226 |
+
<p class="mt-1 flex items-center flex-wrap">
|
| 227 |
+
<span class="material-icons text-base mr-1">person</span>
|
| 228 |
+
<span class="text-render-dark-text mr-2">
|
| 229 |
+
<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>
|
| 230 |
+
</span>
|
| 231 |
+
<span class="material-icons text-base mr-1 ml-2">folder_open</span>
|
| 232 |
+
<span class="text-render-dark-text">{{ branch_name if branch_name else 'main' }}</span>
|
| 233 |
+
</p>
|
| 234 |
+
<a id="project-url-link" href="{{ deployment_url_static if deployment_url_static else 'https://gitforge.onrender.com' }}" target="_blank" class="text-blue-600 hover:underline mt-1 block truncate">
|
| 235 |
+
{{ deployment_url_static if deployment_url_static else 'https://gitforge.onrender.com' }}
|
| 236 |
+
</a>
|
| 237 |
+
</div>
|
| 238 |
+
</div>
|
| 239 |
+
|
| 240 |
+
<div class="p-4 bg-render-light-purple border border-render-purple mb-6 flex justify-between items-center text-sm flex-col sm:flex-row text-center sm:text-left">
|
| 241 |
+
<p class="mb-2 sm:mb-0">
|
| 242 |
+
<span class="material-icons text-xl align-middle mr-2 text-render-purple">info</span>
|
| 243 |
+
Your free instance will spin down with inactivity, which can delay requests by 50 seconds or more.
|
| 244 |
+
</p>
|
| 245 |
+
<a href="/mindus/nexus/tarifs" class="text-render-purple font-semibold hover:underline flex-shrink-0">Upgrade now</a>
|
| 246 |
+
</div>
|
| 247 |
+
|
| 248 |
+
<div class="mb-6 border-b border-gray-200 pb-4">
|
| 249 |
+
<div class="flex justify-between items-center flex-wrap">
|
| 250 |
+
<p class="text-sm font-semibold text-render-dark-text mb-2 sm:mb-0">December 12, 2025 at 5:25 PM</p>
|
| 251 |
+
<button class="px-3 py-1 text-sm font-semibold text-gray-700 border border-gray-300 hover:bg-gray-100 transition duration-150">
|
| 252 |
+
Rollback
|
| 253 |
+
</button>
|
| 254 |
+
</div>
|
| 255 |
+
<p class="text-sm font-mono text-gray-700 mt-1">
|
| 256 |
+
<span class="text-gray-500 mr-2">8948e6c</span> Update project_routes.py
|
| 257 |
+
</p>
|
| 258 |
+
</div>
|
| 259 |
+
|
| 260 |
+
<div id="log-container" class="relative">
|
| 261 |
+
<div id="log-card" class="bg-log-bg text-log-text shadow-xl font-mono text-xs overflow-hidden transition-all duration-300 h-96 md:h-128 flex flex-col">
|
| 262 |
+
|
| 263 |
+
<div class="flex justify-between items-center p-2 border-b border-gray-700 flex-shrink-0">
|
| 264 |
+
<div class="flex items-center space-x-2">
|
| 265 |
+
<button class="px-2 py-0.5 bg-gray-700 text-white text-xs">All logs</button>
|
| 266 |
+
<button class="text-gray-400 hover:text-white p-1 transition duration-150">
|
| 267 |
+
<span class="material-icons text-sm">search</span>
|
| 268 |
+
</button>
|
| 269 |
+
<span class="text-gray-500 hidden sm:block">|</span>
|
| 270 |
+
<span class="text-gray-400 hidden sm:block">Dec 12 5:24 PM - 5:35 PM</span>
|
| 271 |
+
</div>
|
| 272 |
+
<div class="flex items-center space-x-2">
|
| 273 |
+
<button id="copy-logs-button" class="text-gray-400 hover:text-white p-1 transition duration-150" title="Copy All Logs">
|
| 274 |
+
<span class="material-icons text-sm">content_copy</span>
|
| 275 |
+
</button>
|
| 276 |
+
<button id="fullscreen-toggle-button" class="text-gray-400 hover:text-white p-1 transition duration-150" title="Toggle Fullscreen">
|
| 277 |
+
<span class="material-icons text-sm">zoom_out_map</span>
|
| 278 |
+
</button>
|
| 279 |
+
<button class="text-gray-400 hover:text-white p-1 transition duration-150">
|
| 280 |
+
<span class="material-icons text-sm">more_vert</span>
|
| 281 |
+
</button>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<pre id="log-content" class="log-card p-3 overflow-y-auto whitespace-pre-wrap leading-relaxed flex-grow">
|
| 286 |
+
Dec 12 05:35:07 PM [2025-12-12 22:35:07 +0000] [INFO] Shutting down: Master
|
| 287 |
+
Dec 12 05:35:06 PM [2025-12-12 22:35:06 +0000] [7] [INFO] Worker exiting (pid: 7)
|
| 288 |
+
Dec 12 05:35:06 PM [2025-12-12 22:35:06 +0000] [INFO] Handling signal: term
|
| 289 |
+
Dec 12 05:34:27 PM ... END OF SECONDARY STARTUP CHECKS
|
| 290 |
+
Dec 12 05:34:27 PM SUCCESS: Hugging Face Configuration (Repo ID: ernestmindes/ernestmind_user_data) found.
|
| 291 |
+
Dec 12 05:34:27 PM <span class="text-yellow-500">CRITICAL</span>: Baserow is configured but the Health Check API <span class="text-red-500">FAILED</span> (Check connection or token).
|
| 292 |
+
Dec 12 05:34:26 PM SUCCESS: Configurations (Tokens/IDs) found.
|
| 293 |
+
Dec 12 05:34:25 PM ... STARTING CRITICAL STARTUP CHECKS ...
|
| 294 |
+
Dec 12 05:34:25 PM =======================================================
|
| 295 |
+
Dec 12 05:34:24 PM <span class="text-green-500">-->> Available at your primary URL</span> <a href="https://gitforge.onrender.com" target="_blank" class="text-blue-400 underline">HTTPS://GITFORGE.ONRENDER.COM</a>
|
| 296 |
+
Dec 12 05:34:23 PM =======================================================
|
| 297 |
+
Dec 12 05:34:23 PM [2025-12-12 22:34:23 +0000] [INFO] Starting new process
|
| 298 |
+
Dec 12 05:34:23 PM [2025-12-12 22:34:23 +0000] [INFO] Booting worker with pid: 6
|
| 299 |
+
Dec 12 05:34:23 PM [2025-12-12 22:34:23 +0000] [INFO] Waiting for application startup.
|
| 300 |
+
Dec 12 05:34:22 PM [2025-12-12 22:34:22 +0000] [INFO] Running worker with pid: 6
|
| 301 |
+
Dec 12 05:34:22 PM [2025-12-12 22:34:22 +0000] [INFO] Worker processes started.
|
| 302 |
+
Dec 12 05:34:22 PM [2025-12-12 22:34:22 +0000] [INFO] Listening at: http://0.0.0.0:10000 (1)
|
| 303 |
+
Dec 12 05:34:21 PM [2025-12-12 22:34:21 +0000] [INFO] Configuration loaded.
|
| 304 |
+
Dec 12 05:34:20 PM <span class="text-green-500">SUCCESS</span>: Initial deployment complete. The service is online.
|
| 305 |
+
Dec 12 05:34:19 PM Starting service initialization...
|
| 306 |
+
</pre>
|
| 307 |
+
</div>
|
| 308 |
+
<div id="logs-copy-status" class="absolute right-4 top-4 bg-green-600 text-white text-xs px-2 py-1 shadow-lg hidden transition duration-300">
|
| 309 |
+
Logs copied!
|
| 310 |
+
</div>
|
| 311 |
+
</div>
|
| 312 |
+
|
| 313 |
+
<div class="mt-4 text-center text-sm text-gray-500">
|
| 314 |
+
Need better ways to work with logs? Try the <a href="#" class="text-blue-600 hover:underline">GitForge CLI</a>, <a href="#" class="text-blue-600 hover:underline">GitForge MCP Server</a>, or set up a <a href="#" class="text-blue-600 hover:underline">log stream integration</a>.
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
</div>
|
| 318 |
+
</main>
|
| 319 |
+
|
| 320 |
+
<script>
|
| 321 |
+
// ID de dépôt par défaut (comme demandé)
|
| 322 |
+
const DEFAULT_REPO_SLUG = "mindus0/gitforge-project";
|
| 323 |
+
|
| 324 |
+
// --- LOGIQUE RESPONSIVE (Sidebar Mobile) ---
|
| 325 |
+
const sidebar = document.getElementById('sidebar');
|
| 326 |
+
const menuToggleButton = document.getElementById('menu-toggle-button');
|
| 327 |
+
const mobileOverlay = document.getElementById('mobile-overlay');
|
| 328 |
+
|
| 329 |
+
const toggleSidebar = () => {
|
| 330 |
+
const isSidebarOpen = sidebar.classList.toggle('mobile-sidebar-shown');
|
| 331 |
+
sidebar.classList.toggle('mobile-sidebar-hidden', !isSidebarOpen);
|
| 332 |
+
mobileOverlay.classList.toggle('hidden', !isSidebarOpen);
|
| 333 |
+
|
| 334 |
+
// L'icône change uniquement pour le cas mobile
|
| 335 |
+
menuToggleButton.querySelector('.material-icons').textContent = isSidebarOpen ? 'close' : 'menu';
|
| 336 |
+
};
|
| 337 |
+
|
| 338 |
+
// Événement pour le bouton menu
|
| 339 |
+
if (menuToggleButton) {
|
| 340 |
+
menuToggleButton.addEventListener('click', (event) => {
|
| 341 |
+
event.stopPropagation();
|
| 342 |
+
toggleSidebar();
|
| 343 |
+
});
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
// Fermer la sidebar en cliquant sur l'overlay
|
| 347 |
+
if (mobileOverlay) {
|
| 348 |
+
mobileOverlay.addEventListener('click', (event) => {
|
| 349 |
+
event.stopPropagation();
|
| 350 |
+
if (sidebar.classList.contains('mobile-sidebar-shown')) {
|
| 351 |
+
toggleSidebar();
|
| 352 |
+
}
|
| 353 |
+
});
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
// Fermer la sidebar en cliquant n'importe où SAUF la sidebar elle-même (gestion générique pour le mobile)
|
| 357 |
+
document.addEventListener('click', (event) => {
|
| 358 |
+
// Uniquement si l'écran est petit ET la sidebar est ouverte
|
| 359 |
+
if (window.innerWidth < 640 && sidebar.classList.contains('mobile-sidebar-shown') && !sidebar.contains(event.target) && !menuToggleButton.contains(event.target)) {
|
| 360 |
+
toggleSidebar();
|
| 361 |
+
}
|
| 362 |
+
});
|
| 363 |
+
|
| 364 |
+
// Réinitialiser les classes si l'écran redimensionne au-dessus de 'sm' (640px)
|
| 365 |
+
window.addEventListener('resize', () => {
|
| 366 |
+
if (window.innerWidth >= 640 && sidebar.classList.contains('mobile-sidebar-shown')) {
|
| 367 |
+
// S'assurer que la sidebar est visible et l'overlay caché si on passe au-dessus de 640px
|
| 368 |
+
sidebar.classList.remove('mobile-sidebar-shown', 'mobile-sidebar-hidden');
|
| 369 |
+
mobileOverlay.classList.add('hidden');
|
| 370 |
+
menuToggleButton.querySelector('.material-icons').textContent = 'menu';
|
| 371 |
+
}
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
// --- LOGIQUE DU MENU "MANUAL DEPLOY" (Nouveau) ---
|
| 376 |
+
|
| 377 |
+
const deployToggleNew = document.getElementById('deploy-toggle-new');
|
| 378 |
+
const deployMenuNew = document.getElementById('deploy-menu-new');
|
| 379 |
+
|
| 380 |
+
const toggleDeployMenuNew = (event) => {
|
| 381 |
+
event.stopPropagation();
|
| 382 |
+
deployMenuNew.classList.toggle('hidden');
|
| 383 |
+
};
|
| 384 |
+
|
| 385 |
+
// Événement pour le nouveau bouton de déploiement
|
| 386 |
+
if (deployToggleNew) {
|
| 387 |
+
deployToggleNew.addEventListener('click', toggleDeployMenuNew);
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
// Événement de fermeture des menus au clic extérieur (partie DEPLOY)
|
| 391 |
+
document.addEventListener('click', (event) => {
|
| 392 |
+
if (deployMenuNew && deployToggleNew && !deployMenuNew.contains(event.target) && !deployToggleNew.contains(event.target)) {
|
| 393 |
+
deployMenuNew.classList.add('hidden');
|
| 394 |
+
}
|
| 395 |
+
});
|
| 396 |
+
|
| 397 |
+
|
| 398 |
+
// --- LOGIQUE DES URL ET DES LOGS (Ancien script adapté) ---
|
| 399 |
+
|
| 400 |
+
// Déclarations des éléments DOM (adaptées/simplifiées)
|
| 401 |
+
const projectUrlLink = document.getElementById('project-url-link');
|
| 402 |
+
const logCard = document.getElementById('log-card');
|
| 403 |
+
const logContent = document.getElementById('log-content');
|
| 404 |
+
const fullscreenToggleButton = document.getElementById('fullscreen-toggle-button');
|
| 405 |
+
const copyLogsButton = document.getElementById('copy-logs-button');
|
| 406 |
+
const logsCopyStatus = document.getElementById('logs-copy-status');
|
| 407 |
+
|
| 408 |
+
// Variable de persistance d'URL (maintenue pour la mise à jour de l'URL principale)
|
| 409 |
+
let liveDeploymentURL = null;
|
| 410 |
+
|
| 411 |
+
const getDeploymentURL = async (repoSlug) => {
|
| 412 |
+
// Simule un appel au backend pour obtenir l'URL ou déclencher le déploiement
|
| 413 |
+
try {
|
| 414 |
+
// Simuler une attente
|
| 415 |
+
await new Promise(resolve => setTimeout(resolve, 100));
|
| 416 |
+
|
| 417 |
+
// Construction de l'URL
|
| 418 |
+
const url = `https://gitforge.onrender.com/live/${repoSlug.replace('/', '-')}`;
|
| 419 |
+
return { success: true, url: url };
|
| 420 |
+
|
| 421 |
+
} catch (error) {
|
| 422 |
+
console.error('Deployment check failed:', error);
|
| 423 |
+
return { success: false, message: 'Server connection error during deployment check.' };
|
| 424 |
+
}
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
// Fonction pour basculer en mode plein écran
|
| 428 |
+
fullscreenToggleButton.addEventListener('click', () => {
|
| 429 |
+
const isFullscreen = logCard.classList.toggle('fullscreen-log');
|
| 430 |
+
|
| 431 |
+
if (isFullscreen) {
|
| 432 |
+
// Changer l'icône en "close_fullscreen"
|
| 433 |
+
fullscreenToggleButton.querySelector('.material-icons').textContent = 'close_fullscreen';
|
| 434 |
+
// Assurer que le conteneur des logs remplisse l'écran
|
| 435 |
+
logContent.style.height = '100%';
|
| 436 |
+
} else {
|
| 437 |
+
// Changer l'icône en "zoom_out_map"
|
| 438 |
+
fullscreenToggleButton.querySelector('.material-icons').textContent = 'zoom_out_map';
|
| 439 |
+
// Retirer le style de hauteur forcé pour revenir au CSS de base (h-96 / h-128)
|
| 440 |
+
logContent.style.height = '';
|
| 441 |
+
}
|
| 442 |
+
});
|
| 443 |
+
|
| 444 |
+
// Fonction pour copier le contenu des logs
|
| 445 |
+
copyLogsButton.addEventListener('click', async () => {
|
| 446 |
+
try {
|
| 447 |
+
// Utiliser innerText pour obtenir le contenu textuel sans le HTML
|
| 448 |
+
const logs = logContent.innerText;
|
| 449 |
+
await navigator.clipboard.writeText(logs);
|
| 450 |
+
|
| 451 |
+
// Afficher le statut de copie
|
| 452 |
+
logsCopyStatus.classList.remove('hidden');
|
| 453 |
+
setTimeout(() => logsCopyStatus.classList.add('hidden'), 2000);
|
| 454 |
+
|
| 455 |
+
} catch (err) {
|
| 456 |
+
console.error('Failed to copy logs: ', err);
|
| 457 |
+
alert('Error copying logs. Please copy it manually.');
|
| 458 |
+
}
|
| 459 |
+
});
|
| 460 |
+
|
| 461 |
+
// Faire défiler automatiquement les logs vers le bas au chargement initial
|
| 462 |
+
window.addEventListener('load', () => {
|
| 463 |
+
logContent.scrollTop = logContent.scrollHeight;
|
| 464 |
+
|
| 465 |
+
// Déclenche une première vérification de l'URL au chargement de la page pour mettre à jour l'URL principale
|
| 466 |
+
let repoSlug = new URLSearchParams(window.location.search).get('repo_slug');
|
| 467 |
+
if (!repoSlug) {
|
| 468 |
+
repoSlug = DEFAULT_REPO_SLUG;
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
getDeploymentURL(repoSlug).then(result => {
|
| 472 |
+
if (result.success) {
|
| 473 |
+
liveDeploymentURL = result.url;
|
| 474 |
+
|
| 475 |
+
// Mettre à jour l'URL principale au chargement de la page
|
| 476 |
+
projectUrlLink.href = liveDeploymentURL;
|
| 477 |
+
projectUrlLink.textContent = liveDeploymentURL;
|
| 478 |
+
}
|
| 479 |
+
});
|
| 480 |
+
});
|
| 481 |
+
|
| 482 |
+
</script>
|
| 483 |
+
</body>
|
| 484 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/editor.html
ADDED
|
@@ -0,0 +1,1004 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Editor - mindus0/mailix</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/default.min.css">
|
| 14 |
+
|
| 15 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
|
| 16 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/xml/xml.min.js"></script>
|
| 17 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/javascript/javascript.min.js"></script>
|
| 18 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/css/css.min.js"></script>
|
| 19 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/htmlmixed/htmlmixed.min.js"></script>
|
| 20 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/python/python.min.js"></script>
|
| 21 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/php/php.min.js"></script>
|
| 22 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/clike/clike.min.js"></script>
|
| 23 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/sql/sql.min.js"></script>
|
| 24 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/markdown/markdown.min.js"></script>
|
| 25 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/shell/shell.min.js"></script>
|
| 26 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/typescript/typescript.min.js"></script>
|
| 27 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/go/go.min.js"></script>
|
| 28 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/yaml/yaml.min.js"></script>
|
| 29 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/rust/rust.min.js"></script>
|
| 30 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/stex/stex.min.js"></script>
|
| 31 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/meta.js"></script>
|
| 32 |
+
|
| 33 |
+
<style>
|
| 34 |
+
/* Inter font configuration */
|
| 35 |
+
body { font-family: 'Inter', sans-serif; }
|
| 36 |
+
|
| 37 |
+
/* Theme Variables and Styles */
|
| 38 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 39 |
+
|
| 40 |
+
/* Light Mode (UNIQUE Theme) */
|
| 41 |
+
.light {
|
| 42 |
+
--bg-page: #FFFFFF;
|
| 43 |
+
--bg-header: #F6F8FA;
|
| 44 |
+
--bg-card: #FFFFFF;
|
| 45 |
+
--bg-active: #F3F4F6;
|
| 46 |
+
--border-color: #D0D7DE;
|
| 47 |
+
--text-color: #24292F;
|
| 48 |
+
--text-secondary: #57606A;
|
| 49 |
+
--text-link: #0969DA;
|
| 50 |
+
--primary-color: #2DA44E;
|
| 51 |
+
--primary-hover: #2C974B;
|
| 52 |
+
}
|
| 53 |
+
/* Utility Classes for Variables */
|
| 54 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 55 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 56 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 57 |
+
.text-link-var { color: var(--text-link); } .hover\:text-link-hover-var:hover { color: var(--text-link); }
|
| 58 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 59 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 60 |
+
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 61 |
+
|
| 62 |
+
/* Specific style for the navigation bar */
|
| 63 |
+
.repo-nav-link {
|
| 64 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 65 |
+
margin-right: 0.5rem; /* Space between links */
|
| 66 |
+
}
|
| 67 |
+
.repo-nav-link.active {
|
| 68 |
+
border-bottom-color: var(--text-link);
|
| 69 |
+
color: var(--text-color) !important;
|
| 70 |
+
font-weight: 600;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/* Styles for the loading spinner */
|
| 74 |
+
.spinner {
|
| 75 |
+
border: 4px solid var(--border-color);
|
| 76 |
+
border-top: 4px solid var(--text-link);
|
| 77 |
+
border-radius: 50%;
|
| 78 |
+
width: 40px;
|
| 79 |
+
height: 40px;
|
| 80 |
+
animation: spin 1s linear infinite;
|
| 81 |
+
}
|
| 82 |
+
/* Smaller spinner for the deployment card */
|
| 83 |
+
.small-spinner {
|
| 84 |
+
border: 2px solid var(--border-color);
|
| 85 |
+
border-top: 2px solid var(--text-link);
|
| 86 |
+
border-radius: 50%;
|
| 87 |
+
width: 20px;
|
| 88 |
+
height: 20px;
|
| 89 |
+
animation: spin 1s linear infinite;
|
| 90 |
+
}
|
| 91 |
+
/* Very small spinner for the save button */
|
| 92 |
+
.tiny-spinner {
|
| 93 |
+
border: 2px solid #FFFFFF; /* White to contrast with the green button */
|
| 94 |
+
border-top: 2px solid transparent;
|
| 95 |
+
border-radius: 50%;
|
| 96 |
+
width: 16px;
|
| 97 |
+
height: 16px;
|
| 98 |
+
animation: spin 1s linear infinite;
|
| 99 |
+
}
|
| 100 |
+
@keyframes spin {
|
| 101 |
+
0% { transform: rotate(0deg); }
|
| 102 |
+
100% { transform: rotate(360deg); }
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
/* Style for the Side Panel (Sidebar) - UPDATED for a SCROLLING sidebar and toggle */
|
| 106 |
+
#sidebar {
|
| 107 |
+
width: 320px;
|
| 108 |
+
min-height: calc(100vh - 128px);
|
| 109 |
+
padding: 0;
|
| 110 |
+
margin-right: 0;
|
| 111 |
+
border: none;
|
| 112 |
+
border-right: 1px solid var(--border-color);
|
| 113 |
+
background-color: var(--bg-card);
|
| 114 |
+
/* Transition for smooth close/open */
|
| 115 |
+
transition: width 0.3s ease, margin-right 0.3s ease;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
/* Style for the content area to shift when sidebar is closed */
|
| 119 |
+
#main-content.sidebar-closed #sidebar {
|
| 120 |
+
width: 0;
|
| 121 |
+
padding: 0;
|
| 122 |
+
margin-right: 0;
|
| 123 |
+
border-right: none;
|
| 124 |
+
overflow: hidden;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/* Reposition the toggle button when closed - must be outside the 0px width area */
|
| 128 |
+
#sidebar-toggle-button.closed-icon {
|
| 129 |
+
position: absolute; /* Allows positioning relative to #main-content */
|
| 130 |
+
left: 0; /* Move to the far left of the main content area */
|
| 131 |
+
top: 50%; /* Center vertically */
|
| 132 |
+
transform: translateY(-50%);
|
| 133 |
+
border-left: none !important;
|
| 134 |
+
border-top-left-radius: 0;
|
| 135 |
+
border-bottom-left-radius: 0;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
/* Style for the file scroll area */
|
| 139 |
+
#file-list-scroll-area {
|
| 140 |
+
max-height: calc(100vh - 200px);
|
| 141 |
+
overflow-y: auto;
|
| 142 |
+
padding: 0 0 1rem 0;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/* Style for CodeMirror for dynamic height - REMOVED FIXED HEIGHT */
|
| 146 |
+
.CodeMirror {
|
| 147 |
+
border: 1px solid var(--border-color);
|
| 148 |
+
height: auto; /* Let it grow with content */
|
| 149 |
+
min-height: 500px; /* Minimum height for usability */
|
| 150 |
+
font-size: 14px;
|
| 151 |
+
overflow: hidden; /* Important for dynamic height and avoiding double scrollbar */
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
/* Style for file list items */
|
| 155 |
+
.file-list-item {
|
| 156 |
+
display: flex;
|
| 157 |
+
align-items: center;
|
| 158 |
+
padding: 6px 8px;
|
| 159 |
+
border-radius: 6px;
|
| 160 |
+
cursor: pointer;
|
| 161 |
+
text-decoration: none;
|
| 162 |
+
}
|
| 163 |
+
.file-list-item:hover {
|
| 164 |
+
background-color: var(--bg-active);
|
| 165 |
+
}
|
| 166 |
+
.file-list-item.selected {
|
| 167 |
+
background-color: var(--bg-active);
|
| 168 |
+
font-weight: 600;
|
| 169 |
+
}
|
| 170 |
+
</style>
|
| 171 |
+
</head>
|
| 172 |
+
|
| 173 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 174 |
+
|
| 175 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme z-50">
|
| 176 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 177 |
+
<div class="flex justify-between items-center h-16">
|
| 178 |
+
<div class="flex items-center space-x-4">
|
| 179 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="GitForge Logo" class="h-6">
|
| 180 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme">GitForge</span>
|
| 181 |
+
<span class="text-secondary-var">/</span>
|
| 182 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme">
|
| 183 |
+
<span id="repo-user">mindus0</span> / <span id="repo-name">mailix</span>
|
| 184 |
+
</a>
|
| 185 |
+
<span id="repo-visibility" class="px-2 py-0.5 text-xs font-medium rounded-full border border-color-var text-secondary-var">
|
| 186 |
+
Private
|
| 187 |
+
</span>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<div class="flex items-center space-x-3">
|
| 191 |
+
<div class="hidden sm:block">
|
| 192 |
+
<input type="text" placeholder="Type / to search"
|
| 193 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 194 |
+
</div>
|
| 195 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-color-var hover:text-link-var transition-colors-theme">
|
| 196 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 197 |
+
</a>
|
| 198 |
+
</div>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
</header>
|
| 203 |
+
|
| 204 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme z-40">
|
| 205 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 206 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 207 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var active transition-colors-theme flex items-center">
|
| 208 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 209 |
+
</a>
|
| 210 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 211 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues (0)
|
| 212 |
+
</a>
|
| 213 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 214 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests (0)
|
| 215 |
+
</a>
|
| 216 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 217 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 218 |
+
</a>
|
| 219 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 220 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 221 |
+
</a>
|
| 222 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 223 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 224 |
+
</a>
|
| 225 |
+
<a href="/mindus/nexus" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 226 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 227 |
+
</a>
|
| 228 |
+
</nav>
|
| 229 |
+
</div>
|
| 230 |
+
</div>
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
<div id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 transition-colors-theme flex relative">
|
| 234 |
+
|
| 235 |
+
<div id="sidebar" class="bg-card-var transition-colors-theme flex-shrink-0">
|
| 236 |
+
|
| 237 |
+
<div id="repo-content-sidebar" class="space-y-0">
|
| 238 |
+
|
| 239 |
+
<div class="p-4 border-b border-color-var flex justify-between items-center">
|
| 240 |
+
<div class="flex items-center space-x-2">
|
| 241 |
+
<span class="material-symbols-rounded text-lg text-secondary-var">folder</span>
|
| 242 |
+
<h2 class="text-sm font-semibold text-color-var">Files</h2>
|
| 243 |
+
</div>
|
| 244 |
+
|
| 245 |
+
<button id="sidebar-toggle-button" class="text-secondary-var hover:text-link-var p-1.5 rounded-lg border border-color-var hover:bg-active-var transition-colors-theme"
|
| 246 |
+
data-is-open="true">
|
| 247 |
+
<span class="material-symbols-rounded text-base">chevron_left</span>
|
| 248 |
+
</button>
|
| 249 |
+
</div>
|
| 250 |
+
|
| 251 |
+
<div class="p-4 border-b border-color-var">
|
| 252 |
+
<div class="flex items-center space-x-2">
|
| 253 |
+
<select id="branch-select" class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-full transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 254 |
+
<option>main</option>
|
| 255 |
+
<option>dev</option>
|
| 256 |
+
</select>
|
| 257 |
+
<button id="new-file-button" class="text-secondary-var hover:text-link-var p-1.5 rounded-lg border border-color-var hover:bg-active-var transition-colors-theme" title="New File">
|
| 258 |
+
<span class="material-symbols-rounded text-base">add</span>
|
| 259 |
+
</button>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<div id="new-file-input-container" class="p-4 border-b border-color-var hidden">
|
| 264 |
+
<div class="flex items-center space-x-2 mb-2">
|
| 265 |
+
<span class="material-symbols-rounded text-sm text-link-var">edit_square</span>
|
| 266 |
+
<h3 class="text-sm font-semibold text-link-var">New File</h3>
|
| 267 |
+
</div>
|
| 268 |
+
<input type="text" id="new-file-name-input" placeholder="File name (ex: index.html)"
|
| 269 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-full transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 270 |
+
</div>
|
| 271 |
+
<div id="file-list-container" class="px-2 py-2">
|
| 272 |
+
|
| 273 |
+
<div id="file-list-scroll-area">
|
| 274 |
+
<div id="loading-spinner" class="flex justify-center items-center py-8">
|
| 275 |
+
<div class="small-spinner"></div>
|
| 276 |
+
</div>
|
| 277 |
+
|
| 278 |
+
<div id="empty-repo-message" class="hidden text-center p-4">
|
| 279 |
+
<span class="material-symbols-rounded text-4xl text-secondary-var mb-2">folder_off</span>
|
| 280 |
+
<h2 class="text-lg font-semibold mb-1 text-color-var">Empty Repository</h2>
|
| 281 |
+
<p class="text-secondary-var text-sm">Add your first file.</p>
|
| 282 |
+
</div>
|
| 283 |
+
|
| 284 |
+
<div id="file-list-items" class="text-sm hidden">
|
| 285 |
+
</div>
|
| 286 |
+
</div>
|
| 287 |
+
</div>
|
| 288 |
+
|
| 289 |
+
</div>
|
| 290 |
+
</div>
|
| 291 |
+
|
| 292 |
+
<div class="flex-grow ml-4">
|
| 293 |
+
<div class="bg-card-var rounded-lg border border-color-var">
|
| 294 |
+
<div class="flex justify-between items-center p-3 border-b border-color-var">
|
| 295 |
+
<h1 id="editor-file-title" class="text-sm font-semibold text-color-var truncate">Select a file to start editing</h1>
|
| 296 |
+
<div class="flex items-center space-x-2">
|
| 297 |
+
|
| 298 |
+
<button id="edit-button" class="text-secondary-var hover:text-link-var text-sm font-medium py-1.5 px-3 rounded-lg flex items-center transition-colors-theme disabled:opacity-50 border border-color-var hover:bg-active-var" disabled>
|
| 299 |
+
<span class="material-symbols-rounded text-base mr-1">edit</span> Edit
|
| 300 |
+
</button>
|
| 301 |
+
<button id="delete-button" class="text-secondary-var hover:text-red-500 text-sm font-medium py-1.5 px-3 rounded-lg flex items-center transition-colors-theme disabled:opacity-50 border border-color-var hover:bg-active-var" disabled>
|
| 302 |
+
<span class="material-symbols-rounded text-base mr-1">delete</span> Delete
|
| 303 |
+
</button>
|
| 304 |
+
|
| 305 |
+
<button id="save-button" class="bg-primary-color-var hover:bg-primary-hover-var text-white text-sm font-medium py-1.5 px-3 rounded-lg flex items-center transition-colors-theme disabled:opacity-50" disabled>
|
| 306 |
+
<span class="material-symbols-rounded text-base mr-1">save</span> Save
|
| 307 |
+
</button>
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
<div id="codemirror-container" class="p-1">
|
| 311 |
+
<textarea id="code-editor-textarea"></textarea>
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
</div>
|
| 315 |
+
|
| 316 |
+
</div>
|
| 317 |
+
|
| 318 |
+
<script>
|
| 319 |
+
// LOGIQUE SPÉCIFIQUE À LA PAGE DU DÉPÔT ET À L'ÉDITEUR
|
| 320 |
+
|
| 321 |
+
const fileListItemsContainer = document.getElementById('file-list-items');
|
| 322 |
+
const emptyRepoMessage = document.getElementById('empty-repo-message');
|
| 323 |
+
const loadingSpinner = document.getElementById('loading-spinner');
|
| 324 |
+
const repoTitleElement = document.getElementById('repo-name');
|
| 325 |
+
const editorFileTitle = document.getElementById('editor-file-title');
|
| 326 |
+
const saveButton = document.getElementById('save-button');
|
| 327 |
+
const deleteButton = document.getElementById('delete-button');
|
| 328 |
+
const editButton = document.getElementById('edit-button'); // <<< AJOUTÉ
|
| 329 |
+
const newFileButton = document.getElementById('new-file-button');
|
| 330 |
+
const newFileInputContainer = document.getElementById('new-file-input-container');
|
| 331 |
+
const newFileNameInput = document.getElementById('new-file-name-input');
|
| 332 |
+
const sidebarToggle = document.getElementById('sidebar-toggle-button'); // <<< AJOUTÉ
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
// Variables globales pour l'éditeur et l'état
|
| 336 |
+
let codeEditor = null;
|
| 337 |
+
let currentRepoSlug = '';
|
| 338 |
+
let currentRepoUser = '';
|
| 339 |
+
let currentFilePath = '';
|
| 340 |
+
let currentFileElement = null;
|
| 341 |
+
let isCreatingNewFile = false;
|
| 342 |
+
|
| 343 |
+
/**
|
| 344 |
+
* @typedef {Object} FileMeta
|
| 345 |
+
* @property {string} icon - Material Symbols icon name.
|
| 346 |
+
* @property {string} color - Tailwind CSS color class.
|
| 347 |
+
* @property {string | null} mode - CodeMirror mode.
|
| 348 |
+
*/
|
| 349 |
+
|
| 350 |
+
/**
|
| 351 |
+
* Détermine l'icône et le mode CodeMirror pour un nom de fichier.
|
| 352 |
+
* @param {string} fileName
|
| 353 |
+
* @returns {FileMeta}
|
| 354 |
+
*/
|
| 355 |
+
const getFileMeta = (fileName) => {
|
| 356 |
+
const ext = fileName.split('.').pop().toLowerCase();
|
| 357 |
+
|
| 358 |
+
// Mapping des icônes Material Symbols (Unifié pour text_snippet)
|
| 359 |
+
const iconMap = {
|
| 360 |
+
'md': { icon: 'text_snippet', color: 'text-secondary-var', mode: 'markdown' },
|
| 361 |
+
'license': { icon: 'text_snippet', color: 'text-secondary-var', mode: 'markdown' },
|
| 362 |
+
'html': { icon: 'text_snippet', color: 'text-link-var', mode: 'htmlmixed' },
|
| 363 |
+
'js': { icon: 'text_snippet', color: 'text-link-var', mode: 'javascript' },
|
| 364 |
+
'ts': { icon: 'text_snippet', color: 'text-link-var', mode: 'typescript' },
|
| 365 |
+
'css': { icon: 'text_snippet', color: 'text-link-var', mode: 'css' },
|
| 366 |
+
'py': { icon: 'text_snippet', color: 'text-link-var', mode: 'python' },
|
| 367 |
+
'json': { icon: 'text_snippet', color: 'text-secondary-var', mode: 'javascript' },
|
| 368 |
+
'php': { icon: 'text_snippet', color: 'text-link-var', mode: 'php' },
|
| 369 |
+
'sql': { icon: 'text_snippet', color: 'text-link-var', mode: 'sql' },
|
| 370 |
+
'go': { icon: 'text_snippet', color: 'text-link-var', mode: 'go' },
|
| 371 |
+
'sh': { icon: 'text_snippet', color: 'text-secondary-var', mode: 'shell' },
|
| 372 |
+
'yaml': { icon: 'text_snippet', color: 'text-secondary-var', mode: 'yaml' },
|
| 373 |
+
'rs': { icon: 'text_snippet', color: 'text-link-var', mode: 'rust' },
|
| 374 |
+
'tex': { icon: 'text_snippet', color: 'text-secondary-var', mode: 'stex' },
|
| 375 |
+
// Default
|
| 376 |
+
'default': { icon: 'text_snippet', color: 'text-secondary-var', mode: null }
|
| 377 |
+
};
|
| 378 |
+
// Vérification spéciale pour les fichiers sans extension ou .gitignore
|
| 379 |
+
if (fileName === '.gitignore') return { icon: 'text_snippet', color: 'text-secondary-var', mode: 'shell' };
|
| 380 |
+
if (!fileName.includes('.')) return { icon: 'text_snippet', color: 'text-secondary-var', mode: null };
|
| 381 |
+
|
| 382 |
+
return iconMap[ext] || iconMap['default'];
|
| 383 |
+
};
|
| 384 |
+
|
| 385 |
+
/**
|
| 386 |
+
* Initialise ou met à jour l'instance CodeMirror.
|
| 387 |
+
* @param {string} initialContent - Contenu initial de l'éditeur.
|
| 388 |
+
* @param {string | null} mode - Mode CodeMirror.
|
| 389 |
+
*/
|
| 390 |
+
const initializeCodeMirror = (initialContent = "// Select a file from the sidebar to start.", mode = null) => {
|
| 391 |
+
|
| 392 |
+
// <<< AJOUTÉ : Variable pour l'état readOnly par défaut
|
| 393 |
+
const defaultReadOnly = !isCreatingNewFile;
|
| 394 |
+
|
| 395 |
+
if (codeEditor) {
|
| 396 |
+
// Mettre à jour l'éditeur existant
|
| 397 |
+
codeEditor.setValue(initialContent);
|
| 398 |
+
codeEditor.setOption('mode', mode || 'clike');
|
| 399 |
+
codeEditor.setOption('readOnly', defaultReadOnly); // <<< AJOUTÉ/MIS À JOUR
|
| 400 |
+
codeEditor.markClean(); // Marquer comme non modifié au chargement
|
| 401 |
+
|
| 402 |
+
// Mise à jour de l'UI pour la sauvegarde
|
| 403 |
+
saveButton.disabled = defaultReadOnly; // Désactivé si en lecture seule
|
| 404 |
+
deleteButton.disabled = defaultReadOnly; // Désactivé si en lecture seule
|
| 405 |
+
editButton.disabled = isCreatingNewFile ? true : !defaultReadOnly; // Actif si en lecture seule ET ce n'est pas un nouveau fichier
|
| 406 |
+
|
| 407 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">save</span> Save`;
|
| 408 |
+
|
| 409 |
+
return;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
// Créer une nouvelle instance CodeMirror
|
| 413 |
+
const textarea = document.getElementById('code-editor-textarea');
|
| 414 |
+
codeEditor = CodeMirror.fromTextArea(textarea, {
|
| 415 |
+
lineNumbers: true,
|
| 416 |
+
mode: mode || 'clike',
|
| 417 |
+
theme: 'default',
|
| 418 |
+
indentUnit: 4,
|
| 419 |
+
tabSize: 4,
|
| 420 |
+
lineWrapping: true,
|
| 421 |
+
readOnly: defaultReadOnly // <<< AJOUTÉ/MIS À JOUR
|
| 422 |
+
});
|
| 423 |
+
|
| 424 |
+
codeEditor.setValue(initialContent);
|
| 425 |
+
codeEditor.markClean();
|
| 426 |
+
|
| 427 |
+
// Activer/Désactiver le bouton Sauvegarder sur changement
|
| 428 |
+
codeEditor.on('change', () => {
|
| 429 |
+
// Si le fichier est "sale" (modifié), activer le bouton (seulement si non en lecture seule)
|
| 430 |
+
if (!codeEditor.isClean() && !codeEditor.getOption('readOnly')) {
|
| 431 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">save</span> Save`;
|
| 432 |
+
saveButton.disabled = false;
|
| 433 |
+
}
|
| 434 |
+
});
|
| 435 |
+
|
| 436 |
+
// Ajouter les écouteurs de clic (une seule fois)
|
| 437 |
+
saveButton.addEventListener('click', handleSaveButtonClick);
|
| 438 |
+
deleteButton.addEventListener('click', handleDeleteButtonClick);
|
| 439 |
+
editButton.addEventListener('click', handleEditButtonClick); // <<< AJOUTÉ
|
| 440 |
+
sidebarToggle.addEventListener('click', handleSidebarToggle); // <<< AJOUTÉ
|
| 441 |
+
};
|
| 442 |
+
|
| 443 |
+
/**
|
| 444 |
+
* Gère le clic sur le bouton d'édition pour basculer en mode Lecture/Écriture. <<< AJOUTÉ
|
| 445 |
+
*/
|
| 446 |
+
const handleEditButtonClick = () => {
|
| 447 |
+
if (codeEditor) {
|
| 448 |
+
const isReadOnly = codeEditor.getOption('readOnly');
|
| 449 |
+
if (isReadOnly) {
|
| 450 |
+
codeEditor.setOption('readOnly', false);
|
| 451 |
+
editButton.disabled = true; // Désactiver le bouton Edit
|
| 452 |
+
|
| 453 |
+
// Activer Save/Delete si un fichier est chargé et n'est pas en mode création
|
| 454 |
+
if (currentFilePath) {
|
| 455 |
+
deleteButton.disabled = false;
|
| 456 |
+
// Activer Save seulement si "sale" ou si c'est un nouveau fichier
|
| 457 |
+
saveButton.disabled = codeEditor.isClean();
|
| 458 |
+
}
|
| 459 |
+
|
| 460 |
+
editButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">check</span> Editing`;
|
| 461 |
+
editButton.classList.remove('hover:text-link-var');
|
| 462 |
+
editButton.classList.add('bg-link-var', 'text-white', 'hover:bg-primary-hover-var', 'border-link-var');
|
| 463 |
+
|
| 464 |
+
}
|
| 465 |
+
}
|
| 466 |
+
};
|
| 467 |
+
|
| 468 |
+
/**
|
| 469 |
+
* Gère le clic sur le bouton de bascule de la barre latérale. <<< AJOUTÉ
|
| 470 |
+
*/
|
| 471 |
+
const handleSidebarToggle = () => {
|
| 472 |
+
const mainContent = document.getElementById('main-content');
|
| 473 |
+
const isClosed = mainContent.classList.toggle('sidebar-closed');
|
| 474 |
+
|
| 475 |
+
if (isClosed) {
|
| 476 |
+
// Barre latérale fermée
|
| 477 |
+
sidebarToggle.innerHTML = `<span class="material-symbols-rounded text-base">chevron_right</span>`;
|
| 478 |
+
sidebarToggle.classList.add('closed-icon');
|
| 479 |
+
} else {
|
| 480 |
+
// Barre latérale ouverte
|
| 481 |
+
sidebarToggle.innerHTML = `<span class="material-symbols-rounded text-base">chevron_left</span>`;
|
| 482 |
+
sidebarToggle.classList.remove('closed-icon');
|
| 483 |
+
}
|
| 484 |
+
};
|
| 485 |
+
|
| 486 |
+
/**
|
| 487 |
+
* Gère l'événement de clic sur un élément de fichier dans la barre latérale.
|
| 488 |
+
* @param {HTMLElement} item - L'élément HTML du fichier cliqué.
|
| 489 |
+
* @param {string} filePath - Chemin complet du fichier.
|
| 490 |
+
* @param {string} fileName - Nom du fichier.
|
| 491 |
+
*/
|
| 492 |
+
const handleFileClick = (item, filePath, fileName) => {
|
| 493 |
+
// Sortir du mode création si on sélectionne un fichier existant
|
| 494 |
+
if (isCreatingNewFile) {
|
| 495 |
+
exitNewFileMode();
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
// Désélectionner l'élément précédent
|
| 499 |
+
if (currentFileElement) {
|
| 500 |
+
currentFileElement.classList.remove('selected');
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
// Définir l'élément actuel comme sélectionné
|
| 504 |
+
item.classList.add('selected');
|
| 505 |
+
currentFileElement = item;
|
| 506 |
+
currentFilePath = filePath;
|
| 507 |
+
|
| 508 |
+
// <<< AJOUTÉ : Activer le bouton d'édition par défaut (et donc désactiver Save/Delete)
|
| 509 |
+
editButton.disabled = false;
|
| 510 |
+
saveButton.disabled = true;
|
| 511 |
+
deleteButton.disabled = true;
|
| 512 |
+
|
| 513 |
+
// Réinitialiser le style du bouton d'édition
|
| 514 |
+
editButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">edit</span> Edit`;
|
| 515 |
+
editButton.classList.remove('bg-link-var', 'text-white', 'hover:bg-primary-hover-var', 'border-link-var');
|
| 516 |
+
editButton.classList.add('hover:text-link-var');
|
| 517 |
+
|
| 518 |
+
// Charger le contenu du fichier dans l'éditeur
|
| 519 |
+
loadFileContentForEditor(filePath, fileName);
|
| 520 |
+
};
|
| 521 |
+
|
| 522 |
+
/**
|
| 523 |
+
* Gère l'appel à l'API pour sauvegarder le contenu du fichier.
|
| 524 |
+
*/
|
| 525 |
+
const handleSaveButtonClick = async () => {
|
| 526 |
+
const fileContent = codeEditor.getValue();
|
| 527 |
+
const fileName = isCreatingNewFile ? newFileNameInput.value.trim() : editorFileTitle.textContent;
|
| 528 |
+
const filePath = isCreatingNewFile ? fileName : currentFilePath;
|
| 529 |
+
|
| 530 |
+
if (!fileName || !filePath) {
|
| 531 |
+
alert("Error: File name is missing or undefined.");
|
| 532 |
+
return;
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
// Update button for loading state
|
| 536 |
+
saveButton.innerHTML = `<div class="tiny-spinner mr-2"></div> Committing...`;
|
| 537 |
+
saveButton.disabled = true;
|
| 538 |
+
deleteButton.disabled = true;
|
| 539 |
+
editButton.disabled = true; // <<< AJOUTÉ
|
| 540 |
+
|
| 541 |
+
try {
|
| 542 |
+
const response = await fetch('/mindus/nexus/save_file_content', {
|
| 543 |
+
method: 'POST',
|
| 544 |
+
headers: { 'Content-Type': 'application/json' },
|
| 545 |
+
body: JSON.stringify({
|
| 546 |
+
repo_slug: currentRepoSlug,
|
| 547 |
+
file_path: filePath,
|
| 548 |
+
file_content: fileContent,
|
| 549 |
+
commit_message: isCreatingNewFile
|
| 550 |
+
? `feat: Add new file ${fileName}`
|
| 551 |
+
: `fix: Update file ${fileName}`
|
| 552 |
+
})
|
| 553 |
+
});
|
| 554 |
+
|
| 555 |
+
const responseText = await response.text();
|
| 556 |
+
|
| 557 |
+
let result;
|
| 558 |
+
|
| 559 |
+
try {
|
| 560 |
+
result = JSON.parse(responseText);
|
| 561 |
+
} catch (jsonParseError) {
|
| 562 |
+
console.error('Non-JSON response received (raw):', responseText);
|
| 563 |
+
|
| 564 |
+
if (!response.ok) {
|
| 565 |
+
const truncatedText = responseText.length > 200 ? responseText.substring(0, 200) + '...' : responseText;
|
| 566 |
+
throw new Error(`Server returned HTTP status ${response.status} without valid JSON response. Raw details: ${truncatedText}`);
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
throw new Error(`Unexpected non-JSON response from server. Status: ${response.status}.`);
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
if (result.success) {
|
| 573 |
+
// Save success
|
| 574 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">check</span> Success!`;
|
| 575 |
+
codeEditor.markClean();
|
| 576 |
+
codeEditor.setOption('readOnly', true); // <<< AJOUTÉ : Passer en lecture seule après succès
|
| 577 |
+
editButton.disabled = false; // <<< AJOUTÉ : Réactiver le bouton d'édition
|
| 578 |
+
editButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">edit</span> Edit`;
|
| 579 |
+
editButton.classList.remove('bg-link-var', 'text-white', 'hover:bg-primary-hover-var', 'border-link-var');
|
| 580 |
+
editButton.classList.add('hover:text-link-var');
|
| 581 |
+
|
| 582 |
+
// If it was a new file, add it to the sidebar
|
| 583 |
+
if (isCreatingNewFile) {
|
| 584 |
+
addNewFileToList(fileName);
|
| 585 |
+
exitNewFileMode();
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
setTimeout(() => {
|
| 589 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">save</span> Save`;
|
| 590 |
+
saveButton.disabled = true;
|
| 591 |
+
deleteButton.disabled = true; // <<< AJOUTÉ : Désactiver la suppression
|
| 592 |
+
}, 2000);
|
| 593 |
+
|
| 594 |
+
} else {
|
| 595 |
+
// Save failure (JSON response with success: false)
|
| 596 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">error</span> Failed`;
|
| 597 |
+
alert(`Save failed: ${result.message}`);
|
| 598 |
+
|
| 599 |
+
setTimeout(() => {
|
| 600 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">save</span> Save`;
|
| 601 |
+
saveButton.disabled = codeEditor ? codeEditor.isClean() : true;
|
| 602 |
+
deleteButton.disabled = false;
|
| 603 |
+
editButton.disabled = false; // <<< AJOUTÉ
|
| 604 |
+
}, 2000);
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
} catch (error) {
|
| 608 |
+
// Network error or parsing error
|
| 609 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">warning</span> Error`;
|
| 610 |
+
alert(`Server connection error: ${error.message}`);
|
| 611 |
+
console.error('Save API error:', error);
|
| 612 |
+
|
| 613 |
+
setTimeout(() => {
|
| 614 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">save</span> Save`;
|
| 615 |
+
saveButton.disabled = false;
|
| 616 |
+
deleteButton.disabled = false;
|
| 617 |
+
editButton.disabled = false; // <<< AJOUTÉ
|
| 618 |
+
}, 2000);
|
| 619 |
+
}
|
| 620 |
+
};
|
| 621 |
+
|
| 622 |
+
/**
|
| 623 |
+
* Gère l'événement de clic sur le bouton de suppression.
|
| 624 |
+
*/
|
| 625 |
+
const handleDeleteButtonClick = async () => {
|
| 626 |
+
if (!currentFilePath) {
|
| 627 |
+
alert("Error: No file selected to delete.");
|
| 628 |
+
return;
|
| 629 |
+
}
|
| 630 |
+
|
| 631 |
+
const fileName = editorFileTitle.textContent;
|
| 632 |
+
|
| 633 |
+
// 1. Confirm deletion
|
| 634 |
+
const isConfirmed = confirm(`Are you sure you want to delete the file: ${fileName} ? This action is irreversible.`);
|
| 635 |
+
if (!isConfirmed) {
|
| 636 |
+
return;
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
// 2. Update button for loading state
|
| 640 |
+
deleteButton.innerHTML = `<div class="tiny-spinner mr-2"></div> Deleting...`;
|
| 641 |
+
deleteButton.disabled = true;
|
| 642 |
+
saveButton.disabled = true;
|
| 643 |
+
editButton.disabled = true; // <<< AJOUTÉ
|
| 644 |
+
|
| 645 |
+
try {
|
| 646 |
+
// 3. Delete API call
|
| 647 |
+
const response = await fetch(`/api/files/${currentRepoSlug}/delete`, {
|
| 648 |
+
method: 'POST',
|
| 649 |
+
headers: { 'Content-Type': 'application/json' },
|
| 650 |
+
body: JSON.stringify({
|
| 651 |
+
file_path: currentFilePath,
|
| 652 |
+
commit_message: `feat: Delete file ${fileName}`
|
| 653 |
+
})
|
| 654 |
+
});
|
| 655 |
+
|
| 656 |
+
const result = await response.json();
|
| 657 |
+
|
| 658 |
+
if (result.success) {
|
| 659 |
+
// Deletion success
|
| 660 |
+
deleteButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">check</span> Deleted!`;
|
| 661 |
+
alert(`File '${fileName}' deleted successfully.`);
|
| 662 |
+
|
| 663 |
+
// 4. Remove element from sidebar list
|
| 664 |
+
if (currentFileElement) {
|
| 665 |
+
currentFileElement.remove();
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
// 5. Reset editor and state
|
| 669 |
+
currentFileElement = null;
|
| 670 |
+
currentFilePath = '';
|
| 671 |
+
|
| 672 |
+
codeEditor.setOption('readOnly', true); // <<< AJOUTÉ
|
| 673 |
+
|
| 674 |
+
const nextFileItem = fileListItemsContainer.querySelector('.file-list-item');
|
| 675 |
+
if (nextFileItem) {
|
| 676 |
+
// Select next file
|
| 677 |
+
nextFileItem.click();
|
| 678 |
+
} else {
|
| 679 |
+
// Empty repository, enter creation mode
|
| 680 |
+
exitNewFileMode();
|
| 681 |
+
enterNewFileMode();
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
} else {
|
| 685 |
+
// Deletion failure (JSON response with success: false)
|
| 686 |
+
deleteButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">error</span> Failed`;
|
| 687 |
+
alert(`Deletion failed: ${result.message}`);
|
| 688 |
+
|
| 689 |
+
setTimeout(() => {
|
| 690 |
+
deleteButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">delete</span> Delete`;
|
| 691 |
+
deleteButton.disabled = true;
|
| 692 |
+
saveButton.disabled = true;
|
| 693 |
+
editButton.disabled = false; // <<< AJOUTÉ
|
| 694 |
+
}, 2000);
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
} catch (error) {
|
| 698 |
+
// Network error
|
| 699 |
+
deleteButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">warning</span> Error`;
|
| 700 |
+
alert(`Server connection error: ${error.message}`);
|
| 701 |
+
console.error('Delete API error:', error);
|
| 702 |
+
|
| 703 |
+
setTimeout(() => {
|
| 704 |
+
deleteButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">delete</span> Delete`;
|
| 705 |
+
deleteButton.disabled = true;
|
| 706 |
+
saveButton.disabled = true;
|
| 707 |
+
editButton.disabled = false; // <<< AJOUTÉ
|
| 708 |
+
}, 2000);
|
| 709 |
+
}
|
| 710 |
+
};
|
| 711 |
+
|
| 712 |
+
// Fonction pour charger le contenu du fichier
|
| 713 |
+
const loadFileContentForEditor = async (filePath, fileName) => {
|
| 714 |
+
// Mettre à jour l'interface pour afficher l'état de chargement
|
| 715 |
+
editorFileTitle.textContent = `Loading: ${fileName}...`;
|
| 716 |
+
saveButton.disabled = true;
|
| 717 |
+
deleteButton.disabled = true;
|
| 718 |
+
editButton.disabled = true; // <<< AJOUTÉ
|
| 719 |
+
|
| 720 |
+
const fileMeta = getFileMeta(fileName);
|
| 721 |
+
|
| 722 |
+
// Masquer l'éditeur pendant le chargement
|
| 723 |
+
const cmContainer = document.querySelector('.CodeMirror');
|
| 724 |
+
if (cmContainer) cmContainer.style.opacity = '0.5';
|
| 725 |
+
|
| 726 |
+
try {
|
| 727 |
+
// REAL API CALL to backend
|
| 728 |
+
const apiUrl = `/api/file_content/${currentRepoSlug}?path=${encodeURIComponent(filePath)}`;
|
| 729 |
+
const response = await fetch(apiUrl, {
|
| 730 |
+
method: 'GET',
|
| 731 |
+
headers: { 'Content-Type': 'application/json' },
|
| 732 |
+
});
|
| 733 |
+
|
| 734 |
+
const result = await response.json();
|
| 735 |
+
|
| 736 |
+
let fileContent;
|
| 737 |
+
|
| 738 |
+
if (result.success) {
|
| 739 |
+
// Success: Use the actual content returned by the backend
|
| 740 |
+
fileContent = result.file_content;
|
| 741 |
+
} else {
|
| 742 |
+
// Failure: Display the server error message
|
| 743 |
+
fileContent = `// ERROR: Failed to load file content for '${fileName}'.\n// Server message: ${result.message}\n`;
|
| 744 |
+
console.error("File content API error:", result.message);
|
| 745 |
+
}
|
| 746 |
+
|
| 747 |
+
// Update editor with content and appropriate mode
|
| 748 |
+
initializeCodeMirror(fileContent, fileMeta.mode);
|
| 749 |
+
|
| 750 |
+
} catch (error) {
|
| 751 |
+
// Network connection failure
|
| 752 |
+
const errorContent = `// FATAL ERROR: Failed to connect to backend.\n// Details: ${error.message}\n`;
|
| 753 |
+
initializeCodeMirror(errorContent, null);
|
| 754 |
+
console.error("Backend connection error:", error);
|
| 755 |
+
} finally {
|
| 756 |
+
// Finalize interface state
|
| 757 |
+
editorFileTitle.textContent = fileName;
|
| 758 |
+
if (cmContainer) cmContainer.style.opacity = '1';
|
| 759 |
+
|
| 760 |
+
// Mark file as clean after loading
|
| 761 |
+
if (codeEditor) {
|
| 762 |
+
codeEditor.markClean();
|
| 763 |
+
}
|
| 764 |
+
// Buttons are handled by initializeCodeMirror which sets readOnly: true
|
| 765 |
+
saveButton.disabled = true;
|
| 766 |
+
deleteButton.disabled = true;
|
| 767 |
+
editButton.disabled = false; // <<< AJOUTÉ : Always activate Edit after load
|
| 768 |
+
|
| 769 |
+
// Reset Edit button style
|
| 770 |
+
editButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">edit</span> Edit`;
|
| 771 |
+
editButton.classList.remove('bg-link-var', 'text-white', 'hover:bg-primary-hover-var', 'border-link-var');
|
| 772 |
+
editButton.classList.add('hover:text-link-var');
|
| 773 |
+
}
|
| 774 |
+
};
|
| 775 |
+
|
| 776 |
+
// NEW LOGIC: Start file creation mode
|
| 777 |
+
const enterNewFileMode = () => {
|
| 778 |
+
if (currentFileElement) {
|
| 779 |
+
currentFileElement.classList.remove('selected');
|
| 780 |
+
}
|
| 781 |
+
currentFileElement = null;
|
| 782 |
+
currentFilePath = '';
|
| 783 |
+
isCreatingNewFile = true;
|
| 784 |
+
|
| 785 |
+
// 1. Show file name input field
|
| 786 |
+
newFileInputContainer.classList.remove('hidden');
|
| 787 |
+
newFileNameInput.value = '';
|
| 788 |
+
newFileNameInput.focus();
|
| 789 |
+
|
| 790 |
+
// 2. Update editor title
|
| 791 |
+
editorFileTitle.textContent = "Creating a new file...";
|
| 792 |
+
|
| 793 |
+
// 3. Clear editor and set default mode (readOnly: false is handled by initializeCodeMirror when isCreatingNewFile is true)
|
| 794 |
+
initializeCodeMirror("", 'clike');
|
| 795 |
+
|
| 796 |
+
// 4. Activate save button (for commit)
|
| 797 |
+
saveButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">add_box</span> Create and Commit`;
|
| 798 |
+
saveButton.disabled = false;
|
| 799 |
+
|
| 800 |
+
// <<< AJOUTÉ : Disable delete and edit buttons in creation mode
|
| 801 |
+
deleteButton.disabled = true;
|
| 802 |
+
editButton.disabled = true;
|
| 803 |
+
|
| 804 |
+
// Reset Edit button style
|
| 805 |
+
editButton.innerHTML = `<span class="material-symbols-rounded text-base mr-1">edit</span> Edit`;
|
| 806 |
+
editButton.classList.remove('bg-link-var', 'text-white', 'hover:bg-primary-hover-var', 'border-link-var');
|
| 807 |
+
editButton.classList.add('hover:text-link-var');
|
| 808 |
+
|
| 809 |
+
// 5. Update '+' button to become 'Cancel' button
|
| 810 |
+
newFileButton.innerHTML = `<span class="material-symbols-rounded text-base">close</span>`;
|
| 811 |
+
newFileButton.onclick = exitNewFileMode;
|
| 812 |
+
|
| 813 |
+
// Listen for changes in the file name input field
|
| 814 |
+
newFileNameInput.oninput = () => {
|
| 815 |
+
// Update editor title in real-time
|
| 816 |
+
const newName = newFileNameInput.value.trim();
|
| 817 |
+
editorFileTitle.textContent = newName || "Creating a new file...";
|
| 818 |
+
|
| 819 |
+
// Disable save button if file name is empty
|
| 820 |
+
saveButton.disabled = !newName;
|
| 821 |
+
};
|
| 822 |
+
|
| 823 |
+
// Listen for Enter key to save
|
| 824 |
+
newFileNameInput.onkeydown = (e) => {
|
| 825 |
+
if (e.key === 'Enter' && newFileNameInput.value.trim() && !saveButton.disabled) {
|
| 826 |
+
e.preventDefault();
|
| 827 |
+
handleSaveButtonClick();
|
| 828 |
+
}
|
| 829 |
+
};
|
| 830 |
+
|
| 831 |
+
};
|
| 832 |
+
|
| 833 |
+
// NEW LOGIC: Exit creation mode
|
| 834 |
+
const exitNewFileMode = () => {
|
| 835 |
+
isCreatingNewFile = false;
|
| 836 |
+
newFileInputContainer.classList.add('hidden');
|
| 837 |
+
newFileButton.innerHTML = `<span class="material-symbols-rounded text-base">add</span>`;
|
| 838 |
+
newFileButton.onclick = enterNewFileMode;
|
| 839 |
+
|
| 840 |
+
// <<< AJOUTÉ : Disable delete/save, enable edit
|
| 841 |
+
deleteButton.disabled = true;
|
| 842 |
+
saveButton.disabled = true;
|
| 843 |
+
editButton.disabled = false;
|
| 844 |
+
|
| 845 |
+
// Reset to first file (or welcome message if empty)
|
| 846 |
+
const firstFileItem = fileListItemsContainer.querySelector('.file-list-item');
|
| 847 |
+
if (firstFileItem) {
|
| 848 |
+
firstFileItem.click();
|
| 849 |
+
} else {
|
| 850 |
+
editorFileTitle.textContent = 'Select a file to start editing';
|
| 851 |
+
initializeCodeMirror(); // Reset editor with default message (readOnly: true)
|
| 852 |
+
}
|
| 853 |
+
};
|
| 854 |
+
|
| 855 |
+
/**
|
| 856 |
+
* Adds a new file to the sidebar list after a successful commit.
|
| 857 |
+
* @param {string} fileName - Name of the created file.
|
| 858 |
+
*/
|
| 859 |
+
const addNewFileToList = (fileName) => {
|
| 860 |
+
const { icon, color } = getFileMeta(fileName);
|
| 861 |
+
const filePathInRepo = fileName;
|
| 862 |
+
|
| 863 |
+
const item = document.createElement('div');
|
| 864 |
+
item.className = 'file-list-item text-sm text-color-var transition-colors-theme selected';
|
| 865 |
+
item.dataset.filePath = filePathInRepo;
|
| 866 |
+
item.dataset.fileName = fileName;
|
| 867 |
+
|
| 868 |
+
item.innerHTML = `
|
| 869 |
+
<span class="material-symbols-rounded text-base mr-2 align-middle ${color}">${icon}</span>
|
| 870 |
+
<span class="truncate">${fileName}</span>
|
| 871 |
+
`;
|
| 872 |
+
|
| 873 |
+
// Click handler
|
| 874 |
+
item.addEventListener('click', (e) => {
|
| 875 |
+
handleFileClick(item, filePathInRepo, fileName);
|
| 876 |
+
});
|
| 877 |
+
|
| 878 |
+
// Add to the top of the list
|
| 879 |
+
fileListItemsContainer.prepend(item);
|
| 880 |
+
|
| 881 |
+
// Update current state for the new file
|
| 882 |
+
currentFileElement = item;
|
| 883 |
+
currentFilePath = filePathInRepo;
|
| 884 |
+
|
| 885 |
+
// Show the list if it was empty
|
| 886 |
+
fileListItemsContainer.classList.remove('hidden');
|
| 887 |
+
emptyRepoMessage.classList.add('hidden');
|
| 888 |
+
};
|
| 889 |
+
|
| 890 |
+
// Main function to load repository data
|
| 891 |
+
const loadRepoData = async () => {
|
| 892 |
+
// 1. Get repo_slug from URL
|
| 893 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 894 |
+
const repoSlug = urlParams.get('repo_slug');
|
| 895 |
+
// Get user from DOM
|
| 896 |
+
currentRepoUser = document.getElementById('repo-user').textContent;
|
| 897 |
+
|
| 898 |
+
currentRepoSlug = repoSlug;
|
| 899 |
+
|
| 900 |
+
if (!repoSlug) {
|
| 901 |
+
loadingSpinner.innerHTML = '<p class="text-red-500">Error: Repository slug is missing from the URL.</p>';
|
| 902 |
+
initializeCodeMirror();
|
| 903 |
+
return;
|
| 904 |
+
}
|
| 905 |
+
|
| 906 |
+
// Update repo title immediately
|
| 907 |
+
repoTitleElement.textContent = repoSlug;
|
| 908 |
+
|
| 909 |
+
// 2. Show spinner
|
| 910 |
+
loadingSpinner.classList.remove('hidden');
|
| 911 |
+
fileListItemsContainer.classList.add('hidden');
|
| 912 |
+
emptyRepoMessage.classList.add('hidden');
|
| 913 |
+
|
| 914 |
+
// Initialize CodeMirror with waiting message (readOnly: true by default)
|
| 915 |
+
initializeCodeMirror();
|
| 916 |
+
|
| 917 |
+
// Initialize '+' button
|
| 918 |
+
newFileButton.onclick = enterNewFileMode;
|
| 919 |
+
|
| 920 |
+
// Disable delete/save and enable edit by default
|
| 921 |
+
deleteButton.disabled = true;
|
| 922 |
+
saveButton.disabled = true;
|
| 923 |
+
editButton.disabled = false; // <<< AJOUTÉ
|
| 924 |
+
|
| 925 |
+
try {
|
| 926 |
+
// 3. API call
|
| 927 |
+
const response = await fetch(`/api/repo_data/${repoSlug}`, {
|
| 928 |
+
method: 'GET',
|
| 929 |
+
headers: { 'Content-Type': 'application/json' },
|
| 930 |
+
});
|
| 931 |
+
|
| 932 |
+
const result = await response.json();
|
| 933 |
+
|
| 934 |
+
if (!result.success) {
|
| 935 |
+
loadingSpinner.innerHTML = `<p class="text-red-500 text-sm">Loading Error: ${result.message}</p>`;
|
| 936 |
+
editButton.disabled = true; // Disable edit on fatal error
|
| 937 |
+
return;
|
| 938 |
+
}
|
| 939 |
+
|
| 940 |
+
const data = result.data;
|
| 941 |
+
|
| 942 |
+
// 4. Fill metadata
|
| 943 |
+
const info = data.repo_info || {};
|
| 944 |
+
repoTitleElement.textContent = info.repo_name || repoSlug;
|
| 945 |
+
document.getElementById('repo-visibility').textContent = info.visibility || 'Private';
|
| 946 |
+
|
| 947 |
+
// 5. Fill file list
|
| 948 |
+
const filesFromApi = data.file_list || [];
|
| 949 |
+
fileListItemsContainer.innerHTML = ''; // Clean old list
|
| 950 |
+
|
| 951 |
+
if (filesFromApi.length === 0) {
|
| 952 |
+
emptyRepoMessage.classList.remove('hidden');
|
| 953 |
+
// Enter creation mode if repo is empty
|
| 954 |
+
enterNewFileMode();
|
| 955 |
+
editButton.disabled = true; // Edit button remains disabled in creation mode
|
| 956 |
+
|
| 957 |
+
} else {
|
| 958 |
+
fileListItemsContainer.classList.remove('hidden');
|
| 959 |
+
|
| 960 |
+
filesFromApi.forEach(file => {
|
| 961 |
+
const { icon, color } = getFileMeta(file.name);
|
| 962 |
+
|
| 963 |
+
const filePathInRepo = file.path.replace(`datasets/mailix-gitforge/${currentRepoUser}/${repoSlug}/`, '');
|
| 964 |
+
|
| 965 |
+
const item = document.createElement('div');
|
| 966 |
+
item.className = 'file-list-item text-sm text-color-var transition-colors-theme';
|
| 967 |
+
item.dataset.filePath = filePathInRepo;
|
| 968 |
+
item.dataset.fileName = file.name;
|
| 969 |
+
|
| 970 |
+
item.innerHTML = `
|
| 971 |
+
<span class="material-symbols-rounded text-base mr-2 align-middle ${color}">${icon}</span>
|
| 972 |
+
<span class="truncate">${file.name}</span>
|
| 973 |
+
`;
|
| 974 |
+
|
| 975 |
+
// Click handler for editing
|
| 976 |
+
item.addEventListener('click', (e) => {
|
| 977 |
+
handleFileClick(item, filePathInRepo, file.name);
|
| 978 |
+
});
|
| 979 |
+
|
| 980 |
+
fileListItemsContainer.appendChild(item);
|
| 981 |
+
});
|
| 982 |
+
|
| 983 |
+
// Load first file by default
|
| 984 |
+
const firstFileItem = fileListItemsContainer.querySelector('.file-list-item');
|
| 985 |
+
if (firstFileItem) {
|
| 986 |
+
firstFileItem.click(); // Simulate click on the first element
|
| 987 |
+
}
|
| 988 |
+
}
|
| 989 |
+
|
| 990 |
+
} catch (error) {
|
| 991 |
+
loadingSpinner.innerHTML = `<p class="text-red-500 text-sm">Fatal Error: Failed to connect to server. ${error.message}</p>`;
|
| 992 |
+
console.error('Error loading repository data:', error);
|
| 993 |
+
editButton.disabled = true; // Disable edit on connection failure
|
| 994 |
+
} finally {
|
| 995 |
+
// 6. Hide spinner
|
| 996 |
+
loadingSpinner.classList.add('hidden');
|
| 997 |
+
}
|
| 998 |
+
};
|
| 999 |
+
|
| 1000 |
+
// Call function on page load
|
| 1001 |
+
loadRepoData();
|
| 1002 |
+
</script>
|
| 1003 |
+
</body>
|
| 1004 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/form_gitforge.html
ADDED
|
@@ -0,0 +1,650 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 7 |
+
<title>Career Opportunities at GitForge - Recruitment</title>
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
+
<style>
|
| 12 |
+
/* Styles personnalisés pour la variable de couleur bleue de GitForge (supposée) */
|
| 13 |
+
.text-blue-600-var { color: #3b82f6; }
|
| 14 |
+
.hover\:text-blue-600-var:hover { color: #3b82f6; }
|
| 15 |
+
.focus\:border-blue-600-var:focus { border-color: #3b82f6; }
|
| 16 |
+
.focus\:ring-blue-600-var:focus { --tw-ring-color: #3b82f6; }
|
| 17 |
+
.lang-dropdown-container { position: relative; display: inline-block; }
|
| 18 |
+
.lang-menu-dropdown {
|
| 19 |
+
position: absolute; right: 0; bottom: 100%; z-index: 10;
|
| 20 |
+
margin-bottom: 0.5rem;
|
| 21 |
+
width: 12rem;
|
| 22 |
+
background-color: white;
|
| 23 |
+
border-radius: 0.375rem; /* rounded-md */
|
| 24 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 25 |
+
padding: 0.5rem 0;
|
| 26 |
+
opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
|
| 27 |
+
}
|
| 28 |
+
.lang-dropdown-container:hover .lang-menu-dropdown { opacity: 1; visibility: visible; }
|
| 29 |
+
.lang-menu-dropdown a { display: block; padding: 0.5rem 1rem; color: #4b5563; } /* text-gray-700 */
|
| 30 |
+
.lang-menu-dropdown a:hover { background-color: #f3f4f6; color: #3b82f6; } /* hover:bg-gray-100, hover:text-blue-600-var */
|
| 31 |
+
/* Assurer que le menu déroulant du footer s'ouvre bien en haut */
|
| 32 |
+
.footer-dropdown .lang-menu-dropdown {
|
| 33 |
+
bottom: 100%;
|
| 34 |
+
top: auto;
|
| 35 |
+
}
|
| 36 |
+
/* Style de fond ajouté selon la demande */
|
| 37 |
+
.hero-background {
|
| 38 |
+
background-color: #f0f4f8; /* Un gris-bleu clair pour simuler le style */
|
| 39 |
+
background-image: radial-gradient(#d3dce6 1px, transparent 1px),
|
| 40 |
+
radial-gradient(#d3dce6 1px, transparent 1px);
|
| 41 |
+
background-size: 40px 40px;
|
| 42 |
+
background-position: 0 0, 20px 20px;
|
| 43 |
+
}
|
| 44 |
+
</style>
|
| 45 |
+
</head>
|
| 46 |
+
<body class="hero-background flex flex-col min-h-screen">
|
| 47 |
+
|
| 48 |
+
<header class="bg-white border-b border-gray-200">
|
| 49 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
|
| 50 |
+
<div class="flex items-center space-x-8">
|
| 51 |
+
<a href="/" class="text-2xl font-bold text-gray-900 flex items-center">
|
| 52 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6 w-6 mr-2">
|
| 53 |
+
<span>GitForge</span>
|
| 54 |
+
</a>
|
| 55 |
+
<nav class="hidden md:flex space-x-6 text-sm font-medium text-gray-700">
|
| 56 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var">Platform</a>
|
| 57 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var">Company</a>
|
| 58 |
+
<a href="/mindus/nexus/resources" class="hover:text-blue-600-var text-blue-600-var">Resources</a>
|
| 59 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var">Contact us</a>
|
| 60 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var">Enterprise</a>
|
| 61 |
+
<a href="/mindus/nexus/devops" class="hover:text-blue-600-var">DevOps</a>
|
| 62 |
+
</nav>
|
| 63 |
+
</div>
|
| 64 |
+
<div class="flex items-center space-x-4">
|
| 65 |
+
<a href="/form_gitforge" class="px-4 py-2 text-sm font-medium border border-gray-300 rounded-md text-gray-700 hover:border-blue-600-var hover:text-blue-600-var transition bg-gray-100 hover:bg-white">Join Our Talent Community</a>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
</header>
|
| 69 |
+
|
| 70 |
+
<main class="flex-grow py-12 sm:py-16">
|
| 71 |
+
<div class="container mx-auto max-w-5xl px-4 sm:px-6 lg:px-8">
|
| 72 |
+
<div class="bg-white shadow-xl rounded-lg p-6 sm:p-10">
|
| 73 |
+
<h1 class="text-3xl font-extrabold text-gray-900 text-center mb-4">Join the GitForge Team!</h1>
|
| 74 |
+
<p class="text-gray-600 text-center mb-10">Apply for an open position and help us shape the future of software development.</p>
|
| 75 |
+
|
| 76 |
+
<form id="recruitmentForm" class="space-y-6">
|
| 77 |
+
|
| 78 |
+
<div class="border-b border-gray-200 pb-6">
|
| 79 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Application Method</h2>
|
| 80 |
+
<p class="text-gray-600 mb-6">We recommend uploading your CV for a faster application process, but you can also fill out the form manually.</p>
|
| 81 |
+
|
| 82 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 items-start">
|
| 83 |
+
|
| 84 |
+
<div id="cv-upload-container">
|
| 85 |
+
<label for="cvFile" class="block text-sm font-medium text-gray-700 mb-2">Upload CV / Resume (PDF preferred)</label>
|
| 86 |
+
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md bg-gray-50">
|
| 87 |
+
<div class="space-y-1 text-center">
|
| 88 |
+
<svg class="mx-auto h-12 w-12 text-gray-400" stroke="currentColor" fill="none" viewBox="0 0 48 48" aria-hidden="true">
|
| 89 |
+
<path d="M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m-4-4h.01" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
| 90 |
+
</svg>
|
| 91 |
+
<div class="flex text-sm text-gray-600 justify-center">
|
| 92 |
+
<label for="cvFile" class="relative cursor-pointer bg-white rounded-md font-medium text-blue-600-var hover:text-blue-500-var focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-600-var">
|
| 93 |
+
<span>Upload a file</span>
|
| 94 |
+
<input id="cvFile" name="cvFile" type="file" accept=".pdf,.doc,.docx" class="sr-only">
|
| 95 |
+
</label>
|
| 96 |
+
<p class="pl-1">or drag and drop</p>
|
| 97 |
+
</div>
|
| 98 |
+
<p class="text-xs text-gray-500">PDF, DOCX up to 10MB</p>
|
| 99 |
+
<p id="cv-filename-display" class="text-sm font-medium text-gray-800 mt-2 hidden"></p>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<div class="flex flex-col items-center justify-center p-4 h-full">
|
| 105 |
+
<p class="text-center font-bold text-gray-700 mb-3">OR</p>
|
| 106 |
+
<button type="button" id="toggleFormButton" class="px-4 py-2 text-sm font-medium border border-gray-300 rounded-md text-gray-700 hover:border-blue-600-var hover:text-blue-600-var transition bg-gray-100 hover:bg-white w-full">Fill Form Manually</button>
|
| 107 |
+
<p id="manual-form-status" class="text-sm text-green-600 mt-3 hidden">Manual form selected. CV not required.</p>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
|
| 112 |
+
<div id="manual-form-sections" class="transition-opacity duration-500 opacity-100 space-y-6">
|
| 113 |
+
|
| 114 |
+
<div id="personal-info-section" class="border-b border-gray-200 pb-6">
|
| 115 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Personal Information</h2>
|
| 116 |
+
|
| 117 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
| 118 |
+
<div>
|
| 119 |
+
<label for="firstName" class="block text-sm font-medium text-gray-700">First Name <span class="text-red-500">*</span></label>
|
| 120 |
+
<input type="text" name="firstName" id="firstName" class="form-field-req mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 121 |
+
</div>
|
| 122 |
+
<div>
|
| 123 |
+
<label for="lastName" class="block text-sm font-medium text-gray-700">Last Name <span class="text-red-500">*</span></label>
|
| 124 |
+
<input type="text" name="lastName" id="lastName" class="form-field-req mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 125 |
+
</div>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
| 129 |
+
<div>
|
| 130 |
+
<label for="email" class="block text-sm font-medium text-gray-700">Email Address <span class="text-red-500">*</span></label>
|
| 131 |
+
<input type="email" name="email" id="email" class="form-field-req mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 132 |
+
</div>
|
| 133 |
+
<div>
|
| 134 |
+
<label for="phone" class="block text-sm font-medium text-gray-700">Phone Number</label>
|
| 135 |
+
<input type="tel" name="phone" id="phone" class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
| 140 |
+
<div>
|
| 141 |
+
<label for="birthDate" class="block text-sm font-medium text-gray-700">Date of Birth</label>
|
| 142 |
+
<input type="date" name="birthDate" id="birthDate" class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 143 |
+
</div>
|
| 144 |
+
<div>
|
| 145 |
+
<label for="country" class="block text-sm font-medium text-gray-700">Country</label>
|
| 146 |
+
<select id="country" name="country" class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm bg-white">
|
| 147 |
+
<option value="" disabled selected>Select your country...</option>
|
| 148 |
+
</select>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<div class="mt-4">
|
| 153 |
+
<label for="city" class="block text-sm font-medium text-gray-700">City</label>
|
| 154 |
+
<input type="text" name="city" id="city" class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
|
| 158 |
+
<div id="role-experience-section" class="border-b border-gray-200 pb-6 pt-6">
|
| 159 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Role and Experience</h2>
|
| 160 |
+
|
| 161 |
+
<div>
|
| 162 |
+
<label for="position" class="block text-sm font-medium text-gray-700">Position Applied For <span class="text-red-500">*</span></label>
|
| 163 |
+
<select id="position" name="position" class="form-field-req mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm bg-white">
|
| 164 |
+
<option value="" disabled selected>Select a position...</option>
|
| 165 |
+
<option value="fullstack-developer">Full-Stack Developer</option>
|
| 166 |
+
<option value="frontend-engineer">Frontend Engineer</option>
|
| 167 |
+
<option value="backend-engineer">Backend Engineer</option>
|
| 168 |
+
<option value="devops-engineer">DevOps Engineer</option>
|
| 169 |
+
<option value="product-manager">Product Manager</option>
|
| 170 |
+
<option value="ux-designer">UX/UI Designer</option>
|
| 171 |
+
<option value="other">Other</option>
|
| 172 |
+
</select>
|
| 173 |
+
</div>
|
| 174 |
+
|
| 175 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
| 176 |
+
<div>
|
| 177 |
+
<label for="currentPosition" class="block text-sm font-medium text-gray-700">Current Position</label>
|
| 178 |
+
<input type="text" name="currentPosition" id="currentPosition" placeholder="e.g., Senior Software Engineer" class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 179 |
+
</div>
|
| 180 |
+
<div>
|
| 181 |
+
<label for="previousPosition" class="block text-sm font-medium text-gray-700">Previous Position</label>
|
| 182 |
+
<input type="text" name="previousPosition" id="previousPosition" placeholder="e.g., Junior Developer" class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
|
| 186 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
| 187 |
+
<div>
|
| 188 |
+
<label for="gitLink" class="block text-sm font-medium text-gray-700">GitHub/GitForge Profile Link <span class="text-red-500">*</span></label>
|
| 189 |
+
<input type="url" name="gitLink" id="gitLink" placeholder="https://github.com/username" class="form-field-req mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 190 |
+
</div>
|
| 191 |
+
<div>
|
| 192 |
+
<label for="experience" class="block text-sm font-medium text-gray-700">Years of Professional Experience <span class="text-red-500">*</span></label>
|
| 193 |
+
<input type="number" name="experience" id="experience" min="0" max="50" value="0" class="form-field-req mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm">
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
|
| 197 |
+
<div class="mt-4">
|
| 198 |
+
<label for="keySkills" class="block text-sm font-medium text-gray-700">Key Skills (e.g., Python, Docker, Kubernetes, React)</label>
|
| 199 |
+
<textarea id="keySkills" name="keySkills" rows="3" placeholder="List your key technical or professional skills, separated by commas." class="form-field-opt mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm"></textarea>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<div class="relative flex items-start mt-4">
|
| 203 |
+
<div class="flex items-center h-5">
|
| 204 |
+
<input id="isStudent" name="isStudent" type="checkbox" class="form-field-opt focus:ring-blue-600-var h-4 w-4 text-blue-600-var border-gray-300 rounded">
|
| 205 |
+
</div>
|
| 206 |
+
<div class="ml-3 text-sm">
|
| 207 |
+
<label for="isStudent" class="font-medium text-gray-700">I am currently a student.</label>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
<div class="pt-6">
|
| 213 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Motivation</h2>
|
| 214 |
+
|
| 215 |
+
<div>
|
| 216 |
+
<label for="motivation" class="block text-sm font-medium text-gray-700">Motivation Message / Cover Letter</label>
|
| 217 |
+
<textarea id="motivation" name="motivation" rows="4" placeholder="Tell us why you want to join GitForge and what you can bring to the team." class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var sm:text-sm"></textarea>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<div class="pt-6">
|
| 222 |
+
<button type="submit" id="submit-button" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-gray-800 hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-600-var transition duration-300">Submit Application</button>
|
| 223 |
+
</div>
|
| 224 |
+
</form>
|
| 225 |
+
</div>
|
| 226 |
+
</div>
|
| 227 |
+
</main>
|
| 228 |
+
|
| 229 |
+
<footer class="bg-white border-t border-gray-200 pt-16 pb-10">
|
| 230 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 231 |
+
<div class="grid grid-cols-2 md:grid-cols-6 gap-8">
|
| 232 |
+
|
| 233 |
+
<div class="col-span-2">
|
| 234 |
+
<a href="/" class="text-2xl font-bold text-gray-900 flex items-center mb-4">
|
| 235 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6 w-6 mr-2">
|
| 236 |
+
<span>GitForge</span>
|
| 237 |
+
</a>
|
| 238 |
+
<p class="text-gray-600">The unified DevOps platform that accelerates your software lifecycle.</p>
|
| 239 |
+
<div class="flex space-x-4 mt-6">
|
| 240 |
+
<a href="#" aria-label="Twitter" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 241 |
+
<i class="fab fa-twitter text-xl"></i>
|
| 242 |
+
</a>
|
| 243 |
+
<a href="#" aria-label="LinkedIn" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 244 |
+
<i class="fab fa-linkedin-in text-xl"></i>
|
| 245 |
+
</a>
|
| 246 |
+
<a href="#" aria-label="Facebook" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 247 |
+
<i class="fab fa-facebook-f text-xl"></i>
|
| 248 |
+
</a>
|
| 249 |
+
<a href="#" aria-label="GitHub" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 250 |
+
<i class="fab fa-github text-xl"></i>
|
| 251 |
+
</a>
|
| 252 |
+
<a href="#" aria-label="YouTube" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 253 |
+
<i class="fab fa-youtube text-xl"></i>
|
| 254 |
+
</a>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
|
| 258 |
+
<div class="col-span-1">
|
| 259 |
+
<h5 class="text-sm font-semibold text-gray-900-var mb-4">Product</h5>
|
| 260 |
+
<ul class="space-y-3">
|
| 261 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Features</a></li>
|
| 262 |
+
<li><a href="/mindus/nexus/pricing" class="text-gray-600 hover:text-blue-600-var transition duration-200">Pricing</a></li>
|
| 263 |
+
<li><a href="/mindus/nexus/a_propos" class="text-gray-600 hover:text-blue-600-var transition duration-200">Enterprise</a></li>
|
| 264 |
+
<li><a href="/mindus/nexus/politique_confidentialite" class="text-gray-600 hover:text-blue-600-var transition duration-200">Security</a></li>
|
| 265 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Roadmap</a></li>
|
| 266 |
+
</ul>
|
| 267 |
+
</div>
|
| 268 |
+
|
| 269 |
+
<div class="col-span-1">
|
| 270 |
+
<h5 class="text-sm font-semibold text-gray-900-var mb-4">Company</h5>
|
| 271 |
+
<ul class="space-y-3">
|
| 272 |
+
<li><a href="/mindus/nexus/about" class="text-gray-600 hover:text-blue-600-var transition duration-200">About Us</a></li>
|
| 273 |
+
<li><a href="/mindus/nexus/careers" class="text-gray-600 hover:text-blue-600-var transition duration-200">Careers</a></li>
|
| 274 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Press</a></li>
|
| 275 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Investors</a></li>
|
| 276 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Leadership</a></li>
|
| 277 |
+
</ul>
|
| 278 |
+
</div>
|
| 279 |
+
|
| 280 |
+
<div class="col-span-1">
|
| 281 |
+
<h5 class="text-sm font-semibold text-gray-900-var mb-4">Resources</h5>
|
| 282 |
+
<ul class="space-y-3">
|
| 283 |
+
<li><a href="/mindus/nexus/documentation" class="text-gray-600 hover:text-blue-600-var transition duration-200">Documentation</a></li>
|
| 284 |
+
<li><a href="/mindus/nexus/community" class="text-gray-600 hover:text-blue-600-var transition duration-200">Community Forum</a></li>
|
| 285 |
+
<li><a href="/mindus/nexus/blog" class="text-gray-600 hover:text-blue-600-var transition duration-200">Blog</a></li>
|
| 286 |
+
<li><a href="/mindus/nexus/customer_stories" class="text-gray-600 hover:text-blue-600-var transition duration-200">Customer Stories</a></li>
|
| 287 |
+
<li><a href="/mindus/nexus/partners" class="text-gray-600 hover:text-blue-600-var transition duration-200">Partners</a></li>
|
| 288 |
+
<li><a href="/mindus/nexus/all_stories" class="text-gray-600 hover:text-blue-600-var transition duration-200">All stories</a></li>
|
| 289 |
+
</ul>
|
| 290 |
+
</div>
|
| 291 |
+
|
| 292 |
+
<div class="col-span-1">
|
| 293 |
+
<h5 class="text-sm font-semibold text-gray-900-var mb-4">Legal</h5>
|
| 294 |
+
<ul class="space-y-3">
|
| 295 |
+
<li><a href="/mindus/nexus/conditions_utilisation" class="text-gray-600 hover:text-blue-600-var transition duration-200">Terms of Service</a></li>
|
| 296 |
+
<li><a href="/mindus/nexus/politique_confidentialite" class="text-gray-600 hover:text-blue-600-var transition duration-200">Privacy Policy</a></li>
|
| 297 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Acceptable Use</a></li>
|
| 298 |
+
<li><a href="#" class="text-gray-600 hover:text-blue-600-var transition duration-200">Sitemap</a></li>
|
| 299 |
+
<li><a href="/mindus/nexus/contact" class="text-gray-600 hover:text-blue-600-var transition duration-200">Contact</a></li>
|
| 300 |
+
</ul>
|
| 301 |
+
</div>
|
| 302 |
+
|
| 303 |
+
</div>
|
| 304 |
+
|
| 305 |
+
<div class="mt-12 md:mt-16 border-t border-gray-200 pt-8 flex flex-col md:flex-row justify-between items-start">
|
| 306 |
+
<div>
|
| 307 |
+
<h4 class="text-sm font-semibold text-gray-900-var mb-4">Stay Updated with GitForge</h4>
|
| 308 |
+
<p class="text-sm text-gray-600 mb-4 md:mb-0 max-w-sm">Subscribe to our newsletter and get the latest DevOps news and product updates.</p>
|
| 309 |
+
</div>
|
| 310 |
+
<form class="flex w-full md:w-auto mt-4 md:mt-0">
|
| 311 |
+
<input type="email" placeholder="Your email address" class="py-2 px-3 border border-gray-300 rounded-l-md focus:outline-none focus:ring-blue-600-var focus:border-blue-600-var w-full md:w-64" required>
|
| 312 |
+
<button type="submit" class="bg-blue-600-var text-white py-2 px-4 rounded-r-md hover:bg-blue-700-var transition duration-200">Subscribe</button>
|
| 313 |
+
</form>
|
| 314 |
+
</div>
|
| 315 |
+
|
| 316 |
+
<div class="mt-8 flex flex-col md:flex-row justify-between items-start md:items-center">
|
| 317 |
+
<p class="text-sm text-gray-500 order-2 md:order-1 mt-4 md:mt-0">© 2025 GitForge. All rights reserved.</p>
|
| 318 |
+
</div>
|
| 319 |
+
</div>
|
| 320 |
+
</footer>
|
| 321 |
+
|
| 322 |
+
<script>
|
| 323 |
+
// Définition des constantes pour les messages d'alerte et de bouton (MAINTEIN EN ANGLAIS)
|
| 324 |
+
const ALERTS = {
|
| 325 |
+
'alert-cv-missing': "Please attach your CV or fill out the required form fields to submit your application.",
|
| 326 |
+
'alert-submission-fail': "Submission failed. Please try again or contact support. Details: ",
|
| 327 |
+
'alert-submission-success': "Your application has been successfully submitted! An ID has been assigned: ",
|
| 328 |
+
'alert-validation-error': "Please fill in all required fields (marked with *).",
|
| 329 |
+
'btn-submitting': "Submitting..."
|
| 330 |
+
};
|
| 331 |
+
|
| 332 |
+
const countries = [
|
| 333 |
+
{ code: "AF", en: "Afghanistan" }, { code: "AL", en: "Albania" }, { code: "DZ", en: "Algeria" }, { code: "AS", en: "American Samoa" }, { code: "AD", en: "Andorra" }, { code: "AO", en: "Angola" }, { code: "AR", en: "Argentina" }, { code: "AM", en: "Armenia" }, { code: "AU", en: "Australia" }, { code: "AT", en: "Austria" }, { code: "AZ", en: "Azerbaijan" }, { code: "BS", en: "Bahamas" }, { code: "BH", en: "Bahrain" }, { code: "BD", en: "Bangladesh" }, { code: "BB", en: "Barbados" }, { code: "BY", en: "Belarus" }, { code: "BE", en: "Belgium" }, { code: "BZ", en: "Belize" }, { code: "BJ", en: "Benin" }, { code: "BT", en: "Bhutan" }, { code: "BO", en: "Bolivia" }, { code: "BA", en: "Bosnia and Herzegovina" }, { code: "BW", en: "Botswana" }, { code: "BR", en: "Brazil" }, { code: "BG", en: "Bulgaria" }, { code: "BF", en: "Burkina Faso" }, { code: "KH", en: "Cambodia" }, { code: "CM", en: "Cameroon" }, { code: "CA", en: "Canada" }, { code: "CF", en: "Central African Republic" }, { code: "TD", "en": "Chad" }, { code: "CL", en: "Chile" }, { code: "CN", en: "China" }, { code: "CO", en: "Colombia" }, { code: "CD", en: "Congo, Democratic Republic of the" }, { code: "CR", en: "Costa Rica" }, { code: "HR", en: "Croatia" }, { code: "CU", en: "Cuba" }, { code: "CY", en: "Cyprus" }, { code: "CZ", en: "Czechia" }, { code: "DK", en: "Denmark" }, { code: "DJ", en: "Djibouti" }, { code: "DO", en: "Dominican Republic" }, { code: "EC", en: "Ecuador" }, { code: "EG", en: "Egypt" }, { code: "SV", en: "El Salvador" }, { code: "ER", en: "Eritrea" }, { code: "EE", en: "Estonia" }, { code: "ET", en: "Ethiopia" }, { code: "FJ", en: "Fiji" }, { code: "FI", en: "Finland" }, { code: "FR", en: "France" }, { code: "GA", en: "Gabon" }, { code: "GE", en: "Georgia" }, { code: "DE", en: "Germany" }, { code: "GH", en: "Ghana" }, { code: "GR", en: "Greece" }, { code: "GT", en: "Guatemala" }, { code: "GN", en: "Guinea" }, { code: "HT", en: "Haiti" }, { code: "HN", en: "Honduras" }, { code: "HK", en: "Hong Kong" }, { code: "HU", en: "Hungary" }, { code: "IS", en: "Iceland" }, { code: "IN", en: "India" }, { code: "ID", en: "Indonesia" }, { code: "IR", en: "Iran" }, { code: "IQ", en: "Iraq" }, { code: "IE", en: "Ireland" }, { code: "IL", en: "Israel" }, { code: "IT", en: "Italy" }, { code: "JM", en: "Jamaica" }, { code: "JP", en: "Japan" }, { code: "JO", en: "Jordan" }, { code: "KZ", en: "Kazakhstan" }, { code: "KE", en: "Kenya" }, { code: "KW", en: "Kuwait" }, { code: "LA", en: "Laos" }, { code: "LV", en: "Latvia" }, { code: "LB", en: "Lebanon" }, { code: "LY", en: "Libya" }, { code: "LT", en: "Lithuania" }, { code: "LU", en: "Luxembourg" }, { code: "MG", en: "Madagascar" }, { code: "MW", en: "Malawi" }, { code: "MY", en: "Malaysia" }, { code: "MV", en: "Maldives" }, { code: "MX", en: "Mexico" }, { code: "MD", en: "Moldova" }, { code: "MA", en: "Morocco" }, { code: "MZ", en: "Mozambique" }, { code: "MM", en: "Myanmar" }, { code: "NP", en: "Nepal" }, { code: "NL", en: "Netherlands" }, { code: "NZ", en: "New Zealand" }, { code: "NI", en: "Nicaragua" }, { code: "NG", en: "Nigeria" }, { code: "KP", en: "North Korea" }, { code: "NO", en: "Norway" }, { code: "OM", en: "Oman" }, { code: "PK", en: "Pakistan" }, { code: "PA", en: "Panama" }, { code: "PG", en: "Papua New Guinea" }, { code: "PE", en: "Peru" }, { code: "PH", en: "Philippines" }, { code: "PL", en: "Poland" }, { code: "PT", en: "Portugal" }, { code: "QA", en: "Qatar" }, { code: "RO", en: "Romania" }, { code: "RU", en: "Russia" }, { code: "SA", en: "Saudi Arabia" }, { code: "SN", en: "Senegal" }, { code: "RS", en: "Serbia" }, { code: "SG", en: "Singapore" }, { code: "SK", en: "Slovakia" }, { code: "SI", en: "Slovenia" }, { code: "ZA", en: "South Africa" }, { code: "KR", en: "South Korea" }, { code: "ES", en: "Spain" }, { code: "LK", en: "Sri Lanka" }, { code: "SD", en: "Sudan" }, { code: "SE", en: "Sweden" }, { code: "CH", en: "Switzerland" }, { code: "SY", en: "Syria" }, { code: "TW", en: "Taiwan" }, { code: "TJ", en: "Tajikistan" }, { code: "TZ", en: "Tanzania" }, { code: "TH", en: "Thailand" }, { code: "TN", en: "Tunisia" }, { code: "TR", en: "Turkey" }, { code: "UG", en: "Uganda" }, { code: "UA", en: "Ukraine" }, { code: "AE", en: "United Arab Emirates" }, { code: "GB", en: "United Kingdom" }, { code: "US", en: "United States" }, { code: "UY", en: "Uruguay" }, { code: "UZ", en: "Uzbekistan" }, { code: "VE", en: "Venezuela" }, { code: "VN", en: "Vietnam" }, { code: "YE", en: "Yemen" }, { code: "ZM", en: "Zambia" }, { code: "ZW", en: "Zimbabwe" }
|
| 334 |
+
];
|
| 335 |
+
|
| 336 |
+
let currentLang = 'en'; // Langue par défaut (maintenue en 'en')
|
| 337 |
+
let isManualFormEnabled = false;
|
| 338 |
+
|
| 339 |
+
// Fonction pour remplir la liste déroulante des pays
|
| 340 |
+
function populateCountries() {
|
| 341 |
+
const countrySelect = document.getElementById('country');
|
| 342 |
+
// Retirer toutes les options sauf la première (Select your country...)
|
| 343 |
+
Array.from(countrySelect.options).slice(1).forEach(option => option.remove());
|
| 344 |
+
|
| 345 |
+
countries.forEach(country => {
|
| 346 |
+
const option = document.createElement('option');
|
| 347 |
+
option.value = country.code;
|
| 348 |
+
option.textContent = country.en; // Utiliser le nom en anglais pour le mode anglais
|
| 349 |
+
countrySelect.appendChild(option);
|
| 350 |
+
});
|
| 351 |
+
// La première option (Select your country...) est conservée telle quelle dans le HTML
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
// Fonction simplifiée (utilisée uniquement par updateFormState pour les textes spécifiques)
|
| 355 |
+
function updateTextContent(el, key) {
|
| 356 |
+
if (el.id === 'toggleFormButton') {
|
| 357 |
+
el.textContent = isManualFormEnabled ? el.textContent : 'Fill Form Manually'; // Conserve le texte du bouton en anglais
|
| 358 |
+
} else if (el.id === 'manual-form-status') {
|
| 359 |
+
el.textContent = 'Manual form selected. CV not required.'; // Conserve le texte du statut en anglais
|
| 360 |
+
} else if (key === 'form-label-cvFile-new') {
|
| 361 |
+
// Remplacer le contenu du label CV avec gestion de l'optionnel
|
| 362 |
+
const optionalText = isManualFormEnabled ? ' <span class=\'text-gray-500\'>(Optional)</span>' : '';
|
| 363 |
+
el.innerHTML = 'Upload CV / Resume (PDF, DOCX)' + optionalText;
|
| 364 |
+
}
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
|
| 368 |
+
// Fonction pour gérer l'état du formulaire (CV ou Manuelle)
|
| 369 |
+
function updateFormState() {
|
| 370 |
+
const cvFile = document.getElementById('cvFile').files[0];
|
| 371 |
+
const isCVSelected = cvFile && cvFile.size > 0;
|
| 372 |
+
const formFieldsReq = document.querySelectorAll('.form-field-req');
|
| 373 |
+
const manualFormSections = document.getElementById('manual-form-sections');
|
| 374 |
+
const toggleFormButton = document.getElementById('toggleFormButton');
|
| 375 |
+
const manualFormStatus = document.getElementById('manual-form-status');
|
| 376 |
+
const cvFilenameDisplay = document.getElementById('cv-filename-display');
|
| 377 |
+
const cvLabel = document.querySelector('label[for="cvFile"]');
|
| 378 |
+
|
| 379 |
+
// Mise à jour de l'affichage du nom de fichier
|
| 380 |
+
if (isCVSelected) {
|
| 381 |
+
cvFilenameDisplay.textContent = cvFile.name;
|
| 382 |
+
cvFilenameDisplay.classList.remove('hidden');
|
| 383 |
+
manualFormStatus.classList.add('hidden'); // Cacher le statut manuel
|
| 384 |
+
} else {
|
| 385 |
+
cvFilenameDisplay.classList.add('hidden');
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
// Logique d'activation/désactivation
|
| 389 |
+
if (isCVSelected) {
|
| 390 |
+
isManualFormEnabled = false; // Le mode CV prend le dessus
|
| 391 |
+
// Désactiver les champs requis et les rendre non obligatoires
|
| 392 |
+
formFieldsReq.forEach(field => {
|
| 393 |
+
field.setAttribute('readonly', true);
|
| 394 |
+
field.removeAttribute('required');
|
| 395 |
+
field.classList.add('bg-gray-100', 'cursor-not-allowed');
|
| 396 |
+
field.previousElementSibling.querySelector('.text-red-500')?.classList.add('hidden');
|
| 397 |
+
});
|
| 398 |
+
// Rendre les champs optionnels non obligatoires et non éditables
|
| 399 |
+
document.querySelectorAll('.form-field-opt').forEach(field => {
|
| 400 |
+
field.removeAttribute('required');
|
| 401 |
+
field.setAttribute('readonly', true);
|
| 402 |
+
field.classList.add('bg-gray-100', 'cursor-not-allowed');
|
| 403 |
+
});
|
| 404 |
+
manualFormSections.classList.add('opacity-50');
|
| 405 |
+
|
| 406 |
+
// Texte du bouton: doit être "Fill Form Manually"
|
| 407 |
+
toggleFormButton.textContent = "Fill Form Manually";
|
| 408 |
+
toggleFormButton.classList.remove('bg-green-100', 'text-green-700', 'border-green-300');
|
| 409 |
+
toggleFormButton.classList.add('bg-gray-100', 'text-gray-700', 'border-gray-300');
|
| 410 |
+
|
| 411 |
+
if (cvLabel) {
|
| 412 |
+
// Masquer la mention (Optional) si le CV est présent
|
| 413 |
+
cvLabel.innerHTML = 'Upload CV / Resume (PDF, DOCX)';
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
} else if (isManualFormEnabled) {
|
| 417 |
+
// Activer le mode manuel
|
| 418 |
+
// Rendre les champs requis obligatoires
|
| 419 |
+
formFieldsReq.forEach(field => {
|
| 420 |
+
field.removeAttribute('readonly');
|
| 421 |
+
field.setAttribute('required', true);
|
| 422 |
+
field.classList.remove('bg-gray-100', 'cursor-not-allowed');
|
| 423 |
+
field.previousElementSibling.querySelector('.text-red-500')?.classList.remove('hidden');
|
| 424 |
+
});
|
| 425 |
+
// Rendre les champs optionnels non obligatoires et éditables
|
| 426 |
+
document.querySelectorAll('.form-field-opt').forEach(field => {
|
| 427 |
+
field.removeAttribute('required');
|
| 428 |
+
field.removeAttribute('readonly');
|
| 429 |
+
field.classList.remove('bg-gray-100', 'cursor-not-allowed');
|
| 430 |
+
});
|
| 431 |
+
manualFormSections.classList.remove('opacity-50');
|
| 432 |
+
manualFormStatus.classList.remove('hidden'); // Afficher le statut manuel
|
| 433 |
+
manualFormStatus.textContent = 'Manual form selected. CV not required.';
|
| 434 |
+
|
| 435 |
+
// Texte du bouton: doit être "Fill Form Manually"
|
| 436 |
+
toggleFormButton.textContent = "Fill Form Manually";
|
| 437 |
+
toggleFormButton.classList.add('bg-green-100', 'text-green-700', 'border-green-300');
|
| 438 |
+
toggleFormButton.classList.remove('bg-gray-100', 'text-gray-700', 'border-gray-300');
|
| 439 |
+
|
| 440 |
+
// Mettre à jour le libellé du CV pour indiquer qu'il est facultatif
|
| 441 |
+
if (cvLabel) {
|
| 442 |
+
cvLabel.innerHTML = 'Upload CV / Resume (PDF, DOCX)' + ` <span class='text-gray-500'>(Optional)</span>`;
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
} else {
|
| 446 |
+
// État par défaut (ni CV, ni mode manuel explicite)
|
| 447 |
+
// Le formulaire est editable.
|
| 448 |
+
formFieldsReq.forEach(field => {
|
| 449 |
+
field.removeAttribute('readonly');
|
| 450 |
+
field.setAttribute('required', true);
|
| 451 |
+
field.classList.remove('bg-gray-100', 'cursor-not-allowed');
|
| 452 |
+
field.previousElementSibling.querySelector('.text-red-500')?.classList.remove('hidden');
|
| 453 |
+
});
|
| 454 |
+
document.querySelectorAll('.form-field-opt').forEach(field => {
|
| 455 |
+
field.removeAttribute('required');
|
| 456 |
+
field.removeAttribute('readonly');
|
| 457 |
+
field.classList.remove('bg-gray-100', 'cursor-not-allowed');
|
| 458 |
+
});
|
| 459 |
+
manualFormSections.classList.remove('opacity-50');
|
| 460 |
+
manualFormStatus.classList.add('hidden');
|
| 461 |
+
// Texte du bouton: doit être "Fill Form Manually"
|
| 462 |
+
toggleFormButton.textContent = "Fill Form Manually";
|
| 463 |
+
toggleFormButton.classList.remove('bg-green-100', 'text-green-700', 'border-green-300');
|
| 464 |
+
toggleFormButton.classList.add('bg-gray-100', 'text-gray-700', 'border-gray-300');
|
| 465 |
+
|
| 466 |
+
// Revenir au libellé par défaut (requis)
|
| 467 |
+
if (cvLabel) {
|
| 468 |
+
cvLabel.innerHTML = 'Upload CV / Resume (PDF, DOCX)';
|
| 469 |
+
}
|
| 470 |
+
}
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
// Exécuter l'initialisation des pays et de l'état du formulaire au chargement
|
| 474 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 475 |
+
populateCountries();
|
| 476 |
+
updateFormState(); // Initialiser l'état correct
|
| 477 |
+
});
|
| 478 |
+
|
| 479 |
+
|
| 480 |
+
// Gestion de l'événement de bascule du formulaire (manuel/CV)
|
| 481 |
+
document.getElementById('toggleFormButton').addEventListener('click', () => {
|
| 482 |
+
const cvFile = document.getElementById('cvFile');
|
| 483 |
+
|
| 484 |
+
// Si un CV est sélectionné, le bouton sert à l'enlever
|
| 485 |
+
if (cvFile.files.length > 0) {
|
| 486 |
+
cvFile.value = ''; // Réinitialiser le fichier
|
| 487 |
+
}
|
| 488 |
+
// Basculer le mode manuel (il ne s'active que si aucun CV n'est sélectionné)
|
| 489 |
+
isManualFormEnabled = !isManualFormEnabled;
|
| 490 |
+
|
| 491 |
+
updateFormState();
|
| 492 |
+
});
|
| 493 |
+
|
| 494 |
+
// Mise à jour de l'état si un fichier est sélectionné/désélectionné
|
| 495 |
+
document.getElementById('cvFile').addEventListener('change', updateFormState);
|
| 496 |
+
|
| 497 |
+
|
| 498 |
+
/**
|
| 499 |
+
* Logique de soumission du formulaire vers le backend /apply et /submit_application_data
|
| 500 |
+
*/
|
| 501 |
+
const form = document.getElementById('recruitmentForm');
|
| 502 |
+
const submitButton = document.getElementById('submit-button');
|
| 503 |
+
const requiredFields = document.querySelectorAll('.form-field-req');
|
| 504 |
+
|
| 505 |
+
function validateForm() {
|
| 506 |
+
let isValid = true;
|
| 507 |
+
requiredFields.forEach(field => {
|
| 508 |
+
// Le champ est requis s'il n'est PAS en lecture seule (c'est-à-dire en mode manuel ou par défaut)
|
| 509 |
+
if (!field.hasAttribute('readonly') && field.value.trim() === '') {
|
| 510 |
+
isValid = false;
|
| 511 |
+
field.classList.add('border-red-500');
|
| 512 |
+
} else {
|
| 513 |
+
field.classList.remove('border-red-500');
|
| 514 |
+
}
|
| 515 |
+
});
|
| 516 |
+
return isValid;
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
form.addEventListener('submit', async (e) => {
|
| 520 |
+
e.preventDefault();
|
| 521 |
+
|
| 522 |
+
const cvFile = document.getElementById('cvFile').files[0];
|
| 523 |
+
const isCVSelected = cvFile && cvFile.size > 0;
|
| 524 |
+
const isManualValid = validateForm();
|
| 525 |
+
|
| 526 |
+
// Nettoyage visuel des erreurs précédentes
|
| 527 |
+
document.getElementById('cv-upload-container').classList.remove('border-4', 'border-red-500', 'rounded-lg');
|
| 528 |
+
document.getElementById('personal-info-section').classList.remove('border-t-4', 'border-red-500');
|
| 529 |
+
|
| 530 |
+
// --- 1. Validation Générale et Détermination de la Route ---
|
| 531 |
+
|
| 532 |
+
let submissionType; // 'cv_and_data', 'data_only', ou 'error'
|
| 533 |
+
|
| 534 |
+
if (isCVSelected) {
|
| 535 |
+
submissionType = 'cv_and_data'; // Route: /apply (Multipart)
|
| 536 |
+
} else if (isManualFormEnabled || isManualValid) {
|
| 537 |
+
// Mode manuel ou mode par défaut avec champs valides
|
| 538 |
+
if (!isManualValid) {
|
| 539 |
+
alert(ALERTS['alert-validation-error']);
|
| 540 |
+
document.getElementById('personal-info-section').classList.add('border-t-4', 'border-red-500');
|
| 541 |
+
return;
|
| 542 |
+
}
|
| 543 |
+
submissionType = 'data_only'; // Route: /submit_application_data (JSON body)
|
| 544 |
+
} else {
|
| 545 |
+
// Aucun CV, pas en mode manuel, et les champs requis ne sont pas remplis
|
| 546 |
+
alert(ALERTS['alert-cv-missing']);
|
| 547 |
+
document.getElementById('cv-upload-container').classList.add('border-4', 'border-red-500', 'rounded-lg');
|
| 548 |
+
return;
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
// --- 2. Préparation des Données et Configuration de l'API ---
|
| 552 |
+
|
| 553 |
+
// Afficher l'état de soumission
|
| 554 |
+
submitButton.disabled = true;
|
| 555 |
+
submitButton.textContent = ALERTS['btn-submitting'];
|
| 556 |
+
submitButton.classList.add('opacity-50', 'cursor-not-allowed');
|
| 557 |
+
|
| 558 |
+
const applicationData = {};
|
| 559 |
+
// Collecter les champs du formulaire pour le JSON
|
| 560 |
+
Array.from(form.elements).forEach(element => {
|
| 561 |
+
// Exclure le bouton de soumission et le fichier CV
|
| 562 |
+
if (element.id !== 'submit-button' && element.id !== 'cvFile' && element.name) {
|
| 563 |
+
if (element.type === 'checkbox') {
|
| 564 |
+
applicationData[element.name] = element.checked;
|
| 565 |
+
} else if (element.value && !element.hasAttribute('readonly')) { // Ne pas inclure les champs en lecture seule (i.e., en mode CV)
|
| 566 |
+
applicationData[element.name] = element.value;
|
| 567 |
+
}
|
| 568 |
+
}
|
| 569 |
+
});
|
| 570 |
+
|
| 571 |
+
let apiEndpoint;
|
| 572 |
+
let fetchOptions;
|
| 573 |
+
|
| 574 |
+
if (submissionType === 'cv_and_data') {
|
| 575 |
+
// Soumission COMPLÈTE (CV + Form Data) -> Route /apply
|
| 576 |
+
apiEndpoint = '/apply';
|
| 577 |
+
const formData = new FormData();
|
| 578 |
+
formData.append('application_json', JSON.stringify(applicationData));
|
| 579 |
+
formData.append('document_file', cvFile, cvFile.name);
|
| 580 |
+
|
| 581 |
+
fetchOptions = {
|
| 582 |
+
method: 'POST',
|
| 583 |
+
body: formData, // FormData n'a pas besoin de Content-Type explicite
|
| 584 |
+
};
|
| 585 |
+
} else if (submissionType === 'data_only') {
|
| 586 |
+
// Soumission DONNÉES SEULEMENT (Mode Manuel) -> Route /submit_application_data
|
| 587 |
+
apiEndpoint = '/submit_application_data';
|
| 588 |
+
|
| 589 |
+
fetchOptions = {
|
| 590 |
+
method: 'POST',
|
| 591 |
+
headers: {
|
| 592 |
+
'Content-Type': 'application/json'
|
| 593 |
+
},
|
| 594 |
+
body: JSON.stringify(applicationData), // Envoyer les données comme JSON pur
|
| 595 |
+
};
|
| 596 |
+
} else {
|
| 597 |
+
// Ne devrait pas se produire car géré en validation 1.
|
| 598 |
+
return;
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
// --- 3. Envoi des Données via Fetch ---
|
| 602 |
+
try {
|
| 603 |
+
const response = await fetch(apiEndpoint, fetchOptions);
|
| 604 |
+
|
| 605 |
+
// Vérifier le statut de la réponse
|
| 606 |
+
if (!response.ok) {
|
| 607 |
+
let errorMessage = "Unknown server error (Non-200 HTTP Status).";
|
| 608 |
+
|
| 609 |
+
try {
|
| 610 |
+
const errorResult = await response.json();
|
| 611 |
+
errorMessage = errorResult.message || `HTTP Error ${response.status}.`;
|
| 612 |
+
} catch (e) {
|
| 613 |
+
const errorText = await response.text();
|
| 614 |
+
errorMessage = `HTTP Error ${response.status}. Server returned non-JSON response. Check console for details.`;
|
| 615 |
+
console.error("Error - Non-JSON server response:", errorText);
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
// Afficher l'alerte d'échec
|
| 619 |
+
alert(ALERTS['alert-submission-fail'] + errorMessage);
|
| 620 |
+
return;
|
| 621 |
+
}
|
| 622 |
+
|
| 623 |
+
// Si response.ok est VRAI (statut 2xx), on analyse le JSON
|
| 624 |
+
const result = await response.json();
|
| 625 |
+
|
| 626 |
+
// Logique de Succès
|
| 627 |
+
alert(ALERTS['alert-submission-success'] + result.application_id);
|
| 628 |
+
form.reset();
|
| 629 |
+
isManualFormEnabled = false;
|
| 630 |
+
updateFormState(); // Réinitialiser l'état du formulaire (désactiver la lecture seule si elle était active)
|
| 631 |
+
|
| 632 |
+
} catch (error) {
|
| 633 |
+
// Échec de connexion/réseau
|
| 634 |
+
console.error("Submission Error:", error);
|
| 635 |
+
alert(ALERTS['alert-submission-fail'] + (error.message || "Network Error (check connection)."));
|
| 636 |
+
} finally {
|
| 637 |
+
// Réinitialiser le bouton de soumission (toujours exécuté)
|
| 638 |
+
submitButton.disabled = false;
|
| 639 |
+
submitButton.textContent = "Submit Application"; // Réinitialiser le texte du bouton en anglais
|
| 640 |
+
submitButton.classList.remove('opacity-50', 'cursor-not-allowed');
|
| 641 |
+
|
| 642 |
+
// Nettoyage visuel final
|
| 643 |
+
document.getElementById('cv-upload-container').classList.remove('border-4', 'border-red-500', 'rounded-lg');
|
| 644 |
+
document.getElementById('personal-info-section').classList.remove('border-t-4', 'border-red-500');
|
| 645 |
+
document.querySelectorAll('.form-field-req').forEach(field => field.classList.remove('border-red-500'));
|
| 646 |
+
}
|
| 647 |
+
});
|
| 648 |
+
</script>
|
| 649 |
+
</body>
|
| 650 |
+
</html>
|
a6ea61c8-951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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>ErnestMind 2.5 - Chat IA</title>
|
| 8 |
+
<link rel="icon" href="https://i.imgur.com/7Gn3toV.png" type="image/png">
|
| 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/highlight.js/11.9.0/styles/atom-one-dark.min.css">
|
| 13 |
+
|
| 14 |
+
<style>
|
| 15 |
+
/* Import de la police Poppins */
|
| 16 |
+
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;400;500;600&display=swap");
|
| 17 |
+
|
| 18 |
+
* {
|
| 19 |
+
font-family: "Poppins", sans-serif;
|
| 20 |
+
margin: 0;
|
| 21 |
+
box-sizing: border-box;
|
| 22 |
+
padding: 0;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
/* Variables de thème (Mode Sombre par défaut) */
|
| 26 |
+
:root {
|
| 27 |
+
--text-color: #E3E3E3;
|
| 28 |
+
--subheading-color: #828282;
|
| 29 |
+
--placeholder-color: #A6A6A6;
|
| 30 |
+
--primary-color: #242424;
|
| 31 |
+
--secondary-color: #383838;
|
| 32 |
+
--secondary-hover-color: #444;
|
| 33 |
+
--sidebar-bg: #1A1A1A; /* Couleur spécifique pour la barre latérale */
|
| 34 |
+
--sidebar-hover-bg: #2C2C2C;
|
| 35 |
+
--max-sidebar-width: 300px;
|
| 36 |
+
--min-sidebar-width: 80px;
|
| 37 |
+
/* COULEUR MODIFIÉE : Les messages utilisateur et IA partagent maintenant la même couleur de fond */
|
| 38 |
+
--user-message-bg: var(--secondary-color);
|
| 39 |
+
--send-button-text: #EAEAEA;
|
| 40 |
+
/* COULEUR POUR LA SCROLLBAR EN MODE SOMBRE (Gris doux) */
|
| 41 |
+
--scrollbar-thumb-color: #555555;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
/* Thème Clair */
|
| 45 |
+
.light_mode {
|
| 46 |
+
--text-color: #222;
|
| 47 |
+
--subheading-color: #666;
|
| 48 |
+
--placeholder-color: #999;
|
| 49 |
+
--primary-color: #F7F7F7;
|
| 50 |
+
--secondary-color: #FFF;
|
| 51 |
+
--secondary-hover-color: #EFEFEF;
|
| 52 |
+
--sidebar-bg: #EAEAEA;
|
| 53 |
+
--sidebar-hover-bg: #DDD;
|
| 54 |
+
/* COULEUR MODIFIÉE : Les messages utilisateur et IA partagent la couleur du thème clair (white) */
|
| 55 |
+
--user-message-bg: var(--secondary-color);
|
| 56 |
+
--send-button-text: #444;
|
| 57 |
+
/* COULEUR POUR LA SCROLLBAR EN MODE CLAIR (Gris très clair) */
|
| 58 |
+
--scrollbar-thumb-color: #BBBBBB;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
/* --- LAYOUT GLOBAL --- */
|
| 62 |
+
.main-container {
|
| 63 |
+
display: flex;
|
| 64 |
+
min-height: 100vh;
|
| 65 |
+
background: var(--primary-color);
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/* --- BARRE LATÉRALE (Sidebar) --- */
|
| 69 |
+
.sidebar {
|
| 70 |
+
width: var(--min-sidebar-width);
|
| 71 |
+
flex-shrink: 0;
|
| 72 |
+
height: 100vh;
|
| 73 |
+
background: var(--sidebar-bg);
|
| 74 |
+
color: var(--text-color);
|
| 75 |
+
padding: 1rem 0.5rem;
|
| 76 |
+
transition: width 0.3s ease;
|
| 77 |
+
display: flex;
|
| 78 |
+
flex-direction: column;
|
| 79 |
+
justify-content: space-between;
|
| 80 |
+
/* ANCIEN: overflow-y: auto; -> RETIRÉ. Le défilement est géré par .sidebar-scrollable-area */
|
| 81 |
+
position: fixed;
|
| 82 |
+
left: 0;
|
| 83 |
+
top: 0;
|
| 84 |
+
z-index: 100;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
/* NOUVEAU: Conteneur du Haut (Menu) */
|
| 88 |
+
.sidebar-header {
|
| 89 |
+
padding: 0.5rem 0; /* Espace */
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
/* NOUVEAU: Conteneur de la Zone Défilante */
|
| 93 |
+
.sidebar-scrollable-area {
|
| 94 |
+
flex-grow: 1; /* Prend l'espace restant */
|
| 95 |
+
overflow-y: auto; /* Permet le défilement du contenu central */
|
| 96 |
+
margin: 1.5rem 0; /* Espace entre le header et le footer */
|
| 97 |
+
|
| 98 |
+
/* Styles pour masquer/afficher la scrollbar (comme .chat-list) */
|
| 99 |
+
scrollbar-width: none; /* Firefox */
|
| 100 |
+
}
|
| 101 |
+
.sidebar-scrollable-area::-webkit-scrollbar {
|
| 102 |
+
width: 8px;
|
| 103 |
+
background: transparent;
|
| 104 |
+
}
|
| 105 |
+
.sidebar-scrollable-area:hover::-webkit-scrollbar-thumb {
|
| 106 |
+
background-color: var(--scrollbar-thumb-color);
|
| 107 |
+
border-radius: 10px;
|
| 108 |
+
}
|
| 109 |
+
.sidebar-scrollable-area::-webkit-scrollbar-thumb {
|
| 110 |
+
background-color: transparent;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
/* NOUVEAU: Conteneur du Bas (Paramètres/Thème) */
|
| 114 |
+
.sidebar-footer {
|
| 115 |
+
padding-bottom: 0.5rem; /* Espace */
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
/* MODIFICATION DEMANDÉE : Cacher tous les éléments de la barre latérale, sauf Menu et Paramètres */
|
| 120 |
+
.sidebar:not(.open) .sidebar-hidden-item {
|
| 121 |
+
display: none !important;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.sidebar.open {
|
| 125 |
+
width: var(--max-sidebar-width);
|
| 126 |
+
box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
/* SUPPRIMÉ: Les styles .sidebar .logo ne sont plus nécessaires */
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
/* Les éléments de menu (li) */
|
| 133 |
+
.sidebar ul li {
|
| 134 |
+
list-style: none;
|
| 135 |
+
display: flex;
|
| 136 |
+
align-items: center;
|
| 137 |
+
padding: 0.75rem 0.5rem;
|
| 138 |
+
margin: 0.5rem 0;
|
| 139 |
+
cursor: pointer;
|
| 140 |
+
border-radius: 8px;
|
| 141 |
+
white-space: nowrap;
|
| 142 |
+
overflow: hidden;
|
| 143 |
+
transition: background 0.2s;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
/* Règle spécifique pour le bouton Menu qui est dans le header */
|
| 147 |
+
.sidebar-header ul li {
|
| 148 |
+
margin: 0; /* Pas de marge pour le bouton Menu/Toggle en haut */
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.sidebar ul li:hover {
|
| 152 |
+
background: var(--sidebar-hover-bg);
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.sidebar ul li .icon {
|
| 156 |
+
font-size: 1.5rem;
|
| 157 |
+
margin-right: 1.5rem;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
/* 3. MASQUER/AFFICHER LE TEXTE des éléments de menu (sauf Menu/Thème) */
|
| 161 |
+
.sidebar ul li .text {
|
| 162 |
+
font-weight: 400;
|
| 163 |
+
font-size: 1rem;
|
| 164 |
+
transition: opacity 0.3s ease;
|
| 165 |
+
opacity: 0;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.sidebar.open ul li .text {
|
| 169 |
+
opacity: 1;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
/* Ajustement pour les boutons TOUJOURS VISIBLES, même en sidebar fermée */
|
| 173 |
+
/* NOTE : Ceci annule l'effet pour ces éléments spécifiques */
|
| 174 |
+
/* Les boutons fixes du header et du footer */
|
| 175 |
+
#sidebar-toggle-btn .text,
|
| 176 |
+
#toggle-theme-btn .text,
|
| 177 |
+
#settings-button .text {
|
| 178 |
+
opacity: 0; /* Par défaut masqué comme les autres */
|
| 179 |
+
transition: opacity 0.3s ease;
|
| 180 |
+
}
|
| 181 |
+
/* Rendre visibles lorsque la sidebar est ouverte */
|
| 182 |
+
.sidebar.open #sidebar-toggle-btn .text,
|
| 183 |
+
.sidebar.open #toggle-theme-btn .text,
|
| 184 |
+
.sidebar.open #settings-button .text {
|
| 185 |
+
opacity: 1;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
/* --- EN-TÊTE DU CHAT (Positionnement mis à jour) --- */
|
| 190 |
+
.chat-header {
|
| 191 |
+
/* SUPPRIMÉ: chat-header est maintenant utilisé uniquement pour l'alignement à droite
|
| 192 |
+
des boutons 'Plus' et 'Profil' */
|
| 193 |
+
width: 100%;
|
| 194 |
+
max-width: 900px;
|
| 195 |
+
margin: 0 auto;
|
| 196 |
+
display: flex;
|
| 197 |
+
justify-content: flex-end; /* Alignement à droite */
|
| 198 |
+
align-items: center;
|
| 199 |
+
padding: 1rem 1rem 1rem 0;
|
| 200 |
+
color: var(--text-color);
|
| 201 |
+
position: sticky;
|
| 202 |
+
top: 0;
|
| 203 |
+
background: var(--primary-color);
|
| 204 |
+
z-index: 50;
|
| 205 |
+
|
| 206 |
+
/* AJOUT: Espace pour le titre principal */
|
| 207 |
+
min-height: 50px;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
/* Bouton/Icône de Connexion (Profil) */
|
| 211 |
+
#login-button {
|
| 212 |
+
background: var(--secondary-color);
|
| 213 |
+
width: 40px;
|
| 214 |
+
height: 40px;
|
| 215 |
+
border-radius: 50%;
|
| 216 |
+
display: flex;
|
| 217 |
+
align-items: center;
|
| 218 |
+
justify-content: center;
|
| 219 |
+
cursor: pointer;
|
| 220 |
+
transition: background 0.2s;
|
| 221 |
+
margin-right: 0;
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
#login-button:hover {
|
| 225 |
+
background: var(--secondary-hover-color);
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
#login-button .icon {
|
| 229 |
+
font-size: 1.5rem;
|
| 230 |
+
color: var(--text-color);
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
/* Nouveau Bouton "ErnestMind Plus" */
|
| 234 |
+
#ernest-plus-button {
|
| 235 |
+
background: var(--secondary-color);
|
| 236 |
+
color: var(--text-color);
|
| 237 |
+
border: none;
|
| 238 |
+
border-radius: 25px;
|
| 239 |
+
padding: 0.5rem 1rem;
|
| 240 |
+
font-size: 1rem;
|
| 241 |
+
font-weight: 500;
|
| 242 |
+
cursor: pointer;
|
| 243 |
+
transition: background 0.2s;
|
| 244 |
+
display: flex;
|
| 245 |
+
align-items: center;
|
| 246 |
+
margin-right: 0.75rem; /* Espace entre Plus et Profil */
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
#ernest-plus-button:hover {
|
| 250 |
+
background: var(--secondary-hover-color);
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
/* Style pour le logo Ernest Plus */
|
| 254 |
+
.plus-logo {
|
| 255 |
+
width: 20px;
|
| 256 |
+
height: 20px;
|
| 257 |
+
margin-right: 0.5rem;
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
/* --- NOUVEAU: Bouton ErnestMind 2.5 (Brand Toggle) --- */
|
| 262 |
+
.brand-toggle-btn {
|
| 263 |
+
position: fixed;
|
| 264 |
+
top: 1rem;
|
| 265 |
+
left: calc(var(--min-sidebar-width) + 1rem); /* Décalé de la sidebar fermée */
|
| 266 |
+
z-index: 90;
|
| 267 |
+
/* Styles du bouton */
|
| 268 |
+
background: var(--secondary-color); /* Gris foncé demandé */
|
| 269 |
+
color: var(--text-color);
|
| 270 |
+
border: none;
|
| 271 |
+
border-radius: 25px;
|
| 272 |
+
padding: 0.5rem 1rem;
|
| 273 |
+
font-size: 1rem;
|
| 274 |
+
font-weight: 500;
|
| 275 |
+
cursor: pointer;
|
| 276 |
+
transition: background 0.2s, opacity 0.3s;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
.brand-toggle-btn:hover {
|
| 280 |
+
background: var(--secondary-hover-color);
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
/* Cacher le bouton quand la sidebar est ouverte */
|
| 284 |
+
.sidebar.open + .brand-toggle-btn {
|
| 285 |
+
opacity: 0;
|
| 286 |
+
pointer-events: none; /* Rendre in-clicable */
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
/* --- ZONE DE CHAT (Contenu principal) --- */
|
| 291 |
+
.chat-wrapper {
|
| 292 |
+
flex-grow: 1;
|
| 293 |
+
display: flex;
|
| 294 |
+
flex-direction: column;
|
| 295 |
+
padding-left: var(--min-sidebar-width);
|
| 296 |
+
transition: padding-left 0s;
|
| 297 |
+
padding-bottom: 2rem;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
/* Messages (scrollable area) */
|
| 301 |
+
.chat-list {
|
| 302 |
+
flex-grow: 1;
|
| 303 |
+
padding: 0 2rem 1rem;
|
| 304 |
+
overflow-y: auto;
|
| 305 |
+
max-width: 900px;
|
| 306 |
+
width: 100%;
|
| 307 |
+
margin: 0 auto;
|
| 308 |
+
padding-bottom: 25px;
|
| 309 |
+
transition: padding-bottom 0.3s ease;
|
| 310 |
+
|
| 311 |
+
/* AJOUT CSS : Masquer la barre de défilement par défaut */
|
| 312 |
+
scrollbar-width: none; /* Firefox */
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
/* AJOUT CSS : Masquer la barre de défilement par défaut (Chrome/Safari) */
|
| 316 |
+
.chat-list::-webkit-scrollbar {
|
| 317 |
+
width: 8px; /* Taille pour permettre le survol */
|
| 318 |
+
background: transparent; /* Fond transparent par défaut */
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
/* AJOUT CSS : Afficher le pouce de la scrollbar au survol de .chat-list */
|
| 322 |
+
.chat-list:hover::-webkit-scrollbar-thumb {
|
| 323 |
+
background-color: var(--scrollbar-thumb-color); /* Couleur du pouce (gris) */
|
| 324 |
+
border-radius: 10px;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
/* AJOUT CSS : Masquer le pouce de la scrollbar par défaut */
|
| 328 |
+
.chat-list::-webkit-scrollbar-thumb {
|
| 329 |
+
background-color: transparent; /* Invisible par défaut */
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
/* NOUVELLE CLASSE POUR L'ESPACEMENT DU CHAT LORSQUE LA ZONE DE SAISIE EST ANCRÉE */
|
| 334 |
+
.chat-list.has-docked-area {
|
| 335 |
+
/* Augmente le padding-bottom pour compenser la hauteur de .typing-area.docked */
|
| 336 |
+
padding-bottom: 150px;
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
/* Style pour le message initial de bienvenue */
|
| 340 |
+
.initial-welcome {
|
| 341 |
+
display: flex;
|
| 342 |
+
flex-direction: column;
|
| 343 |
+
align-items: flex-start; /* MODIFIÉ : Aligné à gauche */
|
| 344 |
+
justify-content: flex-start; /* MODIFIÉ : Aligné en haut */
|
| 345 |
+
height: 100%;
|
| 346 |
+
text-align: left; /* MODIFIÉ : Aligné à gauche */
|
| 347 |
+
color: var(--text-color);
|
| 348 |
+
padding-top: 5vh; /* Ajustement du padding */
|
| 349 |
+
padding-left: 0.5rem; /* Ajustement pour le chat-list padding */
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
.initial-welcome .chat-title {
|
| 353 |
+
font-size: 3rem;
|
| 354 |
+
font-weight: 600;
|
| 355 |
+
color: var(--text-color);
|
| 356 |
+
margin-bottom: 0; /* SUPPRIMÉ: Le sous-texte a été retiré */
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
.initial-welcome p {
|
| 360 |
+
/* SUPPRIMÉ: Ce sélecteur n'est plus pertinent car le paragraphe a été retiré */
|
| 361 |
+
display: none;
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
/* Style pour un message */
|
| 365 |
+
.chat-message {
|
| 366 |
+
display: flex;
|
| 367 |
+
align-items: flex-start;
|
| 368 |
+
margin-bottom: 2rem;
|
| 369 |
+
gap: 1rem;
|
| 370 |
+
padding: 0.5rem;
|
| 371 |
+
border-radius: 12px;
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
/* 3. Messages Utilisateur (Couleur de fond uniforme avec l'IA) */
|
| 375 |
+
.chat-message.user {
|
| 376 |
+
justify-content: flex-end;
|
| 377 |
+
background: var(--user-message-bg); /* Maintenant utilise --secondary-color */
|
| 378 |
+
max-width: fit-content;
|
| 379 |
+
margin-left: auto;
|
| 380 |
+
padding: 1rem;
|
| 381 |
+
display: block;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
/* Contenu du message utilisateur */
|
| 385 |
+
.chat-message.user .text-content {
|
| 386 |
+
color: var(--text-color); /* Le texte prend la couleur du thème (white/dark-gray) */
|
| 387 |
+
text-align: left;
|
| 388 |
+
word-wrap: break-word;
|
| 389 |
+
max-width: 50ch;
|
| 390 |
+
min-width: 0;
|
| 391 |
+
width: fit-content;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
/* Avatar utilisateur masqué */
|
| 395 |
+
.chat-message.user .avatar {
|
| 396 |
+
display: none;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
/* Messages IA (Couleur: Supprimée pour un look simple) */
|
| 401 |
+
.chat-message.ai {
|
| 402 |
+
background: transparent; /* MODIFIÉ : Supprime le fond coloré */
|
| 403 |
+
padding: 1rem 0.5rem 1rem 0; /* Ajustement de l'espacement pour le look épuré */
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
.chat-message .avatar {
|
| 407 |
+
font-size: 1.8rem;
|
| 408 |
+
width: 40px;
|
| 409 |
+
height: 40px;
|
| 410 |
+
border-radius: 50%;
|
| 411 |
+
display: flex;
|
| 412 |
+
align-items: center;
|
| 413 |
+
justify-content: center;
|
| 414 |
+
color: white;
|
| 415 |
+
flex-shrink: 0;
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
.chat-message.user .avatar {
|
| 419 |
+
background: #007bff;
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
.chat-message.ai .avatar {
|
| 423 |
+
background: #2441c3ff;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.chat-message.ai .text-content {
|
| 427 |
+
color: var(--text-color);
|
| 428 |
+
line-height: 1.6;
|
| 429 |
+
flex-grow: 1;
|
| 430 |
+
overflow-x: auto;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
/* Chargement (Loading dots) */
|
| 434 |
+
.typing-animation {
|
| 435 |
+
display: flex;
|
| 436 |
+
align-items: center;
|
| 437 |
+
font-size: 0.9rem;
|
| 438 |
+
color: var(--subheading-color);
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
/* NOUVEAU: Animation de pensée type Gemini */
|
| 442 |
+
.thought-animation {
|
| 443 |
+
width: 15px;
|
| 444 |
+
height: 15px;
|
| 445 |
+
border: 3px solid #007bff; /* Couleur bleue */
|
| 446 |
+
border-top-color: transparent;
|
| 447 |
+
border-radius: 50%;
|
| 448 |
+
animation: spin 1s linear infinite;
|
| 449 |
+
margin-right: 0.5rem;
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
@keyframes spin {
|
| 453 |
+
0% { transform: rotate(0deg); }
|
| 454 |
+
100% { transform: rotate(360deg); }
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
|
| 458 |
+
/* --- STYLES MARKDOWN pour le contenu généré par l'IA --- */
|
| 459 |
+
|
| 460 |
+
.chat-message.ai .text-content h1,
|
| 461 |
+
.chat-message.ai .text-content h2 {
|
| 462 |
+
margin: 1.5rem 0 0.5rem;
|
| 463 |
+
font-weight: 600;
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
.chat-message.ai .text-content p {
|
| 467 |
+
margin-bottom: 1rem;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
.chat-message.ai .text-content ul,
|
| 471 |
+
.chat-message.ai .text-content ol {
|
| 472 |
+
margin: 0.5rem 0 1rem 1.5rem;
|
| 473 |
+
padding: 0;
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
.chat-message.ai .text-content li {
|
| 477 |
+
margin-bottom: 0.5rem;
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
/* Style pour les blocs de code (triple backticks) */
|
| 481 |
+
|
| 482 |
+
/* --- NOUVEAU: Styles pour la Carte de Code et le Bouton Copier --- */
|
| 483 |
+
|
| 484 |
+
/* 1. Conteneur Relatif pour positionner le bouton de copie */
|
| 485 |
+
.chat-message.ai .code-container {
|
| 486 |
+
position: relative; /* Positionnement du bouton de copie à l'intérieur */
|
| 487 |
+
margin: 1rem 0; /* Garde la marge verticale */
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
/* 2. Style de la balise PRE (la carte elle-même) */
|
| 491 |
+
.chat-message.ai .text-content pre {
|
| 492 |
+
/* Suppression des marges pour utiliser le nouveau conteneur .code-container */
|
| 493 |
+
margin: 0;
|
| 494 |
+
|
| 495 |
+
/* Styles existants */
|
| 496 |
+
background: var(--sidebar-bg);
|
| 497 |
+
padding: 1rem;
|
| 498 |
+
border-radius: 8px;
|
| 499 |
+
overflow-x: auto;
|
| 500 |
+
font-size: 0.95rem;
|
| 501 |
+
line-height: 1.4;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
/* 3. Bouton de Copie */
|
| 505 |
+
.copy-code-btn {
|
| 506 |
+
position: absolute;
|
| 507 |
+
top: 5px;
|
| 508 |
+
right: 5px;
|
| 509 |
+
background: rgba(255, 255, 255, 0.1);
|
| 510 |
+
color: var(--text-color);
|
| 511 |
+
border: none;
|
| 512 |
+
padding: 0.3rem 0.6rem;
|
| 513 |
+
border-radius: 4px;
|
| 514 |
+
cursor: pointer;
|
| 515 |
+
font-size: 0.8rem;
|
| 516 |
+
font-weight: 500;
|
| 517 |
+
opacity: 0; /* Masqué par défaut */
|
| 518 |
+
transition: opacity 0.2s, background 0.2s;
|
| 519 |
+
display: flex;
|
| 520 |
+
align-items: center;
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
/* Afficher le bouton au survol du conteneur */
|
| 524 |
+
.code-container:hover .copy-code-btn {
|
| 525 |
+
opacity: 1;
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
.copy-code-btn:hover {
|
| 529 |
+
background: rgba(255, 255, 255, 0.2);
|
| 530 |
+
}
|
| 531 |
+
|
| 532 |
+
.copy-code-btn .material-symbols-rounded {
|
| 533 |
+
font-size: 1rem;
|
| 534 |
+
margin-right: 0.2rem;
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
|
| 538 |
+
.chat-message.ai .text-content code {
|
| 539 |
+
/* Style pour le code inline (single backtick) */
|
| 540 |
+
background: var(--secondary-hover-color);
|
| 541 |
+
padding: 0.2rem 0.4rem;
|
| 542 |
+
border-radius: 4px;
|
| 543 |
+
font-weight: 500;
|
| 544 |
+
}
|
| 545 |
+
|
| 546 |
+
/* Assurer que le code dans les blocs reste en couleur texte du thème */
|
| 547 |
+
.chat-message.ai .text-content pre code {
|
| 548 |
+
/* Le fond est géré par highlight.js */
|
| 549 |
+
background: transparent;
|
| 550 |
+
/* La couleur est gérée par highlight.js */
|
| 551 |
+
/* color: var(--text-color); */
|
| 552 |
+
padding: 0;
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
/* --- ZONE DE SAISIE (Typing Area) --- */
|
| 556 |
+
|
| 557 |
+
/* Classe par défaut (CENTRÉE VERTICALEMENT) */
|
| 558 |
+
.typing-area {
|
| 559 |
+
position: absolute; /* Changer à absolute pour le centrage initial */
|
| 560 |
+
top: 50%;
|
| 561 |
+
left: 50%;
|
| 562 |
+
transform: translate(-50%, -50%);
|
| 563 |
+
width: calc(100% - var(--min-sidebar-width)); /* Largeur ajustée */
|
| 564 |
+
padding: 1rem;
|
| 565 |
+
background: transparent; /* Pas de fond visible lors du centrage */
|
| 566 |
+
border-top: none;
|
| 567 |
+
z-index: 10;
|
| 568 |
+
transition: all 0.5s ease; /* Transition pour le mouvement */
|
| 569 |
+
}
|
| 570 |
+
|
| 571 |
+
/* Classe APPLIQUÉE APRÈS LE PREMIER MESSAGE (EN BAS DE L'ÉCRAN) */
|
| 572 |
+
.typing-area.docked {
|
| 573 |
+
position: fixed; /* Changer à fixed pour rester en bas */
|
| 574 |
+
bottom: 0;
|
| 575 |
+
top: auto; /* Annuler 'top: 50%' */
|
| 576 |
+
left: 0; /* Changer 'left: 50%' */
|
| 577 |
+
transform: none; /* Annuler 'translate' */
|
| 578 |
+
width: 100%; /* Reprendre la largeur normale */
|
| 579 |
+
padding: 1rem;
|
| 580 |
+
background: var(--primary-color);
|
| 581 |
+
border-top: 1px solid var(--secondary-color);
|
| 582 |
+
padding-left: calc(var(--min-sidebar-width) + 1rem);
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
/* Assurer que la zone de saisie est centrée par rapport à elle-même au début */
|
| 586 |
+
.typing-area .typing-form {
|
| 587 |
+
max-width: 900px;
|
| 588 |
+
margin: 0 auto;
|
| 589 |
+
}
|
| 590 |
+
|
| 591 |
+
.typing-area .input-wrapper {
|
| 592 |
+
display: flex;
|
| 593 |
+
flex-direction: column; /* Changé à column pour gérer la liste de fichiers au-dessus */
|
| 594 |
+
align-items: stretch;
|
| 595 |
+
background: var(--secondary-color);
|
| 596 |
+
border-radius: 25px;
|
| 597 |
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
| 598 |
+
|
| 599 |
+
/* 1. Réduire légèrement la largeur horizontale */
|
| 600 |
+
max-width: 820px;
|
| 601 |
+
margin: 0 auto;
|
| 602 |
+
|
| 603 |
+
/* MODIFICATIONS POUR HAUTEUR 45PX */
|
| 604 |
+
/* AJUSTEMENT 1: min-height */
|
| 605 |
+
padding: 0.25rem 0.75rem; /* Réduit le padding vertical */
|
| 606 |
+
min-height: 45px; /* Nouvelle hauteur minimale */
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
/* AJOUT: Conteneur du texte et du bouton d'envoi */
|
| 610 |
+
.typing-area .input-controls {
|
| 611 |
+
display: flex;
|
| 612 |
+
flex-grow: 1; /* Permet aux contrôles de prendre la hauteur restante */
|
| 613 |
+
flex-direction: column; /* CHANGEMENT CLÉ: Organiser verticalement (fichiers/texte puis actions) */
|
| 614 |
+
align-items: stretch; /* Stretch les éléments à l'intérieur */
|
| 615 |
+
}
|
| 616 |
+
|
| 617 |
+
/* AJOUT: Zone d'affichage des fichiers */
|
| 618 |
+
.typing-area .file-display-area {
|
| 619 |
+
display: flex;
|
| 620 |
+
align-items: center;
|
| 621 |
+
padding: 0.5rem 0;
|
| 622 |
+
margin-left: 0; /* REMIS À ZÉRO pour aligner avec le textarea qui sera en stretch */
|
| 623 |
+
overflow-x: auto; /* Défilement horizontal si plus de 4 fichiers */
|
| 624 |
+
max-width: 100%; /* Important pour le défilement */
|
| 625 |
+
white-space: nowrap; /* Empêche les badges de passer à la ligne */
|
| 626 |
+
/* Cacher la barre de défilement pour un look plus propre */
|
| 627 |
+
scrollbar-width: none; /* Firefox */
|
| 628 |
+
}
|
| 629 |
+
.typing-area .file-display-area::-webkit-scrollbar {
|
| 630 |
+
display: none; /* Chrome, Safari, Opera */
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
/* AJOUT: Badge de fichier */
|
| 634 |
+
.file-badge {
|
| 635 |
+
display: inline-flex;
|
| 636 |
+
align-items: center;
|
| 637 |
+
background: var(--primary-color);
|
| 638 |
+
color: var(--text-color);
|
| 639 |
+
padding: 0.3rem 0.6rem;
|
| 640 |
+
border-radius: 15px;
|
| 641 |
+
font-size: 0.8rem;
|
| 642 |
+
margin-right: 0.5rem;
|
| 643 |
+
flex-shrink: 0; /* Empêche le badge de se rétrécir */
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
.file-badge .delete-file-btn {
|
| 647 |
+
background: none;
|
| 648 |
+
border: none;
|
| 649 |
+
color: var(--placeholder-color);
|
| 650 |
+
cursor: pointer;
|
| 651 |
+
margin-left: 0.5rem;
|
| 652 |
+
padding: 0;
|
| 653 |
+
font-size: 1rem;
|
| 654 |
+
line-height: 1;
|
| 655 |
+
transition: color 0.2s;
|
| 656 |
+
}
|
| 657 |
+
|
| 658 |
+
.file-badge .delete-file-btn:hover {
|
| 659 |
+
color: red;
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
/* NOUVEAU CONTENEUR pour les contrôles du bas */
|
| 663 |
+
.typing-area .action-bar-bottom {
|
| 664 |
+
display: flex;
|
| 665 |
+
align-items: center; /* MODIFIÉ: Aligner verticalement les éléments */
|
| 666 |
+
justify-content: space-between; /* Espacer les éléments */
|
| 667 |
+
/* AJUSTEMENT 1: padding-top */
|
| 668 |
+
padding-top: 0.25rem; /* Réduit l'espace au-dessus */
|
| 669 |
+
}
|
| 670 |
+
|
| 671 |
+
/* 2. Icône d'importation de fichiers (+) */
|
| 672 |
+
/* NOTE: Déplacé le style des contrôles vers .input-controls pour le flex-direction: column */
|
| 673 |
+
|
| 674 |
+
/* Maintient le bouton d'attachement à gauche du textarea */
|
| 675 |
+
.typing-area .input-controls-top {
|
| 676 |
+
display: flex;
|
| 677 |
+
align-items: flex-end;
|
| 678 |
+
flex-grow: 1;
|
| 679 |
+
}
|
| 680 |
+
|
| 681 |
+
/* Bouton + dans la barre d'action du bas */
|
| 682 |
+
.typing-area .action-bar-bottom .file-upload-btn {
|
| 683 |
+
width: 40px; /* MODIFIÉ: Conserver la taille */
|
| 684 |
+
height: 40px; /* MODIFIÉ: Conserver la taille */
|
| 685 |
+
background: transparent;
|
| 686 |
+
display: flex;
|
| 687 |
+
justify-content: center;
|
| 688 |
+
align-items: center;
|
| 689 |
+
border-radius: 50%;
|
| 690 |
+
cursor: pointer;
|
| 691 |
+
color: var(--placeholder-color); /* Gris clair pour l'icône + */
|
| 692 |
+
outline: none;
|
| 693 |
+
border: none;
|
| 694 |
+
font-size: 24px;
|
| 695 |
+
transition: color 0.2s;
|
| 696 |
+
flex-shrink: 0;
|
| 697 |
+
margin-right: 0.5rem; /* AJOUTÉ: Marge pour séparer du compteur */
|
| 698 |
+
}
|
| 699 |
+
|
| 700 |
+
.typing-area .input-wrapper .file-upload-btn:hover {
|
| 701 |
+
color: var(--text-color);
|
| 702 |
+
}
|
| 703 |
+
|
| 704 |
+
.typing-area .input-wrapper .typing-input {
|
| 705 |
+
flex-grow: 1;
|
| 706 |
+
background: transparent;
|
| 707 |
+
border: none;
|
| 708 |
+
resize: none;
|
| 709 |
+
font-size: 1rem;
|
| 710 |
+
color: var(--text-color);
|
| 711 |
+
/* MODIFICATIONS POUR HAUTEUR 45PX */
|
| 712 |
+
/* AJUSTEMENT 1: padding, max-height, min-height */
|
| 713 |
+
padding: 0.25rem 0; /* Réduit le padding vertical */
|
| 714 |
+
line-height: 1.5;
|
| 715 |
+
max-height: 65px; /* Nouvelle hauteur max souhaitée */
|
| 716 |
+
min-height: 30px; /* Nouvelle hauteur minimale du textarea */
|
| 717 |
+
overflow-y: auto;
|
| 718 |
+
}
|
| 719 |
+
|
| 720 |
+
.typing-area .input-wrapper .typing-input::placeholder {
|
| 721 |
+
color: var(--placeholder-color);
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
.typing-area .input-wrapper .typing-input:focus {
|
| 725 |
+
outline: none;
|
| 726 |
+
}
|
| 727 |
+
|
| 728 |
+
/* AJOUT: Style pour l'indicateur de limite de texte */
|
| 729 |
+
.typing-area .char-count {
|
| 730 |
+
font-size: 0.8rem;
|
| 731 |
+
color: var(--placeholder-color);
|
| 732 |
+
align-self: center; /* MODIFIÉ: Aligner au centre avec les icônes */
|
| 733 |
+
padding-bottom: 0; /* MODIFIÉ: Retirer le padding bas */
|
| 734 |
+
flex-grow: 1; /* MODIFIÉ: Pour pousser le bouton d'envoi à droite */
|
| 735 |
+
text-align: left;
|
| 736 |
+
margin-left: 0; /* MODIFIÉ: Retirer la marge gauche */
|
| 737 |
+
}
|
| 738 |
+
|
| 739 |
+
.typing-area .char-count.error {
|
| 740 |
+
color: red;
|
| 741 |
+
font-weight: 500;
|
| 742 |
+
}
|
| 743 |
+
|
| 744 |
+
|
| 745 |
+
/* Bouton d'Envoi de Texte */
|
| 746 |
+
.typing-area .input-wrapper button.send-button {
|
| 747 |
+
width: 40px; /* MODIFIÉ: Conserver la taille */
|
| 748 |
+
height: 40px; /* MODIFIÉ: Conserver la taille */
|
| 749 |
+
background: transparent; /* Fond transparent par défaut */
|
| 750 |
+
display: flex;
|
| 751 |
+
justify-content: center;
|
| 752 |
+
align-items: center;
|
| 753 |
+
border-radius: 50%;
|
| 754 |
+
cursor: pointer;
|
| 755 |
+
color: var(--placeholder-color); /* Couleur par défaut (micro) */
|
| 756 |
+
outline: none;
|
| 757 |
+
border: none;
|
| 758 |
+
font-size: 24px;
|
| 759 |
+
transition: background 0.2s, color 0.2s;
|
| 760 |
+
flex-shrink: 0; /* Empêche le bouton de rétrécir */
|
| 761 |
+
margin: 0; /* REMIS À ZÉRO, la marge est gérée par le padding du .input-wrapper */
|
| 762 |
+
}
|
| 763 |
+
|
| 764 |
+
/* Style pour l'icône 'send' (actif) */
|
| 765 |
+
.typing-area .input-wrapper button.send-button.active {
|
| 766 |
+
background: #49494bff; /* Fond gris/bleu pour le bouton d'envoi actif */
|
| 767 |
+
color: white;
|
| 768 |
+
}
|
| 769 |
+
|
| 770 |
+
.typing-area .input-wrapper button.send-button.active:hover {
|
| 771 |
+
background: #0074f0ff;
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
.typing-area .disclaimer-text {
|
| 775 |
+
font-size: 0.85rem;
|
| 776 |
+
margin-top: 1rem;
|
| 777 |
+
text-align: center;
|
| 778 |
+
color: var(--placeholder-color);
|
| 779 |
+
}
|
| 780 |
+
|
| 781 |
+
/* Texte de non-responsabilité masqué dans l'état initial centré */
|
| 782 |
+
.typing-area:not(.docked) .disclaimer-text {
|
| 783 |
+
display: none;
|
| 784 |
+
}
|
| 785 |
+
|
| 786 |
+
/* Message d'erreur personnalisé (pour limite de fichier) */
|
| 787 |
+
#file-error-message {
|
| 788 |
+
color: red;
|
| 789 |
+
font-size: 0.9rem;
|
| 790 |
+
text-align: center;
|
| 791 |
+
margin-top: 0.5rem;
|
| 792 |
+
}
|
| 793 |
+
|
| 794 |
+
/* --- NOUVEAU: Carte de Paramètres --- */
|
| 795 |
+
#settings-card {
|
| 796 |
+
position: fixed;
|
| 797 |
+
top: 0;
|
| 798 |
+
/* Démarrer juste à côté de la sidebar fermée (80px) */
|
| 799 |
+
left: var(--min-sidebar-width);
|
| 800 |
+
height: 100vh;
|
| 801 |
+
width: 0; /* Caché par défaut */
|
| 802 |
+
max-width: 500px; /* MODIFIÉ: Rendre plus large */
|
| 803 |
+
background: var(--secondary-color); /* Utiliser la couleur secondaire pour le fond de la carte */
|
| 804 |
+
color: var(--text-color);
|
| 805 |
+
box-shadow: 6px 0 15px rgba(0, 0, 0, 0.3);
|
| 806 |
+
overflow-y: auto;
|
| 807 |
+
overflow-x: hidden;
|
| 808 |
+
transition: width 0.3s ease, padding 0.3s ease, left 0.3s ease;
|
| 809 |
+
z-index: 99; /* Moins que la sidebar (100) mais plus que le chat (50) */
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
/* L'état ouvert de la carte */
|
| 813 |
+
#settings-card.open {
|
| 814 |
+
width: 500px; /* MODIFIÉ: Définir la largeur horizontale demandée */
|
| 815 |
+
padding: 1.5rem 1.5rem;
|
| 816 |
+
}
|
| 817 |
+
|
| 818 |
+
/* Ajustement de la position si la sidebar est ouverte */
|
| 819 |
+
.sidebar.open ~ #settings-card {
|
| 820 |
+
left: var(--max-sidebar-width); /* Se positionne après la sidebar ouverte (300px) */
|
| 821 |
+
}
|
| 822 |
+
|
| 823 |
+
/* Style des éléments de formulaire dans la carte */
|
| 824 |
+
#settings-card .setting-group {
|
| 825 |
+
margin-bottom: 1.5rem;
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
+
#settings-card label {
|
| 829 |
+
display: block;
|
| 830 |
+
font-weight: 500;
|
| 831 |
+
margin-bottom: 0.5rem;
|
| 832 |
+
font-size: 0.95rem;
|
| 833 |
+
color: var(--subheading-color);
|
| 834 |
+
}
|
| 835 |
+
|
| 836 |
+
#settings-card select,
|
| 837 |
+
#settings-card textarea {
|
| 838 |
+
width: 100%;
|
| 839 |
+
padding: 0.6rem 0.8rem;
|
| 840 |
+
border: 1px solid var(--sidebar-hover-bg);
|
| 841 |
+
border-radius: 8px;
|
| 842 |
+
background: var(--primary-color);
|
| 843 |
+
color: var(--text-color);
|
| 844 |
+
font-size: 1rem;
|
| 845 |
+
appearance: none; /* Cache la flèche par défaut pour le style */
|
| 846 |
+
}
|
| 847 |
+
|
| 848 |
+
#settings-card textarea {
|
| 849 |
+
min-height: 80px;
|
| 850 |
+
resize: vertical;
|
| 851 |
+
line-height: 1.4;
|
| 852 |
+
}
|
| 853 |
+
|
| 854 |
+
#settings-card select:focus,
|
| 855 |
+
#settings-card textarea:focus {
|
| 856 |
+
outline: none;
|
| 857 |
+
border-color: #007bff;
|
| 858 |
+
}
|
| 859 |
+
|
| 860 |
+
/* Ajout d'une flèche personnalisée pour les selects */
|
| 861 |
+
.select-wrapper {
|
| 862 |
+
position: relative;
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
.select-wrapper::after {
|
| 866 |
+
content: "expand_more";
|
| 867 |
+
font-family: 'Material Symbols Rounded';
|
| 868 |
+
position: absolute;
|
| 869 |
+
top: 50%;
|
| 870 |
+
right: 10px;
|
| 871 |
+
transform: translateY(-50%);
|
| 872 |
+
pointer-events: none;
|
| 873 |
+
color: var(--subheading-color);
|
| 874 |
+
}
|
| 875 |
+
|
| 876 |
+
/* AJOUT: Style pour le spinner de suppression */
|
| 877 |
+
.delete-spinner {
|
| 878 |
+
display: inline-block;
|
| 879 |
+
width: 18px;
|
| 880 |
+
height: 18px;
|
| 881 |
+
border: 2px solid rgba(255, 255, 255, .3);
|
| 882 |
+
border-radius: 50%;
|
| 883 |
+
border-top-color: #fff;
|
| 884 |
+
animation: spin 1s ease-in-out infinite;
|
| 885 |
+
margin-right: 0.5rem;
|
| 886 |
+
vertical-align: middle;
|
| 887 |
+
}
|
| 888 |
+
|
| 889 |
+
/* --- RESPONSIVE / Mobile --- */
|
| 890 |
+
@media (max-width: 768px) {
|
| 891 |
+
.sidebar {
|
| 892 |
+
width: 0;
|
| 893 |
+
box-shadow: none;
|
| 894 |
+
}
|
| 895 |
+
.sidebar.open {
|
| 896 |
+
width: 80%;
|
| 897 |
+
}
|
| 898 |
+
.chat-wrapper {
|
| 899 |
+
padding-left: 0;
|
| 900 |
+
}
|
| 901 |
+
/* Ajustement pour le mode centré */
|
| 902 |
+
.typing-area {
|
| 903 |
+
width: 100%;
|
| 904 |
+
left: 0;
|
| 905 |
+
transform: translateY(-50%);
|
| 906 |
+
}
|
| 907 |
+
/* Ajustement pour le mode docké */
|
| 908 |
+
.typing-area.docked {
|
| 909 |
+
padding: 1rem 0.5rem;
|
| 910 |
+
padding-left: 0.5rem;
|
| 911 |
+
}
|
| 912 |
+
.brand-toggle-btn {
|
| 913 |
+
/* Cacher le bouton 'ErnestMind 2.5' sur mobile */
|
| 914 |
+
display: none;
|
| 915 |
+
}
|
| 916 |
+
/* Ajustement pour le message utilisateur sur mobile */
|
| 917 |
+
.chat-message.user .text-content {
|
| 918 |
+
max-width: 90%;
|
| 919 |
+
}
|
| 920 |
+
/* Ajustement pour l'en-tête sur mobile */
|
| 921 |
+
.chat-header {
|
| 922 |
+
padding: 1rem 0.5rem; /* Ajustement pour le bord de l'écran */
|
| 923 |
+
}
|
| 924 |
+
/* AJOUT MOBILE : ajuster l'espace si la zone ancrée est utilisée */
|
| 925 |
+
.chat-list.has-docked-area {
|
| 926 |
+
padding-bottom: 150px;
|
| 927 |
+
}
|
| 928 |
+
|
| 929 |
+
/* AJOUT MOBILE : Carte de paramètres */
|
| 930 |
+
#settings-card.open {
|
| 931 |
+
width: 100%; /* Prend toute la largeur sur mobile */
|
| 932 |
+
left: 0;
|
| 933 |
+
max-width: 100%;
|
| 934 |
+
}
|
| 935 |
+
|
| 936 |
+
.sidebar.open ~ #settings-card {
|
| 937 |
+
/* Si la sidebar est ouverte sur mobile, la carte est décalée */
|
| 938 |
+
left: 80%; /* Pour laisser la sidebar visible */
|
| 939 |
+
}
|
| 940 |
+
}
|
| 941 |
+
</style>
|
| 942 |
+
</head>
|
| 943 |
+
|
| 944 |
+
<body>
|
| 945 |
+
<div class="main-container">
|
| 946 |
+
<aside id="sidebar" class="sidebar">
|
| 947 |
+
<div class="sidebar-header">
|
| 948 |
+
<ul class="sidebar-menu">
|
| 949 |
+
<li id="sidebar-toggle-btn">
|
| 950 |
+
<span class="icon material-symbols-rounded">menu</span>
|
| 951 |
+
<span class="text">Menu</span>
|
| 952 |
+
</li>
|
| 953 |
+
</ul>
|
| 954 |
+
</div>
|
| 955 |
+
|
| 956 |
+
<div class="sidebar-scrollable-area">
|
| 957 |
+
<ul class="sidebar-menu">
|
| 958 |
+
<li class="new-chat sidebar-hidden-item">
|
| 959 |
+
<span class="icon material-symbols-rounded">add</span>
|
| 960 |
+
<span class="text">Nouveau Chat</span>
|
| 961 |
+
</li>
|
| 962 |
+
<li class="sidebar-hidden-item">
|
| 963 |
+
<span class="icon material-symbols-rounded">history</span>
|
| 964 |
+
<span class="text">Historique</span>
|
| 965 |
+
</li>
|
| 966 |
+
</ul>
|
| 967 |
+
<ul class="recent-chats-list sidebar-hidden-item" id="recent-chats-list">
|
| 968 |
+
</ul>
|
| 969 |
+
</div>
|
| 970 |
+
<ul class="sidebar-footer">
|
| 971 |
+
<li id="settings-button">
|
| 972 |
+
<span class="icon material-symbols-rounded">settings</span>
|
| 973 |
+
<span class="text">Paramètres</span>
|
| 974 |
+
</li>
|
| 975 |
+
<li id="toggle-theme-btn" class="sidebar-hidden-item">
|
| 976 |
+
<span class="icon material-symbols-rounded">dark_mode</span>
|
| 977 |
+
<span class="text">Thème</span>
|
| 978 |
+
</li>
|
| 979 |
+
</ul>
|
| 980 |
+
</aside>
|
| 981 |
+
|
| 982 |
+
<div id="settings-card">
|
| 983 |
+
<h2 style="font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 600;">Paramètres de l'IA</h2>
|
| 984 |
+
<hr style="border: none; border-bottom: 1px solid var(--sidebar-hover-bg); margin-bottom: 1.5rem;">
|
| 985 |
+
|
| 986 |
+
<div class="setting-group">
|
| 987 |
+
<label for="model-select">Sélection du Modèle (Version)</label>
|
| 988 |
+
<div class="select-wrapper">
|
| 989 |
+
<select id="model-select">
|
| 990 |
+
<option value="ernest_2_5" selected>ErnestMind 2.5 (Défaut)</option>
|
| 991 |
+
<option value="ernest_2_0">ErnestMind 2.0</option>
|
| 992 |
+
<option value="ernest_1_5">ErnestMind 1.5</option>
|
| 993 |
+
<option value="ernest_fast">Version Rapide/Légère</option>
|
| 994 |
+
<option value="ernest_plus">Version Plus (Abonnés)</option>
|
| 995 |
+
</select>
|
| 996 |
+
</div>
|
| 997 |
+
</div>
|
| 998 |
+
|
| 999 |
+
<div class="setting-group">
|
| 1000 |
+
<label for="tone-select">Tonalité de la Réponse</label>
|
| 1001 |
+
<div class="select-wrapper">
|
| 1002 |
+
<select id="tone-select">
|
| 1003 |
+
<option value="casual" selected>Décontracté (Défaut)</option>
|
| 1004 |
+
<option value="formal">Formel</option>
|
| 1005 |
+
<option value="technical">Technique</option>
|
| 1006 |
+
<option value="creative">Créatif</option>
|
| 1007 |
+
</select>
|
| 1008 |
+
</div>
|
| 1009 |
+
</div>
|
| 1010 |
+
|
| 1011 |
+
<div class="setting-group">
|
| 1012 |
+
<label for="length-select">Longueur Maximale de la Réponse</label>
|
| 1013 |
+
<div class="select-wrapper">
|
| 1014 |
+
<select id="length-select">
|
| 1015 |
+
<option value="medium" selected>Moyen (Défaut)</option>
|
| 1016 |
+
<option value="short">Court</option>
|
| 1017 |
+
<option value="long">Long</option>
|
| 1018 |
+
</select>
|
| 1019 |
+
</div>
|
| 1020 |
+
</div>
|
| 1021 |
+
|
| 1022 |
+
<div class="setting-group">
|
| 1023 |
+
<label for="persona-textarea">"Persona" par Défaut (Prompt système)</label>
|
| 1024 |
+
<textarea id="persona-textarea" rows="4" placeholder="Ex: Agir comme un développeur Python expert."></textarea>
|
| 1025 |
+
</div>
|
| 1026 |
+
|
| 1027 |
+
<button id="save-settings-btn" style="width: 100%; padding: 0.75rem; background: #007bff; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s;">
|
| 1028 |
+
Sauvegarder les Paramètres
|
| 1029 |
+
</button>
|
| 1030 |
+
<button id="delete-all-history-btn" style="width: 100%; padding: 0.75rem; background: #cc0000; color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-top: 1rem;">
|
| 1031 |
+
Supprimer tout l'historique
|
| 1032 |
+
</button>
|
| 1033 |
+
</div>
|
| 1034 |
+
<button class="brand-toggle-btn" title="ErnestMind 2.5 - Revenir à l'accueil">ErnestMind 2.5</button>
|
| 1035 |
+
<main class="chat-wrapper">
|
| 1036 |
+
<div class="chat-header">
|
| 1037 |
+
<button id="ernest-plus-button" title="Abonnez-vous à ErnestMind Plus">
|
| 1038 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="Plus Logo" class="plus-logo"> ErnestMind Plus
|
| 1039 |
+
</button>
|
| 1040 |
+
<button id="login-button" title="Connexion / Profil">
|
| 1041 |
+
<span class="icon material-symbols-rounded">person</span>
|
| 1042 |
+
</button>
|
| 1043 |
+
</div>
|
| 1044 |
+
<div class="chat-list">
|
| 1045 |
+
</div>
|
| 1046 |
+
<div class="typing-area">
|
| 1047 |
+
<form action="#" class="typing-form">
|
| 1048 |
+
<div class="input-wrapper">
|
| 1049 |
+
<div id="file-display-area" class="file-display-area">
|
| 1050 |
+
</div>
|
| 1051 |
+
<div class="input-controls">
|
| 1052 |
+
<div class="input-controls-top">
|
| 1053 |
+
<textarea rows="4" placeholder="Entrez un prompt ici" class="typing-input" required
|
| 1054 |
+
maxlength="1000000"></textarea>
|
| 1055 |
+
</div>
|
| 1056 |
+
<div class="action-bar-bottom">
|
| 1057 |
+
<button class="file-upload-btn" type="button" title="Importer des fichiers (max. 10)">
|
| 1058 |
+
<span class="icon material-symbols-rounded">add</span>
|
| 1059 |
+
</button>
|
| 1060 |
+
<input type="file" id="file-input" multiple style="display: none;">
|
| 1061 |
+
<span id="char-count" class="char-count">0 / 1000000</span>
|
| 1062 |
+
<button id="send-btn" class="icon material-symbols-rounded send-button" type="submit"
|
| 1063 |
+
title="Envoyer le message"> mic_none </button>
|
| 1064 |
+
</div>
|
| 1065 |
+
</div>
|
| 1066 |
+
</div>
|
| 1067 |
+
<p id="file-error-message" style="display:none;">Vous pouvez importer un maximum de 10 fichiers.</p>
|
| 1068 |
+
<p class="disclaimer-text"> Veuillez vérifier les réponses. ErnestMind 2.5 peut être inexact. </p>
|
| 1069 |
+
</form>
|
| 1070 |
+
</div>
|
| 1071 |
+
</main>
|
| 1072 |
+
</div>
|
| 1073 |
+
|
| 1074 |
+
|
| 1075 |
+
|
| 1076 |
+
|
| 1077 |
+
<script src="https://cdn.jsdelivr.net/npm/marked@12.0.2/lib/marked.umd.min.js"></script>
|
| 1078 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
| 1079 |
+
<script>
|
| 1080 |
+
// -------------------------------------------------------------------
|
| 1081 |
+
// --- VARIABLES GLOBALES / SIMULATION DE L'INJECTION FLASK ---
|
| 1082 |
+
// -------------------------------------------------------------------
|
| 1083 |
+
|
| 1084 |
+
// SIMULATION : Récupérer l'ID de conversation du contexte Flask ou de l'URL.
|
| 1085 |
+
// En production, cette variable serait injectée par le template (ex: const CONV_ID_FROM_FLASK = "{{ conversation_id }}";)
|
| 1086 |
+
// Pour les tests locaux, simuler un ID s'il est présent, ou null si c'est un nouveau chat.
|
| 1087 |
+
// L'ID pourrait être récupéré par le script lui-même en parsant l'URL si nécessaire.
|
| 1088 |
+
// Ici, nous supposons qu'un ID est passé si la page n'est pas la page d'accueil par défaut.
|
| 1089 |
+
const getInitialConversationId = () => {
|
| 1090 |
+
const pathSegments = window.location.pathname.split('/').filter(segment => segment.length > 0);
|
| 1091 |
+
const copilotIndex = pathSegments.indexOf('gitforge_copilot');
|
| 1092 |
+
if (copilotIndex !== -1 && copilotIndex + 1 < pathSegments.length) {
|
| 1093 |
+
return pathSegments[copilotIndex + 1];
|
| 1094 |
+
}
|
| 1095 |
+
return null;
|
| 1096 |
+
};
|
| 1097 |
+
|
| 1098 |
+
// Fonctions utilitaires pour générer un UUID (GUID)
|
| 1099 |
+
const generateUUID = () => {
|
| 1100 |
+
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
|
| 1101 |
+
(c ^ crypto.getRandomValues(new Uint16Array(1))[0] & 15 >> c / 4).toString(16)
|
| 1102 |
+
);
|
| 1103 |
+
}
|
| 1104 |
+
|
| 1105 |
+
// --- Configuration des API (MODIFIÉ vers les nouvelles routes) ---
|
| 1106 |
+
const API_MESSAGE_URL = "/api/gemini/chat/message"; // Streaming
|
| 1107 |
+
const API_MESSAGE_WITH_FILES_URL = "/api/gemini/chat/message_with_files"; // NOUVELLE ROUTE
|
| 1108 |
+
const API_HISTORY_URL = "/api/gemini/chat/history"; // GET
|
| 1109 |
+
const API_SAVE_URL = "/api/gemini/chat/save"; // POST
|
| 1110 |
+
const API_LIST_URL = "/api/gemini/chat/list"; // NOUVEAU: GET pour la liste
|
| 1111 |
+
const API_DELETE_SINGLE_URL = "/api/gemini/chat/delete"; // NOUVEAU: DELETE pour une conversation
|
| 1112 |
+
const API_DELETE_ALL_URL = "/api/gemini/chat/delete_all"; // NOUVEAU: DELETE pour tout l'historique
|
| 1113 |
+
const FRONTEND_BASE_PATH = "/mindus/nexus/gitforge_copilot";
|
| 1114 |
+
|
| 1115 |
+
|
| 1116 |
+
// -------------------------------------------------------------------
|
| 1117 |
+
// --- RÉFÉRENCES AUX ÉLÉMENTS DU DOM ---
|
| 1118 |
+
// -------------------------------------------------------------------
|
| 1119 |
+
const typingArea = document.querySelector(".typing-area");
|
| 1120 |
+
const typingForm = document.querySelector(".typing-form");
|
| 1121 |
+
const typingInput = document.querySelector(".typing-input");
|
| 1122 |
+
const chatList = document.querySelector(".chat-list");
|
| 1123 |
+
const sidebar = document.getElementById("sidebar");
|
| 1124 |
+
const sidebarToggleBtn = document.getElementById("sidebar-toggle-btn");
|
| 1125 |
+
const toggleThemeBtn = document.getElementById("toggle-theme-btn");
|
| 1126 |
+
const recentChatsList = document.getElementById("recent-chats-list");
|
| 1127 |
+
const initialWelcome = document.getElementById("initial-welcome");
|
| 1128 |
+
const initialWelcomeHeader = document.getElementById("initial-welcome-header");
|
| 1129 |
+
const fileUploadBtn = document.querySelector(".file-upload-btn");
|
| 1130 |
+
const fileInput = document.getElementById("file-input");
|
| 1131 |
+
const loginButton = document.getElementById("login-button");
|
| 1132 |
+
const brandToggleButton = document.querySelector(".brand-toggle-btn");
|
| 1133 |
+
const ernestPlusButton = document.getElementById("ernest-plus-button");
|
| 1134 |
+
const sendButton = document.getElementById("send-btn");
|
| 1135 |
+
const fileDisplayArea = document.getElementById("file-display-area");
|
| 1136 |
+
const fileErrorMessage = document.getElementById("file-error-message");
|
| 1137 |
+
const charCountSpan = document.getElementById("char-count");
|
| 1138 |
+
const settingsCard = document.getElementById("settings-card");
|
| 1139 |
+
const settingsButton = document.getElementById("settings-button");
|
| 1140 |
+
const loadingHistoryIndicator = document.getElementById("loading-history-indicator");
|
| 1141 |
+
const deleteAllHistoryBtn = document.getElementById("delete-all-history-btn"); // NOUVEAU
|
| 1142 |
+
|
| 1143 |
+
// -------------------------------------------------------------------
|
| 1144 |
+
// --- VARIABLES D'ÉTAT ---
|
| 1145 |
+
// -------------------------------------------------------------------
|
| 1146 |
+
const MAX_TEXT_LENGTH = 1000000;
|
| 1147 |
+
const MAX_FILES = 10;
|
| 1148 |
+
const MAX_RECENT_CHATS = 5;
|
| 1149 |
+
let userMessage = null;
|
| 1150 |
+
let isResponseGenerating = false;
|
| 1151 |
+
let activeEventSource = null;
|
| 1152 |
+
let selectedFiles = [];
|
| 1153 |
+
|
| 1154 |
+
// MODIFIÉ : ID de la conversation en cours (initialisé au chargement)
|
| 1155 |
+
let currentConversationId = getInitialConversationId() || generateUUID();
|
| 1156 |
+
|
| 1157 |
+
let isStopped = false;
|
| 1158 |
+
|
| 1159 |
+
|
| 1160 |
+
// --- GESTION DE LA CARTE DE PARAMÈTRES (SETTINGS CARD) ---
|
| 1161 |
+
|
| 1162 |
+
// 1. Ouvrir/Fermer la carte via le bouton dans le footer de la sidebar
|
| 1163 |
+
settingsButton.addEventListener('click', (e) => {
|
| 1164 |
+
e.stopPropagation(); // Empêche l'événement de se propager plus loin
|
| 1165 |
+
settingsCard.classList.toggle('open');
|
| 1166 |
+
});
|
| 1167 |
+
|
| 1168 |
+
// 2. Fermer la carte quand on clique n'importe où en dehors de la carte
|
| 1169 |
+
document.addEventListener('click', (e) => {
|
| 1170 |
+
if (settingsCard.classList.contains('open')) {
|
| 1171 |
+
if (!settingsCard.contains(e.target) && e.target !== settingsButton && !settingsButton.contains(e.target) && !e.target.closest('#settings-card')) {
|
| 1172 |
+
settingsCard.classList.remove('open');
|
| 1173 |
+
}
|
| 1174 |
+
}
|
| 1175 |
+
});
|
| 1176 |
+
|
| 1177 |
+
|
| 1178 |
+
/**
|
| 1179 |
+
* Fonctions utilitaires
|
| 1180 |
+
*/
|
| 1181 |
+
|
| 1182 |
+
// Met à jour l'icône du thème
|
| 1183 |
+
const updateThemeIcon = (isLightmode) => {
|
| 1184 |
+
const iconSpan = toggleThemeBtn.querySelector('.icon');
|
| 1185 |
+
if (iconSpan) {
|
| 1186 |
+
iconSpan.textContent = isLightmode ? "dark_mode" : "light_mode";
|
| 1187 |
+
}
|
| 1188 |
+
};
|
| 1189 |
+
|
| 1190 |
+
// Gère la transition de la zone de saisie
|
| 1191 |
+
const dockTypingArea = (shouldDock) => {
|
| 1192 |
+
if (shouldDock) {
|
| 1193 |
+
typingArea.classList.add('docked');
|
| 1194 |
+
chatList.classList.add('has-docked-area');
|
| 1195 |
+
if (initialWelcome) initialWelcome.style.display = 'none';
|
| 1196 |
+
if (initialWelcomeHeader) initialWelcomeHeader.style.display = 'flex';
|
| 1197 |
+
} else {
|
| 1198 |
+
typingArea.classList.remove('docked');
|
| 1199 |
+
chatList.classList.remove('has-docked-area');
|
| 1200 |
+
if (initialWelcome) initialWelcome.style.display = 'flex';
|
| 1201 |
+
if (initialWelcomeHeader) initialWelcomeHeader.style.display = 'none';
|
| 1202 |
+
}
|
| 1203 |
+
}
|
| 1204 |
+
|
| 1205 |
+
// Fonction pour le post-traitement de la réponse IA (Highlight et Bouton Copier)
|
| 1206 |
+
const postProcessAiResponse = (htmlContent) => {
|
| 1207 |
+
const tempDiv = document.createElement('div');
|
| 1208 |
+
tempDiv.innerHTML = htmlContent;
|
| 1209 |
+
|
| 1210 |
+
// Trouver tous les blocs <pre> et les préparer
|
| 1211 |
+
tempDiv.querySelectorAll('pre').forEach(preElement => {
|
| 1212 |
+
const codeElement = preElement.querySelector('code');
|
| 1213 |
+
if (codeElement) {
|
| 1214 |
+
hljs.highlightElement(codeElement);
|
| 1215 |
+
}
|
| 1216 |
+
|
| 1217 |
+
const container = document.createElement('div');
|
| 1218 |
+
container.classList.add('code-container');
|
| 1219 |
+
preElement.parentNode.insertBefore(container, preElement);
|
| 1220 |
+
container.appendChild(preElement);
|
| 1221 |
+
|
| 1222 |
+
const copyBtn = document.createElement('button');
|
| 1223 |
+
copyBtn.classList.add('copy-code-btn');
|
| 1224 |
+
copyBtn.innerHTML = '<span class="material-symbols-rounded">content_copy</span>Copier';
|
| 1225 |
+
|
| 1226 |
+
const codeText = preElement.querySelector('code').innerText;
|
| 1227 |
+
|
| 1228 |
+
copyBtn.onclick = (e) => {
|
| 1229 |
+
e.preventDefault();
|
| 1230 |
+
copyCode(copyBtn, codeText);
|
| 1231 |
+
};
|
| 1232 |
+
|
| 1233 |
+
container.appendChild(copyBtn);
|
| 1234 |
+
});
|
| 1235 |
+
|
| 1236 |
+
return tempDiv.innerHTML;
|
| 1237 |
+
}
|
| 1238 |
+
|
| 1239 |
+
|
| 1240 |
+
// MODIFIÉ : loadLocalstorageData est maintenant asynchrone pour charger la liste
|
| 1241 |
+
const loadLocalstorageData = async () => {
|
| 1242 |
+
// 1. Charger le Thème
|
| 1243 |
+
const isLightmode = (localStorage.getItem("themeColor") === "light_mode");
|
| 1244 |
+
document.body.classList.toggle("light_mode", isLightmode);
|
| 1245 |
+
updateThemeIcon(isLightmode);
|
| 1246 |
+
|
| 1247 |
+
// 2. Charger et rendre l'historique de conversation (synchronisé avec l'URL)
|
| 1248 |
+
loadConversationHistory(currentConversationId);
|
| 1249 |
+
|
| 1250 |
+
// 3. Charger les Chats Récents depuis l'API (SANS fallback local)
|
| 1251 |
+
const recentChats = await fetchAndRenderUserChats(); // APPEL ASYNCHRONE
|
| 1252 |
+
renderRecentChats(recentChats);
|
| 1253 |
+
|
| 1254 |
+
// 4. Initialiser le compteur de caractères et le bouton d'envoi
|
| 1255 |
+
updateCharCount();
|
| 1256 |
+
updateSendButtonIcon();
|
| 1257 |
+
}
|
| 1258 |
+
|
| 1259 |
+
|
| 1260 |
+
// Rendu des chats récents (MODIFIÉ: Ajout de l'icône de suppression)
|
| 1261 |
+
const renderRecentChats = (chats) => {
|
| 1262 |
+
recentChatsList.innerHTML = '';
|
| 1263 |
+
if (chats.length === 0) {
|
| 1264 |
+
const emptyItem = document.createElement('li');
|
| 1265 |
+
emptyItem.classList.add('empty');
|
| 1266 |
+
emptyItem.innerHTML = `<span class="text" style="opacity:1;">Aucune conversation récente.</span>`;
|
| 1267 |
+
recentChatsList.appendChild(emptyItem);
|
| 1268 |
+
return;
|
| 1269 |
+
}
|
| 1270 |
+
|
| 1271 |
+
chats.forEach(chat => {
|
| 1272 |
+
const li = document.createElement('li');
|
| 1273 |
+
li.classList.add('recent-chat-item');
|
| 1274 |
+
|
| 1275 |
+
// Contenu du chat (icône et titre) - utilise flex-grow pour pousser le bouton à droite
|
| 1276 |
+
li.innerHTML = `
|
| 1277 |
+
<span class="icon material-symbols-rounded">chat</span>
|
| 1278 |
+
<span class="text" style="flex-grow: 1;">${chat.title}</span>
|
| 1279 |
+
<button class="delete-chat-btn" data-id="${chat.id}" title="Supprimer cette conversation" style="margin-left: auto; background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--placeholder-color); transition: color 0.2s; opacity: 0; display: flex; align-items: center;">
|
| 1280 |
+
<span class="material-symbols-rounded" style="font-size: 1.25rem;">delete</span>
|
| 1281 |
+
</button>
|
| 1282 |
+
`;
|
| 1283 |
+
|
| 1284 |
+
// Événement de clic pour charger une conversation
|
| 1285 |
+
li.addEventListener('click', (e) => {
|
| 1286 |
+
// Si on clique sur le bouton de suppression, on laisse l'écouteur du bouton gérer
|
| 1287 |
+
if (e.target.closest('.delete-chat-btn')) return;
|
| 1288 |
+
window.location.href = `${FRONTEND_BASE_PATH}/${chat.id}`;
|
| 1289 |
+
});
|
| 1290 |
+
|
| 1291 |
+
const deleteBtn = li.querySelector('.delete-chat-btn');
|
| 1292 |
+
|
| 1293 |
+
// Afficher le bouton de suppression au survol du LI (si sidebar ouverte)
|
| 1294 |
+
li.addEventListener('mouseenter', () => {
|
| 1295 |
+
// On affiche le bouton uniquement si la sidebar est ouverte
|
| 1296 |
+
if(sidebar.classList.contains('open') && !isResponseGenerating) {
|
| 1297 |
+
deleteBtn.style.opacity = '1';
|
| 1298 |
+
}
|
| 1299 |
+
});
|
| 1300 |
+
li.addEventListener('mouseleave', () => {
|
| 1301 |
+
deleteBtn.style.opacity = '0';
|
| 1302 |
+
});
|
| 1303 |
+
|
| 1304 |
+
// Événement de clic pour la suppression
|
| 1305 |
+
deleteBtn.addEventListener('click', (e) => {
|
| 1306 |
+
e.stopPropagation(); // Empêche la navigation
|
| 1307 |
+
deleteConversation(chat.id, li);
|
| 1308 |
+
});
|
| 1309 |
+
|
| 1310 |
+
// Ajuster le style du bouton au survol
|
| 1311 |
+
deleteBtn.addEventListener('mouseenter', () => deleteBtn.style.color = '#cc0000');
|
| 1312 |
+
deleteBtn.addEventListener('mouseleave', () => deleteBtn.style.color = 'var(--placeholder-color)');
|
| 1313 |
+
|
| 1314 |
+
recentChatsList.appendChild(li);
|
| 1315 |
+
});
|
| 1316 |
+
}
|
| 1317 |
+
|
| 1318 |
+
|
| 1319 |
+
// MODIFIÉ : Nouvelle fonction 0 : Charger la liste des chats récents depuis l'API (SANS FALLBACK LOCAL)
|
| 1320 |
+
const fetchAndRenderUserChats = async () => {
|
| 1321 |
+
try {
|
| 1322 |
+
const response = await fetch(API_LIST_URL);
|
| 1323 |
+
|
| 1324 |
+
if (!response.ok) {
|
| 1325 |
+
console.warn(`Impossible de charger la liste des chats (HTTP ${response.status}).`);
|
| 1326 |
+
return [];
|
| 1327 |
+
}
|
| 1328 |
+
|
| 1329 |
+
const chatListResponse = await response.json();
|
| 1330 |
+
|
| 1331 |
+
if (chatListResponse.chats && Array.isArray(chatListResponse.chats)) {
|
| 1332 |
+
return chatListResponse.chats;
|
| 1333 |
+
} else {
|
| 1334 |
+
throw new Error("Format de réponse de liste de chats invalide.");
|
| 1335 |
+
}
|
| 1336 |
+
|
| 1337 |
+
} catch (error) {
|
| 1338 |
+
console.error("Erreur critique lors de la récupération des chats récents:", error);
|
| 1339 |
+
return [];
|
| 1340 |
+
}
|
| 1341 |
+
}
|
| 1342 |
+
|
| 1343 |
+
|
| 1344 |
+
// NOUVELLE FONCTION (1/3) : Suppression d'une conversation spécifique
|
| 1345 |
+
const deleteConversation = async (convId, listItem) => {
|
| 1346 |
+
if (!confirm(`Êtes-vous sûr de vouloir supprimer la conversation ID: ${convId} ?`)) {
|
| 1347 |
+
return;
|
| 1348 |
+
}
|
| 1349 |
+
|
| 1350 |
+
const deleteBtn = listItem.querySelector('.delete-chat-btn');
|
| 1351 |
+
const originalHtml = deleteBtn.innerHTML;
|
| 1352 |
+
const currentId = currentConversationId;
|
| 1353 |
+
|
| 1354 |
+
// Afficher un spinner (petite taille)
|
| 1355 |
+
deleteBtn.innerHTML = '<span class="delete-spinner" style="width: 16px; height: 16px;"></span>';
|
| 1356 |
+
deleteBtn.disabled = true;
|
| 1357 |
+
|
| 1358 |
+
try {
|
| 1359 |
+
const response = await fetch(`${API_DELETE_SINGLE_URL}/${convId}`, {
|
| 1360 |
+
method: 'DELETE',
|
| 1361 |
+
});
|
| 1362 |
+
|
| 1363 |
+
if (!response.ok) {
|
| 1364 |
+
let errorText = `Erreur HTTP lors de la suppression: ${response.status}`;
|
| 1365 |
+
try {
|
| 1366 |
+
const errorJson = await response.json();
|
| 1367 |
+
errorText = errorJson.error || errorText;
|
| 1368 |
+
} catch(e) {}
|
| 1369 |
+
alert(errorText);
|
| 1370 |
+
throw new Error(errorText);
|
| 1371 |
+
}
|
| 1372 |
+
|
| 1373 |
+
// Succès: Retirer l'élément de la liste
|
| 1374 |
+
listItem.remove();
|
| 1375 |
+
|
| 1376 |
+
// Recharger la liste des chats récents (via l'API)
|
| 1377 |
+
const recentChats = await fetchAndRenderUserChats();
|
| 1378 |
+
renderRecentChats(recentChats);
|
| 1379 |
+
|
| 1380 |
+
// Si la conversation supprimée était la conversation active, recharger la page d'accueil
|
| 1381 |
+
if (convId === currentId) {
|
| 1382 |
+
window.location.href = FRONTEND_BASE_PATH;
|
| 1383 |
+
}
|
| 1384 |
+
|
| 1385 |
+
|
| 1386 |
+
} catch (error) {
|
| 1387 |
+
console.error("Erreur lors de la suppression de conversation:", error);
|
| 1388 |
+
// Restaurer le bouton
|
| 1389 |
+
deleteBtn.innerHTML = originalHtml;
|
| 1390 |
+
deleteBtn.disabled = false;
|
| 1391 |
+
}
|
| 1392 |
+
}
|
| 1393 |
+
|
| 1394 |
+
// NOUVELLE FONCTION (2/3) : Suppression de tout l'historique
|
| 1395 |
+
const deleteAllHistory = async () => {
|
| 1396 |
+
if (!confirm("ATTENTION: Êtes-vous sûr de vouloir SUPPRIMER TOUT votre historique de conversation ? Cette action est irréversible.")) {
|
| 1397 |
+
return;
|
| 1398 |
+
}
|
| 1399 |
+
|
| 1400 |
+
const originalHtml = deleteAllHistoryBtn.innerHTML;
|
| 1401 |
+
// Afficher l'indicateur de chargement
|
| 1402 |
+
deleteAllHistoryBtn.innerHTML = '<span class="delete-spinner"></span> Suppression en cours...';
|
| 1403 |
+
deleteAllHistoryBtn.disabled = true;
|
| 1404 |
+
|
| 1405 |
+
try {
|
| 1406 |
+
const response = await fetch(API_DELETE_ALL_URL, {
|
| 1407 |
+
method: 'DELETE',
|
| 1408 |
+
});
|
| 1409 |
+
|
| 1410 |
+
if (!response.ok) {
|
| 1411 |
+
let errorText = `Erreur HTTP lors de la suppression de l'historique: ${response.status}`;
|
| 1412 |
+
try {
|
| 1413 |
+
const errorJson = await response.json();
|
| 1414 |
+
errorText = errorJson.error || errorText;
|
| 1415 |
+
} catch(e) {}
|
| 1416 |
+
alert(errorText);
|
| 1417 |
+
throw new Error(errorText);
|
| 1418 |
+
}
|
| 1419 |
+
|
| 1420 |
+
// Succès: Réinitialiser l'état de l'application
|
| 1421 |
+
alert("Tout l'historique de conversation a été supprimé avec succès.");
|
| 1422 |
+
|
| 1423 |
+
// Réinitialiser la conversation active et l'interface
|
| 1424 |
+
const newConvId = generateUUID();
|
| 1425 |
+
currentConversationId = newConvId;
|
| 1426 |
+
history.replaceState(null, '', `${FRONTEND_BASE_PATH}/${currentConversationId}`);
|
| 1427 |
+
chatList.innerHTML = '';
|
| 1428 |
+
selectedFiles = [];
|
| 1429 |
+
renderFileBadges();
|
| 1430 |
+
typingInput.value = "";
|
| 1431 |
+
typingInput.style.height = 'auto';
|
| 1432 |
+
updateCharCount();
|
| 1433 |
+
dockTypingArea(false);
|
| 1434 |
+
|
| 1435 |
+
// Rafraîchir la liste des chats récents (maintenant vide)
|
| 1436 |
+
const recentChats = await fetchAndRenderUserChats();
|
| 1437 |
+
renderRecentChats(recentChats);
|
| 1438 |
+
|
| 1439 |
+
settingsCard.classList.remove('open'); // Fermer la carte après l'action
|
| 1440 |
+
|
| 1441 |
+
} catch (error) {
|
| 1442 |
+
console.error("Erreur lors de la suppression de tout l'historique:", error);
|
| 1443 |
+
} finally {
|
| 1444 |
+
// Restaurer le bouton
|
| 1445 |
+
deleteAllHistoryBtn.innerHTML = originalHtml;
|
| 1446 |
+
deleteAllHistoryBtn.disabled = false;
|
| 1447 |
+
}
|
| 1448 |
+
}
|
| 1449 |
+
|
| 1450 |
+
|
| 1451 |
+
// NOUVELLE FONCTION (3/3) : Charger l'historique de conversation (Logique inchangée)
|
| 1452 |
+
const loadConversationHistory = async (convId) => {
|
| 1453 |
+
chatList.innerHTML = ''; // Nettoyer l'affichage initial
|
| 1454 |
+
|
| 1455 |
+
// Afficher l'indicateur de chargement
|
| 1456 |
+
if (loadingHistoryIndicator) loadingHistoryIndicator.style.display = 'block';
|
| 1457 |
+
|
| 1458 |
+
if (!convId || convId === getInitialConversationId() && chatList.children.length > 0) {
|
| 1459 |
+
// Si l'ID n'existe pas ou si l'historique est déjà chargé pour cet ID
|
| 1460 |
+
if (loadingHistoryIndicator) loadingHistoryIndicator.style.display = 'none';
|
| 1461 |
+
dockTypingArea(false);
|
| 1462 |
+
return;
|
| 1463 |
+
}
|
| 1464 |
+
|
| 1465 |
+
try {
|
| 1466 |
+
const response = await fetch(`${API_HISTORY_URL}/${convId}`);
|
| 1467 |
+
|
| 1468 |
+
if (!response.ok) {
|
| 1469 |
+
// Si l'historique n'existe pas (ex: nouvel ID)
|
| 1470 |
+
if (response.status === 404) {
|
| 1471 |
+
console.log(`Nouvelle conversation: ID ${convId}`);
|
| 1472 |
+
dockTypingArea(false); // Afficher l'écran de bienvenue
|
| 1473 |
+
return;
|
| 1474 |
+
}
|
| 1475 |
+
throw new Error(`Erreur HTTP: ${response.status}`);
|
| 1476 |
+
}
|
| 1477 |
+
|
| 1478 |
+
const historyData = await response.json();
|
| 1479 |
+
|
| 1480 |
+
if (historyData.history && historyData.history.length > 0) {
|
| 1481 |
+
|
| 1482 |
+
historyData.history.forEach(turn => {
|
| 1483 |
+
// Message Utilisateur
|
| 1484 |
+
appendMessage('user', turn.messages[0].text); // Assurez-vous d'accéder au bon champ si le format change
|
| 1485 |
+
|
| 1486 |
+
// Message Assistant
|
| 1487 |
+
const aiResponseText = turn.messages[1].text; // Assurez-vous d'accéder au bon champ si le format change
|
| 1488 |
+
// Convertir le Markdown de la réponse complète AI en HTML
|
| 1489 |
+
const rawHTML = marked.parse(aiResponseText, { breaks: true });
|
| 1490 |
+
const processedHTML = postProcessAiResponse(rawHTML);
|
| 1491 |
+
appendMessage('ai', processedHTML);
|
| 1492 |
+
});
|
| 1493 |
+
|
| 1494 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1495 |
+
dockTypingArea(true); // Ancrer la zone de saisie
|
| 1496 |
+
} else {
|
| 1497 |
+
dockTypingArea(false); // Afficher l'écran de bienvenue si historique vide
|
| 1498 |
+
}
|
| 1499 |
+
} catch (error) {
|
| 1500 |
+
console.error("Erreur lors du chargement de l'historique:", error);
|
| 1501 |
+
// Afficher une erreur dans la zone de chat si nécessaire
|
| 1502 |
+
const errorDiv = createChatMessageElement("ai", `<div style="color:red;">Erreur: Impossible de charger l'historique de la conversation.</div>`);
|
| 1503 |
+
chatList.appendChild(errorDiv);
|
| 1504 |
+
dockTypingArea(false);
|
| 1505 |
+
} finally {
|
| 1506 |
+
if (loadingHistoryIndicator) loadingHistoryIndicator.style.display = 'none';
|
| 1507 |
+
}
|
| 1508 |
+
};
|
| 1509 |
+
|
| 1510 |
+
// NOUVELLE FONCTION 2 : Sauvegarder un tour de conversation complet (Post-Streaming)
|
| 1511 |
+
const saveConversationTurn = async (convId, userPrompt, aiResponse) => {
|
| 1512 |
+
// Ignorer la sauvegarde si l'utilisateur a interrompu la réponse
|
| 1513 |
+
if (!userPrompt || !aiResponse) return;
|
| 1514 |
+
|
| 1515 |
+
const requestBody = {
|
| 1516 |
+
conversation_id: convId,
|
| 1517 |
+
prompt: userPrompt,
|
| 1518 |
+
ai_response: aiResponse
|
| 1519 |
+
};
|
| 1520 |
+
|
| 1521 |
+
let isFirstTurn = false;
|
| 1522 |
+
const totalMessages = chatList.querySelectorAll('.chat-message').length;
|
| 1523 |
+
if (totalMessages === 2) { // 1 message utilisateur + 1 message AI = 1er tour
|
| 1524 |
+
isFirstTurn = true;
|
| 1525 |
+
}
|
| 1526 |
+
|
| 1527 |
+
|
| 1528 |
+
try {
|
| 1529 |
+
const response = await fetch(API_SAVE_URL, {
|
| 1530 |
+
method: 'POST',
|
| 1531 |
+
headers: {
|
| 1532 |
+
'Content-Type': 'application/json'
|
| 1533 |
+
},
|
| 1534 |
+
body: JSON.stringify(requestBody)
|
| 1535 |
+
});
|
| 1536 |
+
|
| 1537 |
+
if (!response.ok) {
|
| 1538 |
+
throw new Error(`Erreur HTTP lors de la sauvegarde: ${response.status}`);
|
| 1539 |
+
}
|
| 1540 |
+
|
| 1541 |
+
// --- DÉBUT MODIFICATION: Logique de changement d'URL et rafraîchissement des chats récents ---
|
| 1542 |
+
if (isFirstTurn) {
|
| 1543 |
+
// Changer l'URL uniquement après la PREMIÈRE sauvegarde réussie
|
| 1544 |
+
history.replaceState(null, '', `${FRONTEND_BASE_PATH}/${convId}`);
|
| 1545 |
+
|
| 1546 |
+
// Rafraîchir la liste des chats récents (car la nouvelle conversation a été sauvegardée)
|
| 1547 |
+
const recentChats = await fetchAndRenderUserChats();
|
| 1548 |
+
renderRecentChats(recentChats);
|
| 1549 |
+
}
|
| 1550 |
+
// --- FIN MODIFICATION ---
|
| 1551 |
+
|
| 1552 |
+
} catch (error) {
|
| 1553 |
+
console.error("Erreur lors de la sauvegarde du tour de conversation:", error);
|
| 1554 |
+
// Le chat peut continuer même si la sauvegarde échoue
|
| 1555 |
+
}
|
| 1556 |
+
};
|
| 1557 |
+
|
| 1558 |
+
// --- LOGIQUE DE CHAT ---
|
| 1559 |
+
|
| 1560 |
+
let currentAiResponseDiv = null;
|
| 1561 |
+
|
| 1562 |
+
/**
|
| 1563 |
+
* Crée un élément de message (pour utilisateur ou IA) et l'ajoute à la liste.
|
| 1564 |
+
* @param {string} type - 'user' ou 'ai'.
|
| 1565 |
+
* @param {string} content - Le contenu du message (HTML si post-traité).
|
| 1566 |
+
* @returns {HTMLElement} L'élément HTML du message.
|
| 1567 |
+
*/
|
| 1568 |
+
const createChatMessageElement = (type, content) => {
|
| 1569 |
+
const chatDiv = document.createElement("div");
|
| 1570 |
+
chatDiv.classList.add("chat-message", type);
|
| 1571 |
+
const icon = type === "user" ? "person" : "psychology";
|
| 1572 |
+
|
| 1573 |
+
if (type === "user") {
|
| 1574 |
+
const html = `<div class="text-content">${content}</div>`;
|
| 1575 |
+
chatDiv.innerHTML = html;
|
| 1576 |
+
} else {
|
| 1577 |
+
const html = `
|
| 1578 |
+
<span class="avatar material-symbols-rounded">${icon}</span>
|
| 1579 |
+
<div class="text-content">${content}</div>
|
| 1580 |
+
`;
|
| 1581 |
+
chatDiv.innerHTML = html;
|
| 1582 |
+
}
|
| 1583 |
+
|
| 1584 |
+
return chatDiv;
|
| 1585 |
+
}
|
| 1586 |
+
|
| 1587 |
+
// Fonction d'aide pour la cohérence
|
| 1588 |
+
const appendMessage = (type, content) => {
|
| 1589 |
+
const messageElement = createChatMessageElement(type, content);
|
| 1590 |
+
chatList.appendChild(messageElement);
|
| 1591 |
+
}
|
| 1592 |
+
|
| 1593 |
+
|
| 1594 |
+
// MODIFIÉ : Gère le streaming SSE avec Fetch et inclut l'ID de conversation
|
| 1595 |
+
const generateResponse = async (userText, files, convId) => {
|
| 1596 |
+
if (isResponseGenerating || isStopped) return;
|
| 1597 |
+
|
| 1598 |
+
isResponseGenerating = true;
|
| 1599 |
+
isStopped = false;
|
| 1600 |
+
sendButton.textContent = "stop";
|
| 1601 |
+
sendButton.classList.add('active');
|
| 1602 |
+
|
| 1603 |
+
const loadingHtml = '<div class="typing-animation"><div class="thought-animation"></div>Raisonnement en cours...</div>';
|
| 1604 |
+
currentAiResponseDiv = createChatMessageElement("ai", loadingHtml);
|
| 1605 |
+
chatList.appendChild(currentAiResponseDiv);
|
| 1606 |
+
|
| 1607 |
+
// Défilement forcé
|
| 1608 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1609 |
+
|
| 1610 |
+
// MODIFIÉ : Variable pour stocker le texte généré par l'IA (en Markdown brut)
|
| 1611 |
+
let fullGeneratedText = "";
|
| 1612 |
+
|
| 1613 |
+
// --- DÉBUT MODIFICATION: Logique pour les fichiers / JSON ---
|
| 1614 |
+
const hasFiles = files && files.length > 0;
|
| 1615 |
+
let apiEndpoint = API_MESSAGE_URL;
|
| 1616 |
+
let requestOptions = {
|
| 1617 |
+
method: 'POST',
|
| 1618 |
+
};
|
| 1619 |
+
|
| 1620 |
+
if (hasFiles) {
|
| 1621 |
+
// Cas 1: Envoi avec fichiers (multipart/form-data)
|
| 1622 |
+
apiEndpoint = API_MESSAGE_WITH_FILES_URL;
|
| 1623 |
+
|
| 1624 |
+
const formData = new FormData();
|
| 1625 |
+
formData.append('conversation_id', convId);
|
| 1626 |
+
formData.append('prompt', userText);
|
| 1627 |
+
|
| 1628 |
+
files.forEach((file) => {
|
| 1629 |
+
// Le backend attend tous les fichiers sous le nom 'files' pour gestion multiple
|
| 1630 |
+
formData.append('files', file, file.name);
|
| 1631 |
+
});
|
| 1632 |
+
|
| 1633 |
+
requestOptions.body = formData;
|
| 1634 |
+
// IMPORTANT: Ne pas spécifier 'Content-Type' pour FormData
|
| 1635 |
+
|
| 1636 |
+
} else {
|
| 1637 |
+
// Cas 2: Envoi de texte simple (application/json)
|
| 1638 |
+
const requestBody = {
|
| 1639 |
+
prompt: userText,
|
| 1640 |
+
conversation_id: convId
|
| 1641 |
+
};
|
| 1642 |
+
requestOptions.headers = {
|
| 1643 |
+
'Content-Type': 'application/json'
|
| 1644 |
+
};
|
| 1645 |
+
requestOptions.body = JSON.stringify(requestBody);
|
| 1646 |
+
}
|
| 1647 |
+
// --- FIN MODIFICATION ---
|
| 1648 |
+
|
| 1649 |
+
try {
|
| 1650 |
+
const response = await fetch(apiEndpoint, requestOptions); // Utilise la variable apiEndpoint
|
| 1651 |
+
|
| 1652 |
+
if (!response.ok) {
|
| 1653 |
+
let errorDetails = `Erreur HTTP ${response.status} du proxy.`;
|
| 1654 |
+
try {
|
| 1655 |
+
const errorJson = await response.json();
|
| 1656 |
+
errorDetails = errorJson.error || errorDetails;
|
| 1657 |
+
} catch (e) { }
|
| 1658 |
+
throw new Error(errorDetails);
|
| 1659 |
+
}
|
| 1660 |
+
|
| 1661 |
+
const reader = response.body.getReader();
|
| 1662 |
+
const decoder = new TextDecoder("utf-8");
|
| 1663 |
+
let buffer = "";
|
| 1664 |
+
|
| 1665 |
+
const textContentDiv = currentAiResponseDiv.querySelector('.text-content');
|
| 1666 |
+
textContentDiv.innerHTML = '';
|
| 1667 |
+
|
| 1668 |
+
while(!isStopped) {
|
| 1669 |
+
const { value, done } = await reader.read();
|
| 1670 |
+
if (done) break;
|
| 1671 |
+
|
| 1672 |
+
buffer += decoder.decode(value, { stream: true });
|
| 1673 |
+
|
| 1674 |
+
let events = buffer.split('\n\n');
|
| 1675 |
+
buffer = events.pop();
|
| 1676 |
+
|
| 1677 |
+
events.forEach(eventStr => {
|
| 1678 |
+
if (isStopped || !eventStr) return;
|
| 1679 |
+
|
| 1680 |
+
let eventData = null;
|
| 1681 |
+
|
| 1682 |
+
eventStr.split('\n').forEach(line => {
|
| 1683 |
+
if (line.startsWith('data: ')) {
|
| 1684 |
+
eventData = line.substring(6).trim();
|
| 1685 |
+
}
|
| 1686 |
+
});
|
| 1687 |
+
|
| 1688 |
+
if (eventData) {
|
| 1689 |
+
try {
|
| 1690 |
+
const data = JSON.parse(eventData);
|
| 1691 |
+
const eventType = data.type;
|
| 1692 |
+
|
| 1693 |
+
if (eventType === 'CONV_ID' && data.id) {
|
| 1694 |
+
// Mettre à jour si un nouvel ID est renvoyé (rarement)
|
| 1695 |
+
currentConversationId = data.id;
|
| 1696 |
+
console.log("Nouveau CONV_ID reçu (normalement le même):", currentConversationId);
|
| 1697 |
+
|
| 1698 |
+
} else if (eventType === 'CHUNK' && data.text) {
|
| 1699 |
+
const token = data.text;
|
| 1700 |
+
fullGeneratedText += token;
|
| 1701 |
+
|
| 1702 |
+
// Processus de rendu
|
| 1703 |
+
const renderedHTML = marked.parse(fullGeneratedText, { breaks: true });
|
| 1704 |
+
const processedHTML = postProcessAiResponse(renderedHTML);
|
| 1705 |
+
textContentDiv.innerHTML = processedHTML;
|
| 1706 |
+
|
| 1707 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1708 |
+
|
| 1709 |
+
} else if (eventType === 'END') {
|
| 1710 |
+
// MODIFIÉ : Déclenchement de la sauvegarde
|
| 1711 |
+
saveConversationTurn(currentConversationId, userText, fullGeneratedText);
|
| 1712 |
+
|
| 1713 |
+
isStopped = true;
|
| 1714 |
+
reader.cancel();
|
| 1715 |
+
|
| 1716 |
+
} else if (eventType === 'ERROR' && data.text) {
|
| 1717 |
+
const errorMessage = `Une erreur est survenue côté serveur: ${data.text}`;
|
| 1718 |
+
textContentDiv.innerHTML = `<div style="color:red;">${errorMessage}</div>`;
|
| 1719 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1720 |
+
isStopped = true;
|
| 1721 |
+
reader.cancel();
|
| 1722 |
+
}
|
| 1723 |
+
} catch (e) {
|
| 1724 |
+
console.error("Erreur de parsing JSON pour l'événement:", e, "Data:", eventData);
|
| 1725 |
+
textContentDiv.innerHTML = `<div style="color:red;">Erreur: Réponse du serveur mal formatée.</div>`;
|
| 1726 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1727 |
+
isStopped = true;
|
| 1728 |
+
reader.cancel();
|
| 1729 |
+
}
|
| 1730 |
+
}
|
| 1731 |
+
});
|
| 1732 |
+
}
|
| 1733 |
+
|
| 1734 |
+
// Si le streaming s'est terminé sans erreur mais n'a pas déclenché l'END (ex: stream terminé normalement)
|
| 1735 |
+
if (!isStopped) {
|
| 1736 |
+
saveConversationTurn(currentConversationId, userText, fullGeneratedText);
|
| 1737 |
+
}
|
| 1738 |
+
|
| 1739 |
+
} catch (error) {
|
| 1740 |
+
console.error("Erreur lors de la génération de la réponse:", error);
|
| 1741 |
+
|
| 1742 |
+
let errorMessage = `Désolé, une erreur est survenue lors de la connexion à l'IA : ${error.message}.`;
|
| 1743 |
+
|
| 1744 |
+
const textContentDiv = currentAiResponseDiv ? currentAiResponseDiv.querySelector('.text-content') : null;
|
| 1745 |
+
|
| 1746 |
+
if (textContentDiv) {
|
| 1747 |
+
textContentDiv.innerHTML = `<div style="color:red;">${errorMessage}</div>`;
|
| 1748 |
+
} else {
|
| 1749 |
+
const errorDiv = createChatMessageElement("ai", `<div style="color:red;">${errorMessage}</div>`);
|
| 1750 |
+
chatList.appendChild(errorDiv);
|
| 1751 |
+
}
|
| 1752 |
+
|
| 1753 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1754 |
+
|
| 1755 |
+
} finally {
|
| 1756 |
+
if (isStopped) {
|
| 1757 |
+
isStopped = false;
|
| 1758 |
+
}
|
| 1759 |
+
|
| 1760 |
+
isResponseGenerating = false;
|
| 1761 |
+
sendButton.textContent = "send";
|
| 1762 |
+
sendButton.classList.remove('active');
|
| 1763 |
+
updateSendButtonIcon();
|
| 1764 |
+
currentAiResponseDiv = null;
|
| 1765 |
+
}
|
| 1766 |
+
}
|
| 1767 |
+
|
| 1768 |
+
|
| 1769 |
+
/**
|
| 1770 |
+
* Copie le code dans le presse-papiers et met à jour le bouton.
|
| 1771 |
+
*/
|
| 1772 |
+
const copyCode = (btn, code) => {
|
| 1773 |
+
if (navigator.clipboard) {
|
| 1774 |
+
navigator.clipboard.writeText(code).then(() => {
|
| 1775 |
+
const originalText = btn.innerHTML;
|
| 1776 |
+
btn.innerHTML = '<span class="material-symbols-rounded">done</span>Copié!';
|
| 1777 |
+
setTimeout(() => {
|
| 1778 |
+
btn.innerHTML = originalText;
|
| 1779 |
+
}, 2000);
|
| 1780 |
+
}).catch(err => {
|
| 1781 |
+
console.error('Erreur lors de la copie: ', err);
|
| 1782 |
+
});
|
| 1783 |
+
} else {
|
| 1784 |
+
alert("Votre navigateur ne supporte pas l'API Clipboard.");
|
| 1785 |
+
}
|
| 1786 |
+
};
|
| 1787 |
+
|
| 1788 |
+
// --- LOGIQUE POUR LA GESTION DES FICHIERS, COMPTEUR DE CARACTÈRES, ICÔNE D'ENVOI (Non modifiées) ---
|
| 1789 |
+
|
| 1790 |
+
const renderFileBadges = () => {
|
| 1791 |
+
fileDisplayArea.innerHTML = '';
|
| 1792 |
+
|
| 1793 |
+
if (selectedFiles.length === 0) {
|
| 1794 |
+
fileDisplayArea.style.display = 'none';
|
| 1795 |
+
} else {
|
| 1796 |
+
fileDisplayArea.style.display = 'flex';
|
| 1797 |
+
}
|
| 1798 |
+
|
| 1799 |
+
selectedFiles.forEach((file, index) => {
|
| 1800 |
+
const badge = document.createElement('div');
|
| 1801 |
+
badge.classList.add('file-badge');
|
| 1802 |
+
|
| 1803 |
+
const displayName = file.name.length > 20 ? file.name.substring(0, 17) + '...' : file.name;
|
| 1804 |
+
|
| 1805 |
+
badge.innerHTML = `
|
| 1806 |
+
<span>${displayName}</span>
|
| 1807 |
+
<button class="delete-file-btn" data-index="${index}" title="Supprimer le fichier">
|
| 1808 |
+
<span class="material-symbols-rounded">close</span>
|
| 1809 |
+
</button>
|
| 1810 |
+
`;
|
| 1811 |
+
|
| 1812 |
+
fileDisplayArea.appendChild(badge);
|
| 1813 |
+
});
|
| 1814 |
+
|
| 1815 |
+
fileDisplayArea.querySelectorAll('.delete-file-btn').forEach(btn => {
|
| 1816 |
+
btn.addEventListener('click', (e) => {
|
| 1817 |
+
e.stopPropagation();
|
| 1818 |
+
const indexToDelete = parseInt(e.currentTarget.getAttribute('data-index'));
|
| 1819 |
+
selectedFiles.splice(indexToDelete, 1);
|
| 1820 |
+
fileInput.value = '';
|
| 1821 |
+
renderFileBadges();
|
| 1822 |
+
updateSendButtonIcon();
|
| 1823 |
+
});
|
| 1824 |
+
});
|
| 1825 |
+
|
| 1826 |
+
updateSendButtonIcon();
|
| 1827 |
+
};
|
| 1828 |
+
|
| 1829 |
+
const updateCharCount = () => {
|
| 1830 |
+
const currentLength = typingInput.value.length;
|
| 1831 |
+
charCountSpan.textContent = `${currentLength} / ${MAX_TEXT_LENGTH}`;
|
| 1832 |
+
|
| 1833 |
+
if (currentLength > MAX_TEXT_LENGTH) {
|
| 1834 |
+
charCountSpan.classList.add('error');
|
| 1835 |
+
} else {
|
| 1836 |
+
charCountSpan.classList.remove('error');
|
| 1837 |
+
}
|
| 1838 |
+
};
|
| 1839 |
+
|
| 1840 |
+
const updateSendButtonIcon = () => {
|
| 1841 |
+
if (isResponseGenerating) {
|
| 1842 |
+
return;
|
| 1843 |
+
}
|
| 1844 |
+
|
| 1845 |
+
const hasText = typingInput.value.trim().length > 0;
|
| 1846 |
+
const hasFiles = selectedFiles.length > 0;
|
| 1847 |
+
|
| 1848 |
+
if (hasText || hasFiles) {
|
| 1849 |
+
sendButton.textContent = "send";
|
| 1850 |
+
sendButton.classList.add('active');
|
| 1851 |
+
} else {
|
| 1852 |
+
sendButton.textContent = "mic_none";
|
| 1853 |
+
sendButton.classList.remove('active');
|
| 1854 |
+
}
|
| 1855 |
+
};
|
| 1856 |
+
|
| 1857 |
+
|
| 1858 |
+
/**
|
| 1859 |
+
* Gère l'envoi du message utilisateur.
|
| 1860 |
+
*/
|
| 1861 |
+
const handleOutgoingChat = () => {
|
| 1862 |
+
if (isResponseGenerating) return;
|
| 1863 |
+
|
| 1864 |
+
userMessage = typingInput.value.trim();
|
| 1865 |
+
|
| 1866 |
+
if (userMessage.length > MAX_TEXT_LENGTH) {
|
| 1867 |
+
alert(`Erreur: Le texte saisi dépasse la limite de ${MAX_TEXT_LENGTH} caractères.`);
|
| 1868 |
+
return;
|
| 1869 |
+
}
|
| 1870 |
+
|
| 1871 |
+
if (!userMessage && selectedFiles.length === 0) {
|
| 1872 |
+
console.log("Tentative d'enregistrement vocal (non implémenté)");
|
| 1873 |
+
return;
|
| 1874 |
+
}
|
| 1875 |
+
|
| 1876 |
+
|
| 1877 |
+
dockTypingArea(true);
|
| 1878 |
+
|
| 1879 |
+
// 1. Préparer le contenu du message utilisateur
|
| 1880 |
+
let contentForDisplay = userMessage;
|
| 1881 |
+
if (selectedFiles.length > 0) {
|
| 1882 |
+
const fileListHtml = selectedFiles.map(f => `<span style="font-size:0.9em; display:block; color:#007bff;">[Fichier: ${f.name}]</span>`).join('');
|
| 1883 |
+
contentForDisplay = fileListHtml + (userMessage ? `<br><br>${userMessage}` : '');
|
| 1884 |
+
}
|
| 1885 |
+
|
| 1886 |
+
|
| 1887 |
+
// 2. Afficher le message de l'utilisateur
|
| 1888 |
+
appendMessage("user", contentForDisplay);
|
| 1889 |
+
|
| 1890 |
+
chatList.scrollTo(0, chatList.scrollHeight);
|
| 1891 |
+
|
| 1892 |
+
// 4. Obtenir la réponse de l'IA (passe le texte, les fichiers et l'ID de conversation)
|
| 1893 |
+
generateResponse(userMessage, selectedFiles, currentConversationId);
|
| 1894 |
+
|
| 1895 |
+
// 5. Nettoyer l'entrée et l'état des fichiers
|
| 1896 |
+
typingInput.value = "";
|
| 1897 |
+
typingInput.style.height = 'auto';
|
| 1898 |
+
selectedFiles = [];
|
| 1899 |
+
renderFileBadges();
|
| 1900 |
+
updateCharCount();
|
| 1901 |
+
updateSendButtonIcon();
|
| 1902 |
+
typingInput.focus();
|
| 1903 |
+
}
|
| 1904 |
+
|
| 1905 |
+
const handleLoginNavigation = () => {
|
| 1906 |
+
console.log("Naviguer vers la page de Connexion / Profil...");
|
| 1907 |
+
alert("Fonctionnalité de Connexion / Profil (non implémentée)");
|
| 1908 |
+
}
|
| 1909 |
+
|
| 1910 |
+
const handleBrandNavigation = () => {
|
| 1911 |
+
console.log("Naviguer vers la page d'accueil...");
|
| 1912 |
+
alert("Fonctionnalité de navigation Accueil (non implémentée)");
|
| 1913 |
+
}
|
| 1914 |
+
|
| 1915 |
+
const handleErnestPlusNavigation = () => {
|
| 1916 |
+
console.log("Naviguer vers la page ErnestMind Plus...");
|
| 1917 |
+
alert("Fonctionnalité d'abonnement ErnestMind Plus (non implémentée)");
|
| 1918 |
+
}
|
| 1919 |
+
|
| 1920 |
+
|
| 1921 |
+
// --- GESTION DES ÉVÉNEMENTS ---
|
| 1922 |
+
|
| 1923 |
+
// Événement de soumission du formulaire
|
| 1924 |
+
typingForm.addEventListener("submit", (e) => {
|
| 1925 |
+
e.preventDefault();
|
| 1926 |
+
|
| 1927 |
+
if (isResponseGenerating) {
|
| 1928 |
+
|
| 1929 |
+
console.log("Arrêt de la génération de réponse demandé...");
|
| 1930 |
+
isStopped = true;
|
| 1931 |
+
|
| 1932 |
+
if (currentAiResponseDiv) {
|
| 1933 |
+
const textContentDiv = currentAiResponseDiv.querySelector('.text-content');
|
| 1934 |
+
if (textContentDiv && textContentDiv.querySelector('.typing-animation')) {
|
| 1935 |
+
textContentDiv.innerHTML = 'Génération arrêtée par l\'utilisateur. Veuillez soumettre une nouvelle requête.';
|
| 1936 |
+
}
|
| 1937 |
+
}
|
| 1938 |
+
|
| 1939 |
+
} else {
|
| 1940 |
+
handleOutgoingChat();
|
| 1941 |
+
}
|
| 1942 |
+
});
|
| 1943 |
+
|
| 1944 |
+
// Auto-redimensionnement du textarea
|
| 1945 |
+
typingInput.addEventListener("input", () => {
|
| 1946 |
+
typingInput.style.height = 'auto';
|
| 1947 |
+
typingInput.style.height = typingInput.scrollHeight + 'px';
|
| 1948 |
+
updateCharCount();
|
| 1949 |
+
updateSendButtonIcon();
|
| 1950 |
+
});
|
| 1951 |
+
|
| 1952 |
+
// Gestion du bouton 'Nouveau Chat'
|
| 1953 |
+
document.querySelector(".new-chat").addEventListener("click", async () => {
|
| 1954 |
+
if (isResponseGenerating) {
|
| 1955 |
+
isStopped = true;
|
| 1956 |
+
}
|
| 1957 |
+
isResponseGenerating = false;
|
| 1958 |
+
sendButton.textContent = "send";
|
| 1959 |
+
|
| 1960 |
+
// MODIFIÉ : Réinitialisation pour le nouveau backend
|
| 1961 |
+
const newConvId = generateUUID();
|
| 1962 |
+
currentConversationId = newConvId;
|
| 1963 |
+
|
| 1964 |
+
// Le changement d'URL ici est correct pour l'initialisation d'un nouveau chat
|
| 1965 |
+
history.pushState(null, '', `${FRONTEND_BASE_PATH}/${currentConversationId}`);
|
| 1966 |
+
|
| 1967 |
+
chatList.innerHTML = '';
|
| 1968 |
+
|
| 1969 |
+
selectedFiles = [];
|
| 1970 |
+
renderFileBadges();
|
| 1971 |
+
typingInput.value = "";
|
| 1972 |
+
typingInput.style.height = 'auto';
|
| 1973 |
+
updateCharCount();
|
| 1974 |
+
|
| 1975 |
+
dockTypingArea(false);
|
| 1976 |
+
|
| 1977 |
+
// MODIFIÉ : On rafraîchit la liste des chats via l'API (pas de liste locale)
|
| 1978 |
+
const recentChats = await fetchAndRenderUserChats();
|
| 1979 |
+
renderRecentChats(recentChats);
|
| 1980 |
+
|
| 1981 |
+
updateSendButtonIcon();
|
| 1982 |
+
});
|
| 1983 |
+
|
| 1984 |
+
|
| 1985 |
+
// Gestion du changement de thème
|
| 1986 |
+
toggleThemeBtn.addEventListener("click", () => {
|
| 1987 |
+
document.body.classList.toggle("light_mode");
|
| 1988 |
+
const isLightmode = document.body.classList.contains("light_mode");
|
| 1989 |
+
localStorage.setItem("themeColor", isLightmode ? "light_mode" : "dark_mode");
|
| 1990 |
+
updateThemeIcon(isLightmode);
|
| 1991 |
+
});
|
| 1992 |
+
|
| 1993 |
+
// Événements des boutons de navigation (non modifiés)
|
| 1994 |
+
loginButton.addEventListener('click', handleLoginNavigation);
|
| 1995 |
+
brandToggleButton.addEventListener('click', handleBrandNavigation);
|
| 1996 |
+
ernestPlusButton.addEventListener('click', handleErnestPlusNavigation);
|
| 1997 |
+
|
| 1998 |
+
// Gestion du clic sur le bouton d'importation de fichiers (+)
|
| 1999 |
+
fileUploadBtn.addEventListener('click', () => {
|
| 2000 |
+
fileInput.click();
|
| 2001 |
+
});
|
| 2002 |
+
|
| 2003 |
+
// Gestion de la sélection de fichiers
|
| 2004 |
+
fileInput.addEventListener('change', (event) => {
|
| 2005 |
+
const files = Array.from(event.target.files);
|
| 2006 |
+
|
| 2007 |
+
selectedFiles = [];
|
| 2008 |
+
fileErrorMessage.style.display = 'none';
|
| 2009 |
+
|
| 2010 |
+
if (files.length > 0) {
|
| 2011 |
+
if (files.length > MAX_FILES) {
|
| 2012 |
+
fileErrorMessage.style.display = 'block';
|
| 2013 |
+
selectedFiles = files.slice(0, MAX_FILES);
|
| 2014 |
+
fileInput.value = '';
|
| 2015 |
+
} else {
|
| 2016 |
+
selectedFiles = files;
|
| 2017 |
+
}
|
| 2018 |
+
|
| 2019 |
+
renderFileBadges();
|
| 2020 |
+
}
|
| 2021 |
+
});
|
| 2022 |
+
|
| 2023 |
+
// NOUVEL ÉVÉNEMENT : Suppression de tout l'historique
|
| 2024 |
+
if (deleteAllHistoryBtn) {
|
| 2025 |
+
deleteAllHistoryBtn.addEventListener('click', deleteAllHistory);
|
| 2026 |
+
}
|
| 2027 |
+
|
| 2028 |
+
|
| 2029 |
+
// --- LOGIQUE DYNAMIQUE DE LA BARRE LATÉRALE ---
|
| 2030 |
+
|
| 2031 |
+
|
| 2032 |
+
// A) Ouvrir la sidebar au survol de la zone de la sidebar
|
| 2033 |
+
sidebar.addEventListener('mouseenter', () => {
|
| 2034 |
+
if (window.innerWidth > 768) {
|
| 2035 |
+
sidebar.classList.add('open');
|
| 2036 |
+
// Afficher les boutons de suppression dans la liste des chats
|
| 2037 |
+
document.querySelectorAll('.delete-chat-btn').forEach(btn => btn.style.opacity = '1');
|
| 2038 |
+
}
|
| 2039 |
+
});
|
| 2040 |
+
|
| 2041 |
+
// B) Fermer la sidebar quand la souris quitte la zone
|
| 2042 |
+
sidebar.addEventListener('mouseleave', () => {
|
| 2043 |
+
if (window.innerWidth > 768) {
|
| 2044 |
+
sidebar.classList.remove('open');
|
| 2045 |
+
// Cacher les boutons de suppression
|
| 2046 |
+
document.querySelectorAll('.delete-chat-btn').forEach(btn => btn.style.opacity = '0');
|
| 2047 |
+
}
|
| 2048 |
+
});
|
| 2049 |
+
|
| 2050 |
+
// C) Bouton Menu pour ouvrir/fermer (pour mobile/accessibilité)
|
| 2051 |
+
sidebarToggleBtn.addEventListener('click', (e) => {
|
| 2052 |
+
e.stopPropagation();
|
| 2053 |
+
sidebar.classList.toggle('open');
|
| 2054 |
+
// Gérer la visibilité des boutons de suppression lors de l'ouverture/fermeture manuelle
|
| 2055 |
+
setTimeout(() => {
|
| 2056 |
+
const is_open = sidebar.classList.contains('open');
|
| 2057 |
+
document.querySelectorAll('.delete-chat-btn').forEach(btn => btn.style.opacity = is_open ? '1' : '0');
|
| 2058 |
+
}, 300); // Délai pour correspondre à la transition CSS
|
| 2059 |
+
|
| 2060 |
+
});
|
| 2061 |
+
|
| 2062 |
+
// D) Fermer la sidebar quand on clique n'importe où ailleurs (pour mobile/touch)
|
| 2063 |
+
document.addEventListener('click', (e) => {
|
| 2064 |
+
if (sidebar.classList.contains('open') && !sidebar.contains(e.target)) {
|
| 2065 |
+
if (window.innerWidth <= 768) {
|
| 2066 |
+
sidebar.classList.remove('open');
|
| 2067 |
+
// Cacher les boutons de suppression
|
| 2068 |
+
document.querySelectorAll('.delete-chat-btn').forEach(btn => btn.style.opacity = '0');
|
| 2069 |
+
}
|
| 2070 |
+
}
|
| 2071 |
+
});
|
| 2072 |
+
|
| 2073 |
+
|
| 2074 |
+
// MODIFIÉ : La fonction d'initialisation devient asynchrone
|
| 2075 |
+
window.onload = loadLocalstorageData;
|
| 2076 |
+
</script>
|
| 2077 |
+
|
| 2078 |
+
|
| 2079 |
+
|
| 2080 |
+
</body>
|
| 2081 |
+
|
| 2082 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/index.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/inscription.html
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Inscription - 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">Créer un compte</h2>
|
| 32 |
+
<p id="message" class="text-center mb-4"></p>
|
| 33 |
+
|
| 34 |
+
<form id="register-form" class="space-y-4">
|
| 35 |
+
|
| 36 |
+
<div>
|
| 37 |
+
<label for="username" class="block text-sm font-medium text-[--text-secondary] mb-1">Nom d'utilisateur</label>
|
| 38 |
+
<input type="text" id="username" name="username" required
|
| 39 |
+
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"
|
| 40 |
+
placeholder="Votre nom d'utilisateur unique">
|
| 41 |
+
</div>
|
| 42 |
+
|
| 43 |
+
<div>
|
| 44 |
+
<label for="email" class="block text-sm font-medium text-[--text-secondary] mb-1">Adresse E-mail</label>
|
| 45 |
+
<input type="email" id="email" name="email" required
|
| 46 |
+
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"
|
| 47 |
+
placeholder="Votre adresse e-mail">
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<div>
|
| 51 |
+
<label for="password" class="block text-sm font-medium text-[--text-secondary] mb-1">Mot de passe</label>
|
| 52 |
+
<div class="relative">
|
| 53 |
+
<input type="password" id="password" name="password" required minlength="8"
|
| 54 |
+
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"
|
| 55 |
+
placeholder="Minimum 8 caractères">
|
| 56 |
+
<button type="button" id="toggle-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">
|
| 57 |
+
<span class="material-symbols-rounded text-xl">visibility</span>
|
| 58 |
+
</button>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
|
| 62 |
+
<div>
|
| 63 |
+
<label for="confirm_password" class="block text-sm font-medium text-[--text-secondary] mb-1">Confirmer le mot de passe</label>
|
| 64 |
+
<div class="relative">
|
| 65 |
+
<input type="password" id="confirm_password" name="confirm_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="Confirmez votre mot de passe">
|
| 68 |
+
<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">
|
| 69 |
+
<span class="material-symbols-rounded text-xl">visibility</span>
|
| 70 |
+
</button>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
|
| 74 |
+
<div>
|
| 75 |
+
<label for="security_question" class="block text-sm font-medium text-[--text-secondary] mb-1">Question de sécurité</label>
|
| 76 |
+
<select id="security_question" name="security_question" required
|
| 77 |
+
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">
|
| 78 |
+
<option value="">Sélectionnez une question...</option>
|
| 79 |
+
<option value="nom_animal">Quel est le nom de votre premier animal de compagnie ?</option>
|
| 80 |
+
<option value="ville_naissance">Quelle est la ville où vous êtes né(e) ?</option>
|
| 81 |
+
<option value="plat_prefere">Quel est votre plat préféré ?</option>
|
| 82 |
+
</select>
|
| 83 |
+
</div>
|
| 84 |
+
|
| 85 |
+
<div>
|
| 86 |
+
<label for="security_answer" class="block text-sm font-medium text-[--text-secondary] mb-1">Réponse de sécurité</label>
|
| 87 |
+
<input type="text" id="security_answer" name="security_answer" required
|
| 88 |
+
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"
|
| 89 |
+
placeholder="Votre réponse (surtout ne la perdez pas)">
|
| 90 |
+
</div>
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
<button type="submit" id="submit-button"
|
| 94 |
+
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">
|
| 95 |
+
S'inscrire
|
| 96 |
+
</button>
|
| 97 |
+
</form>
|
| 98 |
+
|
| 99 |
+
<div class="mt-6 text-center text-sm">
|
| 100 |
+
<p class="text-[--text-secondary]">
|
| 101 |
+
Vous avez déjà un compte ?
|
| 102 |
+
<a href="/mindus/nexus/connexion" class="font-medium text-indigo-600 hover:text-indigo-500">
|
| 103 |
+
Se connecter
|
| 104 |
+
</a>
|
| 105 |
+
</p>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
|
| 110 |
+
<script>
|
| 111 |
+
// L'URL de l'API pointe directement vers l'endpoint local du backend Flask
|
| 112 |
+
const REGISTER_ENDPOINT = "/api/register";
|
| 113 |
+
|
| 114 |
+
const form = document.getElementById('register-form');
|
| 115 |
+
const messageElement = document.getElementById('message');
|
| 116 |
+
const submitButton = document.getElementById('submit-button');
|
| 117 |
+
|
| 118 |
+
// --- LOGIQUE D'AFFICHAGE/MASQUAGE DU MOT DE PASSE (pour les deux champs) ---
|
| 119 |
+
function setupPasswordToggle(inputId, toggleId) {
|
| 120 |
+
const passwordInput = document.getElementById(inputId);
|
| 121 |
+
const toggleButton = document.getElementById(toggleId);
|
| 122 |
+
const icon = toggleButton.querySelector('.material-symbols-rounded');
|
| 123 |
+
|
| 124 |
+
toggleButton.addEventListener('click', () => {
|
| 125 |
+
const isPassword = passwordInput.type === 'password';
|
| 126 |
+
passwordInput.type = isPassword ? 'text' : 'password';
|
| 127 |
+
icon.textContent = isPassword ? 'visibility_off' : 'visibility';
|
| 128 |
+
});
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
setupPasswordToggle('password', 'toggle-password');
|
| 132 |
+
setupPasswordToggle('confirm_password', 'toggle-confirm-password');
|
| 133 |
+
// ---------------------------------------------------
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
form.addEventListener('submit', async (e) => {
|
| 137 |
+
e.preventDefault();
|
| 138 |
+
messageElement.textContent = ''; // Réinitialiser le message
|
| 139 |
+
messageElement.className = 'text-center mb-4'; // Réinitialiser les classes
|
| 140 |
+
submitButton.disabled = true;
|
| 141 |
+
submitButton.textContent = 'Inscription en cours...';
|
| 142 |
+
|
| 143 |
+
// Validation de base des mots de passe côté client (même si le backend le fait aussi)
|
| 144 |
+
const password = document.getElementById('password').value;
|
| 145 |
+
const confirmPassword = document.getElementById('confirm_password').value;
|
| 146 |
+
|
| 147 |
+
if (password !== confirmPassword) {
|
| 148 |
+
messageElement.textContent = 'Le mot de passe et la confirmation ne correspondent pas.';
|
| 149 |
+
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 150 |
+
submitButton.disabled = false;
|
| 151 |
+
submitButton.textContent = "S'inscrire";
|
| 152 |
+
return;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
const formData = new FormData(form);
|
| 157 |
+
const data = Object.fromEntries(formData.entries());
|
| 158 |
+
|
| 159 |
+
try {
|
| 160 |
+
const response = await fetch(REGISTER_ENDPOINT, {
|
| 161 |
+
method: 'POST',
|
| 162 |
+
headers: {
|
| 163 |
+
'Content-Type': 'application/json',
|
| 164 |
+
},
|
| 165 |
+
body: JSON.stringify(data)
|
| 166 |
+
});
|
| 167 |
+
|
| 168 |
+
const result = await response.json();
|
| 169 |
+
|
| 170 |
+
if (response.ok && result.success) {
|
| 171 |
+
messageElement.textContent = result.message || 'Inscription réussie ! Redirection vers la connexion...';
|
| 172 |
+
messageElement.className = 'text-green-600 mb-4 font-bold';
|
| 173 |
+
|
| 174 |
+
// Le backend retourne la redirection (normalement vers la page de connexion)
|
| 175 |
+
const redirectUrl = result.redirect || '/mindus/nexus/connexion';
|
| 176 |
+
|
| 177 |
+
// Redirection
|
| 178 |
+
setTimeout(() => {
|
| 179 |
+
window.location.href = redirectUrl;
|
| 180 |
+
}, 1500);
|
| 181 |
+
|
| 182 |
+
} else {
|
| 183 |
+
// Afficher le message d'erreur du backend
|
| 184 |
+
messageElement.textContent = result.message || 'Échec de l\'inscription. Veuillez vérifier les informations.';
|
| 185 |
+
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
} catch (error) {
|
| 189 |
+
console.error('Erreur lors de la communication avec le backend:', error);
|
| 190 |
+
messageElement.textContent = 'Erreur de connexion au serveur ou réseau indisponible.';
|
| 191 |
+
messageElement.className = 'text-red-600 mb-4 font-bold';
|
| 192 |
+
} finally {
|
| 193 |
+
// Réactiver le bouton si la redirection n'a pas eu lieu
|
| 194 |
+
if (messageElement.className.indexOf('text-green-600') === -1) {
|
| 195 |
+
submitButton.disabled = false;
|
| 196 |
+
submitButton.textContent = "S'inscrire";
|
| 197 |
+
}
|
| 198 |
+
}
|
| 199 |
+
});
|
| 200 |
+
|
| 201 |
+
//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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr" class="bg-gray-100 dark:bg-gray-900">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge - Déploiement de Space</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
|
| 9 |
+
<style>
|
| 10 |
+
/* Styles personnalisés si nécessaire, ou pour les variables de couleur */
|
| 11 |
+
:root {
|
| 12 |
+
--color-var: #1f2937; /* Exemple de couleur primaire sombre */
|
| 13 |
+
--secondary-var: #6b7280; /* Exemple de couleur secondaire */
|
| 14 |
+
--page-var: #ffffff; /* Exemple de couleur de fond de page claire */
|
| 15 |
+
--border-color-var: #e5e7eb; /* Exemple de couleur de bordure claire */
|
| 16 |
+
}
|
| 17 |
+
.dark {
|
| 18 |
+
--color-var: #f3f4f6;
|
| 19 |
+
--secondary-var: #9ca3af;
|
| 20 |
+
--page-var: #1f2937;
|
| 21 |
+
--border-color-var: #374151;
|
| 22 |
+
}
|
| 23 |
+
.text-color-var { color: var(--color-var); }
|
| 24 |
+
.bg-page-var { background-color: var(--page-var); }
|
| 25 |
+
.border-color-var { border-color: var(--border-color-var); }
|
| 26 |
+
.text-secondary-var { color: var(--secondary-var); }
|
| 27 |
+
/* Style pour le lien de navigation actif */
|
| 28 |
+
.repo-nav-link.active {
|
| 29 |
+
color: #3b82f6; /* Bleu par défaut */
|
| 30 |
+
border-bottom: 2px solid #3b82f6;
|
| 31 |
+
padding-bottom: 0.5rem;
|
| 32 |
+
margin-bottom: -1px; /* Compense la bordure */
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/* Style pour l'animation de chargement (Spinner) */
|
| 36 |
+
.spinner {
|
| 37 |
+
border: 4px solid rgba(0, 0, 0, 0.1);
|
| 38 |
+
width: 20px;
|
| 39 |
+
height: 20px;
|
| 40 |
+
border-radius: 50%;
|
| 41 |
+
border-left-color: #3b82f6; /* Couleur bleue */
|
| 42 |
+
animation: spin 1s linear infinite; /* Changé à linear pour un effet plus doux */
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
@keyframes spin {
|
| 46 |
+
0% { transform: rotate(0deg); }
|
| 47 |
+
100% { transform: rotate(360deg); }
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/* Style pour les zones de log (similaire à l'image fournie) */
|
| 51 |
+
.log-area {
|
| 52 |
+
background-color: #1e293b; /* bg-slate-800 pour un look pro/console */
|
| 53 |
+
color: #f8fafc; /* text-slate-50 */
|
| 54 |
+
font-family: 'Consolas', 'Monaco', monospace;
|
| 55 |
+
font-size: 0.875rem; /* text-sm */
|
| 56 |
+
padding: 1rem;
|
| 57 |
+
line-height: 1.5;
|
| 58 |
+
overflow-y: scroll;
|
| 59 |
+
height: 300px;
|
| 60 |
+
border-radius: 0.375rem; /* rounded-md */
|
| 61 |
+
white-space: pre-wrap; /* Maintient les sauts de ligne et permet le wrap */
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/* Assure la réactivité des sections principales */
|
| 65 |
+
.main-container {
|
| 66 |
+
display: flex;
|
| 67 |
+
flex-grow: 1;
|
| 68 |
+
}
|
| 69 |
+
@media (max-width: 1024px) {
|
| 70 |
+
.main-container > aside {
|
| 71 |
+
display: none; /* Cache la barre latérale sur les petits écrans */
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
</style>
|
| 75 |
+
<script>
|
| 76 |
+
// Ceci doit être rendu par votre backend (ex: Flask/Jinja2)
|
| 77 |
+
const CURRENT_USER_ID = "{{ current_user.user_id }}"; // Assurez-vous que cette variable existe
|
| 78 |
+
let CURRENT_REPO_SLUG = "{{ repo_slug | default('') }}"; // Slug du repo sélectionné (peut être vide au début)
|
| 79 |
+
let CURRENT_SPACE_ID = null; // ID du Space après déploiement
|
| 80 |
+
let MONITORING_INTERVAL = null; // Intervalle pour le monitoring
|
| 81 |
+
const MONITORING_RATE = 10000; // 10 secondes
|
| 82 |
+
</script>
|
| 83 |
+
</head>
|
| 84 |
+
<body class="min-h-screen flex flex-col bg-page-var transition-colors-theme">
|
| 85 |
+
|
| 86 |
+
<header class="sticky top-0 z-50 bg-page-var transition-colors-theme">
|
| 87 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme sticky top-0 z-40">
|
| 88 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 89 |
+
<nav class="flex space-x-4 overflow-x-auto text-sm font-medium">
|
| 90 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 91 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 92 |
+
</a>
|
| 93 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 94 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues
|
| 95 |
+
</a>
|
| 96 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 97 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests
|
| 98 |
+
</a>
|
| 99 |
+
<a href="/mindus/nexus/editor?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 100 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 101 |
+
</a>
|
| 102 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 103 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 104 |
+
</a>
|
| 105 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 106 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 107 |
+
</a>
|
| 108 |
+
<a href="/mindus/nexus" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center py-3">
|
| 109 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 110 |
+
</a>
|
| 111 |
+
<a href="#" class="repo-nav-link text-color-var flex items-center py-3 active">
|
| 112 |
+
<span class="material-symbols-rounded text-base mr-1">rocket_launch</span> Déploiement
|
| 113 |
+
</a>
|
| 114 |
+
</nav>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
</header>
|
| 118 |
+
|
| 119 |
+
<main class="main-container max-w-7xl mx-auto w-full px-4 sm:px-6 lg:px-8 py-8">
|
| 120 |
+
|
| 121 |
+
<aside class="w-64 flex-shrink-0 mr-8 hidden lg:block">
|
| 122 |
+
<div class="sticky top-20">
|
| 123 |
+
<h3 class="text-xs font-semibold uppercase tracking-wider text-secondary-var mb-2">DÉPÔTS DE L'UTILISATEUR</h3>
|
| 124 |
+
|
| 125 |
+
<div id="repo-loading-spinner" class="flex items-center justify-center py-4">
|
| 126 |
+
<div class="spinner mr-2"></div>
|
| 127 |
+
<span class="text-sm text-secondary-var">Chargement des dépôts...</span>
|
| 128 |
+
</div>
|
| 129 |
+
|
| 130 |
+
<nav id="repo-list" class="space-y-1" aria-label="Repos">
|
| 131 |
+
</nav>
|
| 132 |
+
|
| 133 |
+
<p id="no-repos-message" class="text-sm text-secondary-var py-4 hidden">
|
| 134 |
+
Aucun dépôt trouvé.
|
| 135 |
+
</p>
|
| 136 |
+
</div>
|
| 137 |
+
</aside>
|
| 138 |
+
|
| 139 |
+
<section class="flex-1 min-w-0">
|
| 140 |
+
<div class="bg-page-var shadow-lg rounded-lg border border-color-var p-6">
|
| 141 |
+
|
| 142 |
+
<div class="flex flex-col md:flex-row items-start md:items-center justify-between border-b border-color-var pb-4 mb-6">
|
| 143 |
+
<h2 class="text-2xl font-bold text-color-var flex flex-col items-start mb-4 md:mb-0">
|
| 144 |
+
<div class="flex items-center">
|
| 145 |
+
<span class="material-symbols-rounded mr-2 text-3xl">rocket_launch</span>
|
| 146 |
+
Orchestration de Space GitForge
|
| 147 |
+
</div>
|
| 148 |
+
<span id="current-repo-display" class="text-base font-normal text-secondary-var mt-1">Sélectionnez un dépôt</span>
|
| 149 |
+
</h2>
|
| 150 |
+
|
| 151 |
+
<div class="flex flex-col sm:flex-row items-start sm:items-center space-y-3 sm:space-y-0 sm:space-x-4">
|
| 152 |
+
<div class="flex items-center space-x-2">
|
| 153 |
+
<label for="sdk-select" class="text-sm text-color-var font-medium">SDK:</label>
|
| 154 |
+
<select id="sdk-select" class="form-select border border-color-var rounded-lg p-2 text-sm text-color-var bg-page-var transition-colors-theme focus:ring-blue-500 focus:border-blue-500">
|
| 155 |
+
<option value="gradio">Gradio</option>
|
| 156 |
+
<option value="streamlit">Streamlit</option>
|
| 157 |
+
<option value="docker">Docker (Web/API)</option>
|
| 158 |
+
<option value="static">Statique (HTML)</option>
|
| 159 |
+
</select>
|
| 160 |
+
</div>
|
| 161 |
+
<button id="deploy-button"
|
| 162 |
+
class="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded-lg shadow transition duration-150 ease-in-out flex items-center disabled:opacity-50 disabled:cursor-not-allowed"
|
| 163 |
+
disabled>
|
| 164 |
+
<span id="deploy-button-text">Create Space</span>
|
| 165 |
+
<div id="deploy-spinner" class="spinner ml-2 hidden"></div>
|
| 166 |
+
</button>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
|
| 170 |
+
<div id="status-container" class="mb-8">
|
| 171 |
+
<h3 class="text-xl font-bold text-color-var mb-3 flex items-center">
|
| 172 |
+
<span class="material-symbols-rounded mr-2" id="status-icon">info</span>
|
| 173 |
+
Statut du Service
|
| 174 |
+
<span id="space-status" class="ml-3 px-3 py-1 text-sm font-semibold rounded-full bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-300">Inactif</span>
|
| 175 |
+
</h3>
|
| 176 |
+
|
| 177 |
+
<div id="space-details" class="space-y-2 text-sm border-l-4 border-gray-300 dark:border-gray-700 pl-4 py-2">
|
| 178 |
+
<p class="text-secondary-var flex items-center">
|
| 179 |
+
ID du Space (HF): <span id="space-id-display" class="font-mono text-color-var ml-2 px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded">N/A</span>
|
| 180 |
+
<button id="copy-id-button" class="ml-2 text-secondary-var hover:text-color-var transition-colors-theme text-base" title="Copier l'ID">
|
| 181 |
+
<span class="material-symbols-rounded text-base">content_copy</span>
|
| 182 |
+
</button>
|
| 183 |
+
</p>
|
| 184 |
+
<p class="text-secondary-var flex items-center">
|
| 185 |
+
URL Publique:
|
| 186 |
+
<a id="space-url-display" href="#" target="_blank" class="text-blue-600 hover:underline disabled:text-secondary-var disabled:pointer-events-none ml-2">N/A</a>
|
| 187 |
+
</p>
|
| 188 |
+
</div>
|
| 189 |
+
</div>
|
| 190 |
+
|
| 191 |
+
<div id="logs-area" class="mt-6">
|
| 192 |
+
<div class="flex justify-between items-center mb-2">
|
| 193 |
+
<h3 class="text-lg font-semibold text-color-var flex items-center">
|
| 194 |
+
<span class="material-symbols-rounded mr-2">terminal</span>
|
| 195 |
+
Historique des Logs
|
| 196 |
+
</h3>
|
| 197 |
+
<div class="flex items-center space-x-3">
|
| 198 |
+
<select id="logs-type-select" class="form-select text-sm border border-color-var rounded-lg p-1 text-color-var bg-page-var transition-colors-theme focus:ring-blue-500 focus:border-blue-500">
|
| 199 |
+
<option value="build">Build Logs</option>
|
| 200 |
+
<option value="runtime">Runtime Logs</option>
|
| 201 |
+
</select>
|
| 202 |
+
<button id="refresh-logs-button" class="text-secondary-var hover:text-color-var transition-colors-theme p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800" title="Rafraîchir les logs">
|
| 203 |
+
<span class="material-symbols-rounded text-base">refresh</span>
|
| 204 |
+
</button>
|
| 205 |
+
<button id="copy-logs-button" class="text-secondary-var hover:text-color-var transition-colors-theme p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800" title="Copier les logs">
|
| 206 |
+
<span class="material-symbols-rounded text-base">content_copy</span>
|
| 207 |
+
</button>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
<pre id="log-content" class="log-area">Sélectionnez un dépôt et lancez un déploiement pour voir les logs ici...</pre>
|
| 211 |
+
</div>
|
| 212 |
+
|
| 213 |
+
<div id="alert-message" class="mt-4 p-3 rounded-lg text-sm hidden" role="alert"></div>
|
| 214 |
+
|
| 215 |
+
</div>
|
| 216 |
+
</section>
|
| 217 |
+
|
| 218 |
+
</main>
|
| 219 |
+
|
| 220 |
+
<script>
|
| 221 |
+
// DOM Elements
|
| 222 |
+
const repoList = document.getElementById('repo-list');
|
| 223 |
+
const repoLoadingSpinner = document.getElementById('repo-loading-spinner');
|
| 224 |
+
const noReposMessage = document.getElementById('no-repos-message');
|
| 225 |
+
const deployButton = document.getElementById('deploy-button');
|
| 226 |
+
const deployButtonText = document.getElementById('deploy-button-text');
|
| 227 |
+
const deploySpinner = document.getElementById('deploy-spinner');
|
| 228 |
+
const sdkSelect = document.getElementById('sdk-select');
|
| 229 |
+
const spaceStatus = document.getElementById('space-status');
|
| 230 |
+
const statusIcon = document.getElementById('status-icon');
|
| 231 |
+
const spaceIdDisplay = document.getElementById('space-id-display');
|
| 232 |
+
const spaceUrlDisplay = document.getElementById('space-url-display');
|
| 233 |
+
const currentRepoDisplay = document.getElementById('current-repo-display');
|
| 234 |
+
const logContent = document.getElementById('log-content');
|
| 235 |
+
const alertMessage = document.getElementById('alert-message');
|
| 236 |
+
const logsTypeSelect = document.getElementById('logs-type-select');
|
| 237 |
+
const refreshLogsButton = document.getElementById('refresh-logs-button');
|
| 238 |
+
const copyLogsButton = document.getElementById('copy-logs-button');
|
| 239 |
+
const copyIdButton = document.getElementById('copy-id-button'); // Nouveau bouton de copie
|
| 240 |
+
|
| 241 |
+
let allUserRepos = []; // Stocke tous les dépôts
|
| 242 |
+
|
| 243 |
+
// --- Fonctions Utilitaires ---
|
| 244 |
+
|
| 245 |
+
function updateRepoSelection(repoSlug) {
|
| 246 |
+
CURRENT_REPO_SLUG = repoSlug;
|
| 247 |
+
currentRepoDisplay.textContent = repoSlug;
|
| 248 |
+
deployButton.disabled = false;
|
| 249 |
+
|
| 250 |
+
// Met à jour la classe active dans la barre latérale
|
| 251 |
+
document.querySelectorAll('.repo-item').forEach(el => {
|
| 252 |
+
el.classList.remove('font-semibold', 'bg-blue-50', 'dark:bg-gray-700');
|
| 253 |
+
el.classList.add('hover:bg-gray-50', 'dark:hover:bg-gray-800');
|
| 254 |
+
if (el.dataset.slug === repoSlug) {
|
| 255 |
+
el.classList.add('font-semibold', 'bg-blue-50', 'dark:bg-gray-700');
|
| 256 |
+
el.classList.remove('hover:bg-gray-50', 'dark:hover:bg-gray-800');
|
| 257 |
+
}
|
| 258 |
+
});
|
| 259 |
+
|
| 260 |
+
// Vérifier si un déploiement est déjà connu pour ce dépôt
|
| 261 |
+
const selectedRepo = allUserRepos.find(r => r.repo_slug === repoSlug);
|
| 262 |
+
const deployId = selectedRepo ? selectedRepo.deploy_id : null;
|
| 263 |
+
|
| 264 |
+
if (deployId && deployId !== "N/A") {
|
| 265 |
+
// Correction : On utilise l'ID de déploiement (deployId) fourni par le backend
|
| 266 |
+
// dans la liste des dépôts, car il doit contenir l'ID complet (owner/repo_name)
|
| 267 |
+
// nécessaire pour l'API Hugging Face.
|
| 268 |
+
CURRENT_SPACE_ID = deployId; // Utiliser directement l'ID complet
|
| 269 |
+
|
| 270 |
+
startMonitoring(CURRENT_SPACE_ID);
|
| 271 |
+
} else {
|
| 272 |
+
// Pas de déploiement existant, réinitialiser
|
| 273 |
+
stopMonitoring();
|
| 274 |
+
updateDeploymentUI('Inactif', 'N/A', '#', 'Prêt à déployer. Veuillez sélectionner le type de SDK et cliquer sur "Créer Space Dynamique".');
|
| 275 |
+
deployButtonText.textContent = 'Créer Space Dynamique';
|
| 276 |
+
deployButton.disabled = false;
|
| 277 |
+
}
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
function showAlert(message, type = 'success') {
|
| 281 |
+
let bgColor, textColor;
|
| 282 |
+
if (type === 'success') {
|
| 283 |
+
bgColor = 'bg-green-100 dark:bg-green-900';
|
| 284 |
+
textColor = 'text-green-800 dark:text-green-200';
|
| 285 |
+
} else if (type === 'error') {
|
| 286 |
+
bgColor = 'bg-red-100 dark:bg-red-900';
|
| 287 |
+
textColor = 'text-red-800 dark:text-red-200';
|
| 288 |
+
} else {
|
| 289 |
+
// 'info' ou 'warning'
|
| 290 |
+
bgColor = 'bg-blue-100 dark:bg-blue-900';
|
| 291 |
+
textColor = 'text-blue-800 dark:text-blue-200';
|
| 292 |
+
}
|
| 293 |
+
alertMessage.className = `mt-4 p-3 rounded-lg text-sm ${bgColor} ${textColor}`;
|
| 294 |
+
alertMessage.textContent = message;
|
| 295 |
+
alertMessage.classList.remove('hidden');
|
| 296 |
+
setTimeout(() => alertMessage.classList.add('hidden'), 7000); // Masquer après 7s
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
function updateDeploymentUI(status, spaceId, spaceUrl, logs) {
|
| 300 |
+
spaceStatus.textContent = status;
|
| 301 |
+
spaceIdDisplay.textContent = spaceId || 'N/A';
|
| 302 |
+
spaceUrlDisplay.textContent = spaceUrl || 'N/A';
|
| 303 |
+
spaceUrlDisplay.href = spaceUrl || '#';
|
| 304 |
+
|
| 305 |
+
if (spaceUrl && spaceUrl !== 'N/A') {
|
| 306 |
+
spaceUrlDisplay.classList.remove('disabled:text-secondary-var', 'disabled:pointer-events-none');
|
| 307 |
+
} else {
|
| 308 |
+
spaceUrlDisplay.classList.add('disabled:text-secondary-var', 'disabled:pointer-events-none');
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
// Mise à jour de l'icône et des couleurs en fonction du statut
|
| 312 |
+
let statusClass = 'bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-300';
|
| 313 |
+
let iconName = 'info';
|
| 314 |
+
|
| 315 |
+
// Les statuts sont ceux renvoyés par Hugging Face
|
| 316 |
+
if (status === 'Building' || status === 'Uploading' || status === 'No stage') {
|
| 317 |
+
statusClass = 'bg-yellow-200 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-200';
|
| 318 |
+
iconName = 'autorenew';
|
| 319 |
+
} else if (status === 'Running') {
|
| 320 |
+
statusClass = 'bg-green-200 text-green-800 dark:bg-green-800 dark:text-green-200';
|
| 321 |
+
iconName = 'check_circle';
|
| 322 |
+
} else if (status === 'Error' || status === 'Killed' || status === 'Failed') {
|
| 323 |
+
statusClass = 'bg-red-200 text-red-800 dark:bg-red-800 dark:text-red-200';
|
| 324 |
+
iconName = 'error';
|
| 325 |
+
stopMonitoring(); // Arrêter le monitoring en cas d'erreur/arrêt
|
| 326 |
+
} else if (status === 'Stopped' || status === 'Sleeping') {
|
| 327 |
+
statusClass = 'bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-300';
|
| 328 |
+
iconName = 'pause_circle';
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
spaceStatus.className = `ml-3 px-3 py-1 text-sm font-semibold rounded-full ${statusClass}`;
|
| 332 |
+
statusIcon.textContent = iconName;
|
| 333 |
+
|
| 334 |
+
if (logs !== null) {
|
| 335 |
+
updateLogsContent(logs);
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
function updateLogsContent(logs) {
|
| 340 |
+
logContent.textContent = logs;
|
| 341 |
+
logContent.scrollTop = logContent.scrollHeight; // Scroll vers le bas
|
| 342 |
+
}
|
| 343 |
+
|
| 344 |
+
function copyToClipboard(text, successMessage) {
|
| 345 |
+
if (text && text !== 'N/A') {
|
| 346 |
+
navigator.clipboard.writeText(text).then(() => {
|
| 347 |
+
showAlert(successMessage, 'info');
|
| 348 |
+
}).catch(err => {
|
| 349 |
+
console.error('Erreur lors de la copie:', err);
|
| 350 |
+
showAlert('Échec de la copie. Assurez-vous d\'avoir les permissions nécessaires.', 'error');
|
| 351 |
+
});
|
| 352 |
+
} else {
|
| 353 |
+
showAlert('Rien à copier.', 'warning');
|
| 354 |
+
}
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
// --- Fonctions API ---
|
| 359 |
+
|
| 360 |
+
async function fetchUserRepos() {
|
| 361 |
+
repoLoadingSpinner.classList.remove('hidden');
|
| 362 |
+
noReposMessage.classList.add('hidden');
|
| 363 |
+
repoList.innerHTML = '';
|
| 364 |
+
|
| 365 |
+
try {
|
| 366 |
+
// Route fournie dans la requête
|
| 367 |
+
const response = await fetch('/api/repos');
|
| 368 |
+
const data = await response.json();
|
| 369 |
+
|
| 370 |
+
if (data.success && data.repos.length > 0) {
|
| 371 |
+
allUserRepos = data.repos;
|
| 372 |
+
data.repos.forEach(repo => {
|
| 373 |
+
const repoItem = document.createElement('a');
|
| 374 |
+
repoItem.href = '#';
|
| 375 |
+
repoItem.dataset.slug = repo.repo_slug;
|
| 376 |
+
// Ajout de classes de couleur pour indiquer l'état de déploiement
|
| 377 |
+
const deployIndicator = repo.deploy_id && repo.deploy_id !== 'N/A' ? 'text-green-500' : 'text-gray-400 dark:text-gray-500';
|
| 378 |
+
|
| 379 |
+
repoItem.className = 'repo-item text-secondary-var hover:text-color-var hover:bg-gray-50 dark:hover:bg-gray-800 group flex items-center px-3 py-2 text-sm font-medium rounded-md transition-colors-theme';
|
| 380 |
+
repoItem.innerHTML = `
|
| 381 |
+
<span class="material-symbols-rounded text-base mr-3 flex-shrink-0 ${deployIndicator}">rocket_launch</span>
|
| 382 |
+
<span class="truncate">${repo.repo_name}</span>
|
| 383 |
+
`;
|
| 384 |
+
repoItem.addEventListener('click', (e) => {
|
| 385 |
+
e.preventDefault();
|
| 386 |
+
updateRepoSelection(repo.repo_slug);
|
| 387 |
+
});
|
| 388 |
+
repoList.appendChild(repoItem);
|
| 389 |
+
});
|
| 390 |
+
|
| 391 |
+
// Sélectionner le premier dépôt par défaut ou le dépôt présélectionné
|
| 392 |
+
const initialRepo = CURRENT_REPO_SLUG || data.repos[0].repo_slug;
|
| 393 |
+
if (initialRepo) {
|
| 394 |
+
updateRepoSelection(initialRepo);
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
} else {
|
| 398 |
+
noReposMessage.classList.remove('hidden');
|
| 399 |
+
}
|
| 400 |
+
} catch (error) {
|
| 401 |
+
console.error('Erreur lors du chargement des dépôts:', error);
|
| 402 |
+
showAlert('Erreur lors du chargement de la liste des dépôts. Vérifiez l\'API /api/repos.', 'error');
|
| 403 |
+
noReposMessage.textContent = 'Erreur de chargement. Vérifiez l\'API.';
|
| 404 |
+
noReposMessage.classList.remove('hidden');
|
| 405 |
+
} finally {
|
| 406 |
+
repoLoadingSpinner.classList.add('hidden');
|
| 407 |
+
}
|
| 408 |
+
}
|
| 409 |
+
// --- Code Corrigé pour le script frontend (deployment_routes.py) ---
|
| 410 |
+
async function handleDeploy() {
|
| 411 |
+
if (!CURRENT_REPO_SLUG) {
|
| 412 |
+
showAlert('Veuillez sélectionner un dépôt à déployer.', 'error');
|
| 413 |
+
return;
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
// Mise à jour de l'interface utilisateur pour le chargement
|
| 417 |
+
deployButton.disabled = true;
|
| 418 |
+
deployButtonText.textContent = 'Déploiement en cours...';
|
| 419 |
+
deploySpinner.classList.remove('hidden');
|
| 420 |
+
|
| 421 |
+
const sdkType = sdkSelect.value;
|
| 422 |
+
const apiUrl = `/api/v1/deployment/${CURRENT_USER_ID}/${CURRENT_REPO_SLUG}/deploy`;
|
| 423 |
+
|
| 424 |
+
try {
|
| 425 |
+
const response = await fetch(apiUrl, {
|
| 426 |
+
method: 'POST',
|
| 427 |
+
headers: { 'Content-Type': 'application/json' },
|
| 428 |
+
body: JSON.stringify({ sdk_type: sdkType })
|
| 429 |
+
});
|
| 430 |
+
|
| 431 |
+
// --- NOUVELLE LOGIQUE AJOUTÉE ICI ---
|
| 432 |
+
if (!response.ok) {
|
| 433 |
+
// Tente de lire le JSON même en cas de statut 4xx/5xx pour récupérer le message d'erreur du backend.
|
| 434 |
+
// Si le corps n'est pas un JSON valide (ex: un 500 généré par le serveur web non géré),
|
| 435 |
+
// le .json() échouera et nous irons dans le bloc catch.
|
| 436 |
+
try {
|
| 437 |
+
const errorData = await response.json();
|
| 438 |
+
showAlert(`Échec du déploiement (HTTP ${response.status}): ${errorData.message || 'Erreur non spécifiée.'}`, 'error');
|
| 439 |
+
return; // Sortir après l'affichage de l'erreur HTTP avec corps JSON
|
| 440 |
+
} catch (jsonError) {
|
| 441 |
+
// Si la lecture du JSON échoue (ex: 500 sans JSON), on lève l'exception pour le bloc catch externe
|
| 442 |
+
throw new Error(`Erreur HTTP ${response.status}: Impossible de lire la réponse d'erreur.`);
|
| 443 |
+
}
|
| 444 |
+
}
|
| 445 |
+
// --- FIN NOUVELLE LOGIQUE ---
|
| 446 |
+
|
| 447 |
+
const data = await response.json();
|
| 448 |
+
|
| 449 |
+
// L'état 409 (Conflict) renvoie success: true dans le backend s'il existe déjà
|
| 450 |
+
if (data.success) {
|
| 451 |
+
showAlert(data.message, 'success');
|
| 452 |
+
CURRENT_SPACE_ID = data.space_id;
|
| 453 |
+
updateDeploymentUI('Creating', data.space_id, data.space_url, 'Déploiement démarré. Attente des logs de construction...');
|
| 454 |
+
startMonitoring(CURRENT_SPACE_ID);
|
| 455 |
+
} else {
|
| 456 |
+
// Ceci gère les erreurs de validation du backend qui renvoient 200/400 avec success: false
|
| 457 |
+
showAlert(`Échec du déploiement: ${data.message}`, 'error');
|
| 458 |
+
}
|
| 459 |
+
} catch (error) {
|
| 460 |
+
console.error('Erreur de déploiement (Catch):', error);
|
| 461 |
+
// Le message d'erreur est plus précis car il ne devrait être atteint qu'en cas de VRAIE erreur réseau ou d'erreur JSON.
|
| 462 |
+
showAlert(`Erreur de connexion lors du déploiement. (Détails: ${error.message || error})`, 'error');
|
| 463 |
+
} finally {
|
| 464 |
+
// Le bouton est réactivé par startMonitoring ou en cas d'erreur
|
| 465 |
+
if (spaceStatus.textContent === 'Inactif' || spaceStatus.textContent === 'Error' || spaceStatus.textContent === 'Stopped' || deployButtonText.textContent.includes('Échoué')) {
|
| 466 |
+
deployButtonText.textContent = 'Créer Space Dynamique';
|
| 467 |
+
deploySpinner.classList.add('hidden');
|
| 468 |
+
deployButton.disabled = false;
|
| 469 |
+
}
|
| 470 |
+
}
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
async function fetchSpaceStatus(spaceId) {
|
| 474 |
+
// Route fournie dans la requête
|
| 475 |
+
const apiUrl = `/api/v1/deployment/${spaceId}/status`;
|
| 476 |
+
|
| 477 |
+
try {
|
| 478 |
+
const response = await fetch(apiUrl);
|
| 479 |
+
const data = await response.json();
|
| 480 |
+
|
| 481 |
+
if (data.success) {
|
| 482 |
+
const status = data.status;
|
| 483 |
+
// L'URL est reconstruite, mais on peut aussi utiliser l'API /url pour plus de précision
|
| 484 |
+
const spaceUrl = `https://${spaceId.replace('/', '-')}.hf.space`;
|
| 485 |
+
updateDeploymentUI(status, spaceId, spaceUrl, null);
|
| 486 |
+
|
| 487 |
+
if (status === 'Running') {
|
| 488 |
+
deployButton.disabled = true;
|
| 489 |
+
deployButtonText.textContent = 'Space en Ligne';
|
| 490 |
+
stopMonitoring();
|
| 491 |
+
showAlert(`Le Space ${spaceId} est maintenant en ligne!`, 'success');
|
| 492 |
+
} else if (status === 'Error' || status === 'Killed' || status === 'Failed') {
|
| 493 |
+
deployButton.disabled = false;
|
| 494 |
+
deployButtonText.textContent = 'Déploiement Échoué (Relancer)';
|
| 495 |
+
} else if (status === 'Building' || status === 'Creating' || status === 'Uploading' || status === 'No stage') {
|
| 496 |
+
deployButton.disabled = true;
|
| 497 |
+
deployButtonText.textContent = 'Construction...';
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
// Récupérer les logs
|
| 501 |
+
await fetchSpaceLogs(spaceId, logsTypeSelect.value);
|
| 502 |
+
|
| 503 |
+
} else {
|
| 504 |
+
if (data.message.includes("Space non trouvé")) {
|
| 505 |
+
stopMonitoring();
|
| 506 |
+
updateDeploymentUI('Inactif', 'N/A', '#', 'Space non trouvé sur Hugging Face. Lancez le déploiement.');
|
| 507 |
+
deployButton.disabled = false;
|
| 508 |
+
deployButtonText.textContent = 'Créer Space Dynamique';
|
| 509 |
+
}
|
| 510 |
+
console.warn(`Échec du statut pour ${spaceId}: ${data.message}`);
|
| 511 |
+
}
|
| 512 |
+
} catch (error) {
|
| 513 |
+
console.error(`Erreur de statut pour ${spaceId}:`, error);
|
| 514 |
+
// Ne pas arrêter le monitoring sur une erreur de connexion temporaire
|
| 515 |
+
}
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
async function fetchSpaceLogs(spaceId, logType = 'build') {
|
| 519 |
+
// Route fournie dans la requête
|
| 520 |
+
const apiUrl = `/api/v1/deployment/${spaceId}/logs?type=${logType}`;
|
| 521 |
+
|
| 522 |
+
try {
|
| 523 |
+
const response = await fetch(apiUrl);
|
| 524 |
+
const data = await response.json();
|
| 525 |
+
|
| 526 |
+
if (data.success) {
|
| 527 |
+
updateLogsContent(data.logs);
|
| 528 |
+
} else {
|
| 529 |
+
updateLogsContent(`Impossible de récupérer les logs de type '${logType}': ${data.message}`);
|
| 530 |
+
console.warn(`Échec des logs pour ${spaceId}: ${data.message}`);
|
| 531 |
+
}
|
| 532 |
+
} catch (error) {
|
| 533 |
+
console.error(`Erreur de logs pour ${spaceId}:`, error);
|
| 534 |
+
updateLogsContent(`Erreur de connexion lors de la récupération des logs.`);
|
| 535 |
+
}
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
function startMonitoring(spaceId) {
|
| 539 |
+
stopMonitoring(); // Assurer qu'il n'y a qu'un seul intervalle
|
| 540 |
+
|
| 541 |
+
// Première vérification immédiate
|
| 542 |
+
fetchSpaceStatus(spaceId);
|
| 543 |
+
|
| 544 |
+
// Ensuite, vérifier toutes les MONITORING_RATE millisecondes
|
| 545 |
+
MONITORING_INTERVAL = setInterval(() => {
|
| 546 |
+
fetchSpaceStatus(spaceId);
|
| 547 |
+
}, MONITORING_RATE);
|
| 548 |
+
|
| 549 |
+
// Afficher le message de monitoring
|
| 550 |
+
showAlert(`Démarrage de la surveillance pour ${spaceId}. Vérification toutes les ${MONITORING_RATE/1000}s.`, 'info');
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
function stopMonitoring() {
|
| 554 |
+
if (MONITORING_INTERVAL) {
|
| 555 |
+
clearInterval(MONITORING_INTERVAL);
|
| 556 |
+
MONITORING_INTERVAL = null;
|
| 557 |
+
console.log("Monitoring arrêté.");
|
| 558 |
+
}
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
// --- Événements ---
|
| 562 |
+
|
| 563 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 564 |
+
fetchUserRepos();
|
| 565 |
+
});
|
| 566 |
+
|
| 567 |
+
deployButton.addEventListener('click', handleDeploy);
|
| 568 |
+
|
| 569 |
+
// Changement de type de logs
|
| 570 |
+
logsTypeSelect.addEventListener('change', () => {
|
| 571 |
+
if (CURRENT_SPACE_ID) {
|
| 572 |
+
fetchSpaceLogs(CURRENT_SPACE_ID, logsTypeSelect.value);
|
| 573 |
+
} else {
|
| 574 |
+
updateLogsContent(`Veuillez d'abord déployer un Space.`);
|
| 575 |
+
}
|
| 576 |
+
});
|
| 577 |
+
|
| 578 |
+
// Rafraîchissement manuel des logs
|
| 579 |
+
refreshLogsButton.addEventListener('click', () => {
|
| 580 |
+
if (CURRENT_SPACE_ID) {
|
| 581 |
+
fetchSpaceLogs(CURRENT_SPACE_ID, logsTypeSelect.value);
|
| 582 |
+
showAlert(`Logs de type '${logsTypeSelect.value}' rafraîchis.`, 'info');
|
| 583 |
+
} else {
|
| 584 |
+
showAlert('Aucun Space n\'est en cours de surveillance.', 'warning');
|
| 585 |
+
}
|
| 586 |
+
});
|
| 587 |
+
|
| 588 |
+
// Copie des logs
|
| 589 |
+
copyLogsButton.addEventListener('click', () => {
|
| 590 |
+
copyToClipboard(logContent.textContent, 'Logs copiés dans le presse-papiers!');
|
| 591 |
+
});
|
| 592 |
+
|
| 593 |
+
// Copie de l'ID du Space
|
| 594 |
+
copyIdButton.addEventListener('click', () => {
|
| 595 |
+
copyToClipboard(spaceIdDisplay.textContent, `ID du Space '${spaceIdDisplay.textContent}' copié!`);
|
| 596 |
+
});
|
| 597 |
+
|
| 598 |
+
</script>
|
| 599 |
+
</body>
|
| 600 |
+
</html>
|
a6ea61c8-951a-413a-ba9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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title data-translate="page-title">Legal Notice - GitForge</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" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
+
<style>
|
| 12 |
+
/* Styles personnalisés similaires à tarifs.html */
|
| 13 |
+
.bg-header { background-color: #f7f9fc; }
|
| 14 |
+
.header-border { border-color: #f7f9fc; }
|
| 15 |
+
.text-blue-600-var { color: #2563eb; }
|
| 16 |
+
.border-blue-600-var { border-color: #f7f9fc; }
|
| 17 |
+
.text-gray-900-var { color: #1f2937; }
|
| 18 |
+
.text-gray-600-var { color: #4b5563; }
|
| 19 |
+
.text-color { color: #1f2937; } /* Couleur par défaut pour le texte */
|
| 20 |
+
.hover\:text-blue-500-var:hover { color: #3b82f6; } /* Similaire à blue-500 de Tailwind */
|
| 21 |
+
|
| 22 |
+
/* Styles pour la navigation rapide (Table des Matières) */
|
| 23 |
+
.sticky-toc {
|
| 24 |
+
position: sticky;
|
| 25 |
+
top: 1rem;
|
| 26 |
+
max-height: calc(100vh - 2rem);
|
| 27 |
+
overflow-y: auto;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
/* Style de base pour les listes de contenu H3 */
|
| 31 |
+
.content-list {
|
| 32 |
+
list-style: none;
|
| 33 |
+
padding-left: 0;
|
| 34 |
+
margin-top: 1rem;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.content-list li {
|
| 38 |
+
margin-bottom: 0.5rem;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.content-list strong {
|
| 42 |
+
display: block;
|
| 43 |
+
margin-bottom: 0.25rem;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
/* Style pour l'image de fond */
|
| 47 |
+
.article-background {
|
| 48 |
+
background-image: url('https://i.postimg.cc/L8RyJVpW/Gemini-Generated-Image-5uqe9w5uqe9w5uqe.jpg');
|
| 49 |
+
background-size: cover;
|
| 50 |
+
background-position: center;
|
| 51 |
+
background-attachment: fixed; /* L'image ne défile pas avec le contenu */
|
| 52 |
+
padding: 2rem; /* Espace autour du contenu */
|
| 53 |
+
border-radius: 0.5rem;
|
| 54 |
+
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
/* Pour assurer une bonne lisibilité du texte sur l'image de fond */
|
| 58 |
+
.content-overlay {
|
| 59 |
+
background-color: rgba(255, 255, 255, 0.9); /* Fond blanc semi-transparent */
|
| 60 |
+
padding: 2rem;
|
| 61 |
+
border-radius: 0.5rem;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.prose h1, .prose h2, .prose h3 {
|
| 65 |
+
color: #2563eb; /* Rendre les titres bleus plus lisibles */
|
| 66 |
+
}
|
| 67 |
+
</style>
|
| 68 |
+
</head>
|
| 69 |
+
<body class="bg-white text-gray-900-var">
|
| 70 |
+
<header class="bg-header border-b header-border sticky top-0 z-50">
|
| 71 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 72 |
+
<div class="flex justify-between items-center h-16">
|
| 73 |
+
<a href="#" class="flex items-center space-x-2">
|
| 74 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="GitForge Logo" class="h-8 w-auto">
|
| 75 |
+
<span class="text-xl font-bold text-gray-900-var">GitForge</span>
|
| 76 |
+
</a>
|
| 77 |
+
|
| 78 |
+
<nav class="hidden sm:flex space-x-6 items-center">
|
| 79 |
+
<a data-translate="nav-product" href="#" class="nav-link text-color hover:text-blue-500-var transition duration-200 hidden lg:block">Product</a>
|
| 80 |
+
<a data-translate="nav-pricing" href="/mindus/nexus/tarifs" class="nav-link text-color hover:text-blue-500-var transition duration-200">Pricing</a>
|
| 81 |
+
<a data-translate="nav-resources" href="#" class="nav-link text-color hover:text-blue-500-var transition duration-200 hidden md:block">Resources</a>
|
| 82 |
+
<a data-translate="nav-company" href="/mindus/nexus/contact" class="nav-link text-color hover:text-blue-500-var transition duration-200 hidden lg:block">Company</a>
|
| 83 |
+
<a data-translate="nav-contact" href="/mindus/nexus/contact" class="nav-link text-color hover:text-blue-500-var transition duration-200 hidden xl:block">Contact us</a>
|
| 84 |
+
|
| 85 |
+
<a data-translate="nav-signin" href="/mindus/nexus/connexion" class="text-color hover:text-blue-500-var transition duration-200">Sign in</a>
|
| 86 |
+
|
| 87 |
+
</nav>
|
| 88 |
+
|
| 89 |
+
<div class="relative ml-4">
|
| 90 |
+
<button id="lang-menu-button" class="flex items-center p-2 rounded-lg hover:bg-gray-100 transition duration-200">
|
| 91 |
+
<i class="fas fa-globe mr-2"></i>
|
| 92 |
+
<span id="current-lang-display" class="font-medium text-color">EN</span>
|
| 93 |
+
<i class="fas fa-chevron-down ml-2 text-xs"></i>
|
| 94 |
+
</button>
|
| 95 |
+
<div id="lang-menu-dropdown" class="absolute right-0 mt-2 w-32 bg-white rounded-lg shadow-xl z-50 hidden border border-gray-200">
|
| 96 |
+
<a href="#" data-lang="en" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="en">English</a>
|
| 97 |
+
<a href="#" data-lang="fr" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="fr">Français</a>
|
| 98 |
+
<a href="#" data-lang="es" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="es">Español</a>
|
| 99 |
+
<a href="#" data-lang="zh-CN" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="zh-CN">Chinese (Simplified)</a>
|
| 100 |
+
<a href="#" data-lang="ja" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="ja">Japanese</a>
|
| 101 |
+
<a href="#" data-lang="de" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="de">German</a>
|
| 102 |
+
<a href="#" data-lang="pt-BR" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="pt-BR">Portuguese (BR)</a>
|
| 103 |
+
<a href="#" data-lang="ru" class="lang-option block px-4 py-2 text-gray-700 hover:bg-gray-100" data-translate-lang-name="ru">Russian</a>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
|
| 107 |
+
<button class="sm:hidden text-gray-900-var focus:outline-none">
|
| 108 |
+
<i class="fas fa-bars h-6 w-6"></i>
|
| 109 |
+
</button>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
</header>
|
| 113 |
+
|
| 114 |
+
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
| 115 |
+
<div class="flex flex-col lg:flex-row lg:space-x-10">
|
| 116 |
+
<aside class="w-full lg:w-1/4 mb-10 lg:mb-0">
|
| 117 |
+
<div class="sticky-toc p-4 border rounded-lg bg-white shadow-sm">
|
| 118 |
+
<h2 class="text-xl font-bold mb-4 text-blue-600-var" data-translate="toc-title">Table of Contents</h2>
|
| 119 |
+
<nav id="toc-nav" class="space-y-2 text-sm">
|
| 120 |
+
</nav>
|
| 121 |
+
</div>
|
| 122 |
+
</aside>
|
| 123 |
+
|
| 124 |
+
<article id="content-container" class="w-full lg:w-3/4 prose max-w-none article-background">
|
| 125 |
+
<div class="content-overlay">
|
| 126 |
+
<h1 class="text-4xl font-extrabold mb-4 text-gray-900-var" data-translate="article-main-title">GitForge Legal Notice</h1>
|
| 127 |
+
<p class="text-sm text-gray-600-var mb-8" data-translate="effective-date-text">Last updated: November 28, 2025</p>
|
| 128 |
+
|
| 129 |
+
<h2 id="informations-legales-editeur" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-a-title">Legal Information and Publisher</h2>
|
| 130 |
+
<ul class="content-list text-gray-600-var space-y-3">
|
| 131 |
+
<li><strong data-translate="section-a-list-1-title">Site Publisher and Owner</strong> <span data-translate="section-a-list-1-desc">Parisien Ernest</span></li>
|
| 132 |
+
<li><strong data-translate="section-a-list-2-title">Headquarters Address (France)</strong> <span data-translate="section-a-list-2-desc">15 Rue de la Paix, 75002 Paris, France</span></li>
|
| 133 |
+
<li><strong data-translate="section-a-list-3-title">Email Address</strong> <span data-translate="section-a-list-3-desc">parisien.data@gmail.com</span></li>
|
| 134 |
+
<li><strong data-translate="section-a-list-4-title">Phone Number</strong> <span data-translate="section-a-list-4-desc">+50935794028</span></li>
|
| 135 |
+
<li><strong data-translate="section-a-list-5-title">Legal Form (Placeholder)</strong> <span data-translate="section-a-list-5-desc">SAS with a capital of €50,000 (Registration in progress)</span></li>
|
| 136 |
+
</ul>
|
| 137 |
+
|
| 138 |
+
<h2 id="hebergement-du-site" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-b-title">Website Hosting</h2>
|
| 139 |
+
<p class="text-gray-600-var mb-4" data-translate="section-b-desc-1">The GitForge platform is hosted by:</p>
|
| 140 |
+
<ul class="content-list text-gray-600-var space-y-3">
|
| 141 |
+
<li><strong data-translate="section-b-list-1-title">Host Name</strong> <span data-translate="section-b-list-1-desc">Render.com</span></li>
|
| 142 |
+
<li><strong data-translate="section-b-list-2-title">Host Contact</strong> <span data-translate="section-b-list-2-desc">Please refer to the host's official website for contact information.</span></li>
|
| 143 |
+
</ul>
|
| 144 |
+
|
| 145 |
+
<h2 id="propriete-intellectuelle" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-c-title">Intellectual Property</h2>
|
| 146 |
+
<p class="text-gray-600-var mb-4" data-translate="section-c-desc-1">All elements accessible on the GitForge platform (texts, images, graphics, logo, code, etc.) are the exclusive property of the publisher, Parisien Ernest, or are legitimately used under license.</p>
|
| 147 |
+
<p class="text-gray-600-var mb-4" data-translate="section-c-desc-2">Any reproduction, representation, modification, publication, or adaptation of all or part of the site elements, regardless of the means or process used, is strictly prohibited without the prior written authorization of the publisher.</p>
|
| 148 |
+
|
| 149 |
+
<h2 id="responsabilites" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-d-title">Responsibilities</h2>
|
| 150 |
+
<p class="text-gray-600-var mb-4" data-translate="section-d-desc-1">The publisher is only responsible for the content he has directly created. The publisher shall not be held liable for direct or indirect damage caused to the user's equipment when accessing the GitForge site, resulting either from the use of equipment that does not meet the specifications indicated in the point above, or from the appearance of a bug or incompatibility.</p>
|
| 151 |
+
<p class="text-gray-600-var mb-4" data-translate="section-d-desc-2">Interactive spaces (possibility to ask questions in the contact area) are available to users. The publisher reserves the right to delete, without prior notice, any content posted in this space that would violate the applicable law in France, particularly the provisions relating to data protection.</p>
|
| 152 |
+
|
| 153 |
+
<h2 id="conditions-generales-d-utilisation" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-e-title">General Terms of Use (GTU)</h2>
|
| 154 |
+
<p class="text-gray-600-var mb-4" data-translate="section-e-desc-1">The use of the GitForge platform implies the full acceptance of the General Terms of Use (GTU) described separately. These terms are intended to define the rules of use of the platform and the contractual obligations between the user and the publisher. Users are invited to consult them regularly.</p>
|
| 155 |
+
|
| 156 |
+
<h2 id="droit-applicable-et-attribution-de-juridiction" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-f-title">Applicable Law and Jurisdiction</h2>
|
| 157 |
+
<p class="text-gray-600-var mb-4" data-translate="section-f-desc-1">Any dispute in connection with the use of the GitForge site is subject to French law. Exclusive jurisdiction is given to the competent courts of Paris, France.</p>
|
| 158 |
+
<p class="text-gray-600-var mb-4" data-translate="section-f-desc-2">In the event of a dispute, the user should first contact the publisher to seek an amicable solution.</p>
|
| 159 |
+
|
| 160 |
+
<h2 id="gestion-des-donnees-personnelles-et-cookies" class="text-3xl font-bold mt-10 mb-4 text-gray-900-var" data-translate="section-g-title">Personal Data Management and Cookies</h2>
|
| 161 |
+
<p class="text-gray-600-var mb-4" data-translate="section-g-desc-1">As required by the French Data Protection Act (Loi Informatique et Libertés) and the GDPR, GitForge commits to protecting personal data. Information regarding the collection, processing, and use of personal data is detailed in our dedicated Privacy Policy (which remains accessible via the footer).</p>
|
| 162 |
+
<p class="text-gray-600-var mb-4" data-translate="section-g-desc-2">The management of cookies and other tracking technologies is also covered in the aforementioned policy. Users have the right to access, rectify, or erase their personal data by contacting the publisher via the email address provided.</p>
|
| 163 |
+
</div>
|
| 164 |
+
</article>
|
| 165 |
+
</div>
|
| 166 |
+
</main>
|
| 167 |
+
|
| 168 |
+
<footer class="bg-header border-t header-border mt-12">
|
| 169 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 text-sm text-gray-600-var">
|
| 170 |
+
<div class="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
|
| 171 |
+
<p>© <span id="current-year">2025</span> GitForge. All rights reserved.</p>
|
| 172 |
+
<div class="space-x-4">
|
| 173 |
+
<a href="#" class="hover:text-blue-600-var" data-translate="footer-privacy">Privacy</a>
|
| 174 |
+
<a href="#" class="hover:text-blue-600-var" data-translate="footer-terms">Terms</a>
|
| 175 |
+
<a href="#" class="hover:text-blue-600-var" data-translate="footer-support">Support</a>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
</footer>
|
| 180 |
+
|
| 181 |
+
<script>
|
| 182 |
+
const translations = {
|
| 183 |
+
// General
|
| 184 |
+
'page-title': {
|
| 185 |
+
en: 'Legal Notice - GitForge',
|
| 186 |
+
fr: 'Mentions Légales - GitForge',
|
| 187 |
+
es: 'Aviso Legal - GitForge',
|
| 188 |
+
'zh-CN': '法律声明 - GitForge',
|
| 189 |
+
ja: '法的通知 - GitForge',
|
| 190 |
+
de: 'Impressum - GitForge',
|
| 191 |
+
'pt-BR': 'Aviso Legal - GitForge',
|
| 192 |
+
ru: 'Правовая информация - GitForge'
|
| 193 |
+
},
|
| 194 |
+
'article-main-title': {
|
| 195 |
+
en: 'GitForge Legal Notice',
|
| 196 |
+
fr: 'Mentions Légales GitForge',
|
| 197 |
+
es: 'Aviso Legal de GitForge',
|
| 198 |
+
'zh-CN': 'GitForge法律声明',
|
| 199 |
+
ja: 'GitForge 法的通知',
|
| 200 |
+
de: 'GitForge Impressum',
|
| 201 |
+
'pt-BR': 'Aviso Legal do GitForge',
|
| 202 |
+
ru: 'Правовая информация GitForge'
|
| 203 |
+
},
|
| 204 |
+
'effective-date-text': {
|
| 205 |
+
en: 'Last updated: November 28, 2025',
|
| 206 |
+
fr: 'Dernière mise à jour : 28 novembre 2025',
|
| 207 |
+
es: 'Última actualización: 28 de noviembre de 2025',
|
| 208 |
+
'zh-CN': '最后更新: 2025年11月28日',
|
| 209 |
+
ja: '最終更新日: 2025年11月28日',
|
| 210 |
+
de: 'Zuletzt aktualisiert: 28. November 2025',
|
| 211 |
+
'pt-BR': 'Última atualização: 28 de novembro de 2025',
|
| 212 |
+
ru: 'Последнее обновление: 28 ноября 2025 г.'
|
| 213 |
+
},
|
| 214 |
+
'toc-title': {
|
| 215 |
+
en: 'Table of Contents',
|
| 216 |
+
fr: 'Table des Matières',
|
| 217 |
+
es: 'Tabla de Contenidos',
|
| 218 |
+
'zh-CN': '目录',
|
| 219 |
+
ja: '目次',
|
| 220 |
+
de: 'Inhaltsverzeichnis',
|
| 221 |
+
'pt-BR': 'Índice',
|
| 222 |
+
ru: 'Содержание'
|
| 223 |
+
},
|
| 224 |
+
'nav-product': {
|
| 225 |
+
en: 'Product',
|
| 226 |
+
fr: 'Produit',
|
| 227 |
+
es: 'Producto',
|
| 228 |
+
'zh-CN': '产品',
|
| 229 |
+
ja: '製品',
|
| 230 |
+
de: 'Produkt',
|
| 231 |
+
'pt-BR': 'Produto',
|
| 232 |
+
ru: 'Продукт'
|
| 233 |
+
},
|
| 234 |
+
'nav-pricing': {
|
| 235 |
+
en: 'Pricing',
|
| 236 |
+
fr: 'Tarifs',
|
| 237 |
+
es: 'Precios',
|
| 238 |
+
'zh-CN': '定价',
|
| 239 |
+
ja: '価格',
|
| 240 |
+
de: 'Preise',
|
| 241 |
+
'pt-BR': 'Preços',
|
| 242 |
+
ru: 'Цены'
|
| 243 |
+
},
|
| 244 |
+
'nav-resources': {
|
| 245 |
+
en: 'Resources',
|
| 246 |
+
fr: 'Ressources',
|
| 247 |
+
es: 'Recursos',
|
| 248 |
+
'zh-CN': '资源',
|
| 249 |
+
ja: 'リソース',
|
| 250 |
+
de: 'Ressourcen',
|
| 251 |
+
'pt-BR': 'Recursos',
|
| 252 |
+
ru: 'Ресурсы'
|
| 253 |
+
},
|
| 254 |
+
'nav-company': {
|
| 255 |
+
en: 'Company',
|
| 256 |
+
fr: 'Entreprise',
|
| 257 |
+
es: 'Compañía',
|
| 258 |
+
'zh-CN': '公司',
|
| 259 |
+
ja: '会社',
|
| 260 |
+
de: 'Unternehmen',
|
| 261 |
+
'pt-BR': 'Empresa',
|
| 262 |
+
ru: 'Компания'
|
| 263 |
+
},
|
| 264 |
+
'nav-contact': {
|
| 265 |
+
en: 'Contact us',
|
| 266 |
+
fr: 'Nous contacter',
|
| 267 |
+
es: 'Contáctanos',
|
| 268 |
+
'zh-CN': '联系我们',
|
| 269 |
+
ja: 'お問い合わせ',
|
| 270 |
+
de: 'Kontaktieren Sie uns',
|
| 271 |
+
'pt-BR': 'Fale conosco',
|
| 272 |
+
ru: 'Связаться с нами'
|
| 273 |
+
},
|
| 274 |
+
'nav-signin': {
|
| 275 |
+
en: 'Sign in',
|
| 276 |
+
fr: 'Connexion',
|
| 277 |
+
es: 'Iniciar sesión',
|
| 278 |
+
'zh-CN': '登录',
|
| 279 |
+
ja: 'サインイン',
|
| 280 |
+
de: 'Anmelden',
|
| 281 |
+
'pt-BR': 'Entrar',
|
| 282 |
+
ru: 'Войти'
|
| 283 |
+
},
|
| 284 |
+
'translate-lang-name-en': { en: 'English', fr: 'Anglais', es: 'Inglés', 'zh-CN': '英语', ja: '英語', de: 'Englisch', 'pt-BR': 'Inglês', ru: 'Английский' },
|
| 285 |
+
'translate-lang-name-fr': { en: 'French', fr: 'Français', es: 'Francés', 'zh-CN': '法语', ja: 'フランス語', de: 'Französisch', 'pt-BR': 'Francês', ru: 'Французский' },
|
| 286 |
+
'translate-lang-name-es': { en: 'Spanish', fr: 'Espagnol', es: 'Español', 'zh-CN': '西班牙语', ja: 'スペイン語', de: 'Spanisch', 'pt-BR': 'Espanhol', ru: 'Испанский' },
|
| 287 |
+
'translate-lang-name-zh-CN': { en: 'Chinese (Simplified)', fr: 'Chinois (Simplifié)', es: 'Chino (Simplificado)', 'zh-CN': '中文(简体)', ja: '中国語(簡体字)', de: 'Chinesisch (Vereinfacht)', 'pt-BR': 'Chinês (Simplificado)', ru: 'Китайский (Упр.)' },
|
| 288 |
+
'translate-lang-name-ja': { en: 'Japanese', fr: 'Japonais', es: 'Japonés', 'zh-CN': '日语', ja: '日本語', de: 'Japanisch', 'pt-BR': 'Japonês', ru: 'Японский' },
|
| 289 |
+
'translate-lang-name-de': { en: 'German', fr: 'Allemand', es: 'Alemán', 'zh-CN': '德语', ja: 'ドイツ語', de: 'Deutsch', 'pt-BR': 'Alemão', ru: 'Немецкий' },
|
| 290 |
+
'translate-lang-name-pt-BR': { en: 'Portuguese (BR)', fr: 'Portugais (Brésilien)', es: 'Portugués (Brasil)', 'zh-CN': '葡萄牙语(巴西)', ja: 'ポルトガル語(ブラジル)', de: 'Portugiesisch (BR)', 'pt-BR': 'Português (BR)', ru: 'Португальский (Бразилия)' },
|
| 291 |
+
'translate-lang-name-ru': { en: 'Russian', fr: 'Russe', es: 'Ruso', 'zh-CN': '俄��', ja: 'ロシア語', de: 'Russisch', 'pt-BR': 'Russo', ru: 'Русский' },
|
| 292 |
+
'footer-privacy': {
|
| 293 |
+
en: 'Privacy',
|
| 294 |
+
fr: 'Confidentialité',
|
| 295 |
+
es: 'Privacidad',
|
| 296 |
+
'zh-CN': '隐私',
|
| 297 |
+
ja: 'プライバシー',
|
| 298 |
+
de: 'Datenschutz',
|
| 299 |
+
'pt-BR': 'Privacidade',
|
| 300 |
+
ru: 'Конфиденциальность'
|
| 301 |
+
},
|
| 302 |
+
'footer-terms': {
|
| 303 |
+
en: 'Terms',
|
| 304 |
+
fr: 'Conditions',
|
| 305 |
+
es: 'Términos',
|
| 306 |
+
'zh-CN': '条款',
|
| 307 |
+
ja: '利用規約',
|
| 308 |
+
de: 'Bedingungen',
|
| 309 |
+
'pt-BR': 'Termos',
|
| 310 |
+
ru: 'Условия'
|
| 311 |
+
},
|
| 312 |
+
'footer-support': {
|
| 313 |
+
en: 'Support',
|
| 314 |
+
fr: 'Support',
|
| 315 |
+
es: 'Soporte',
|
| 316 |
+
'zh-CN': '支持',
|
| 317 |
+
ja: 'サポート',
|
| 318 |
+
de: 'Support',
|
| 319 |
+
'pt-BR': 'Suporte',
|
| 320 |
+
ru: 'Поддержка'
|
| 321 |
+
},
|
| 322 |
+
|
| 323 |
+
// Article Content (Mentions Légales)
|
| 324 |
+
'section-a-title': {
|
| 325 |
+
en: 'Legal Information and Publisher',
|
| 326 |
+
fr: 'Informations Légales et Éditeur',
|
| 327 |
+
es: 'Información Legal y Editor',
|
| 328 |
+
'zh-CN': '法律信息和发布者',
|
| 329 |
+
ja: '法的情報と発行元',
|
| 330 |
+
de: 'Rechtliche Informationen und Herausgeber',
|
| 331 |
+
'pt-BR': 'Informações Legais e Editor',
|
| 332 |
+
ru: 'Правовая информация и издатель'
|
| 333 |
+
},
|
| 334 |
+
'section-a-list-1-title': {
|
| 335 |
+
en: 'Site Publisher and Owner',
|
| 336 |
+
fr: 'Éditeur et Propriétaire du Site',
|
| 337 |
+
es: 'Editor y Propietario del Sitio',
|
| 338 |
+
'zh-CN': '网站发布者和所有者',
|
| 339 |
+
ja: 'サイト発行元と所有者',
|
| 340 |
+
de: 'Herausgeber und Inhaber der Website',
|
| 341 |
+
'pt-BR': 'Editor e Proprietário do Site',
|
| 342 |
+
ru: 'Издатель и владелец сайта'
|
| 343 |
+
},
|
| 344 |
+
'section-a-list-1-desc': {
|
| 345 |
+
en: 'Parisien Ernest',
|
| 346 |
+
fr: 'Parisien Ernest',
|
| 347 |
+
es: 'Parisien Ernest',
|
| 348 |
+
'zh-CN': 'Parisien Ernest',
|
| 349 |
+
ja: 'Parisien Ernest',
|
| 350 |
+
de: 'Parisien Ernest',
|
| 351 |
+
'pt-BR': 'Parisien Ernest',
|
| 352 |
+
ru: 'Parisien Ernest'
|
| 353 |
+
},
|
| 354 |
+
'section-a-list-2-title': {
|
| 355 |
+
en: 'Headquarters Address (France)',
|
| 356 |
+
fr: 'Adresse du Siège Social (France)',
|
| 357 |
+
es: 'Dirección de la Sede (Francia)',
|
| 358 |
+
'zh-CN': '总部地址(法国)',
|
| 359 |
+
ja: '本社住所(フランス)',
|
| 360 |
+
de: 'Hauptsitzadresse (Frankreich)',
|
| 361 |
+
'pt-BR': 'Endereço da Sede (França)',
|
| 362 |
+
ru: 'Адрес штаб-квартиры (Франция)'
|
| 363 |
+
},
|
| 364 |
+
'section-a-list-2-desc': {
|
| 365 |
+
en: '15 Rue de la Paix, 75002 Paris, France',
|
| 366 |
+
fr: '15 Rue de la Paix, 75002 Paris, France',
|
| 367 |
+
es: '15 Rue de la Paix, 75002 París, Francia',
|
| 368 |
+
'zh-CN': '15 Rue de la Paix, 75002 Paris, France',
|
| 369 |
+
ja: '15 Rue de la Paix, 75002 Paris, France',
|
| 370 |
+
de: '15 Rue de la Paix, 75002 Paris, Frankreich',
|
| 371 |
+
'pt-BR': '15 Rue de la Paix, 75002 Paris, França',
|
| 372 |
+
ru: '15 Rue de la Paix, 75002 Paris, France'
|
| 373 |
+
},
|
| 374 |
+
'section-a-list-3-title': {
|
| 375 |
+
en: 'Email Address',
|
| 376 |
+
fr: 'Adresse Email',
|
| 377 |
+
es: 'Dirección de Correo Electrónico',
|
| 378 |
+
'zh-CN': '电子邮件地址',
|
| 379 |
+
ja: 'メールアドレス',
|
| 380 |
+
de: 'E-Mail-Adresse',
|
| 381 |
+
'pt-BR': 'Endereço de Email',
|
| 382 |
+
ru: 'Адрес электронной почты'
|
| 383 |
+
},
|
| 384 |
+
'section-a-list-3-desc': {
|
| 385 |
+
en: 'parisien.data@gmail.com',
|
| 386 |
+
fr: 'parisien.data@gmail.com',
|
| 387 |
+
es: 'parisien.data@gmail.com',
|
| 388 |
+
'zh-CN': 'parisien.data@gmail.com',
|
| 389 |
+
ja: 'parisien.data@gmail.com',
|
| 390 |
+
de: 'parisien.data@gmail.com',
|
| 391 |
+
'pt-BR': 'parisien.data@gmail.com',
|
| 392 |
+
ru: 'parisien.data@gmail.com'
|
| 393 |
+
},
|
| 394 |
+
'section-a-list-4-title': {
|
| 395 |
+
en: 'Phone Number',
|
| 396 |
+
fr: 'Numéro de Téléphone',
|
| 397 |
+
es: 'Número de Teléfono',
|
| 398 |
+
'zh-CN': '电话号码',
|
| 399 |
+
ja: '電話番号',
|
| 400 |
+
de: 'Telefonnummer',
|
| 401 |
+
'pt-BR': 'Número de Telefone',
|
| 402 |
+
ru: 'Номер телефона'
|
| 403 |
+
},
|
| 404 |
+
'section-a-list-4-desc': {
|
| 405 |
+
en: '+50935794028',
|
| 406 |
+
fr: '+50935794028',
|
| 407 |
+
es: '+50935794028',
|
| 408 |
+
'zh-CN': '+50935794028',
|
| 409 |
+
ja: '+50935794028',
|
| 410 |
+
de: '+50935794028',
|
| 411 |
+
'pt-BR': '+50935794028',
|
| 412 |
+
ru: '+50935794028'
|
| 413 |
+
},
|
| 414 |
+
'section-a-list-5-title': {
|
| 415 |
+
en: 'Legal Form (Placeholder)',
|
| 416 |
+
fr: 'Forme Juridique (à titre indicatif)',
|
| 417 |
+
es: 'Forma Legal (indicativo)',
|
| 418 |
+
'zh-CN': '法律形式(占位符)',
|
| 419 |
+
ja: '法形式(プレースホルダー)',
|
| 420 |
+
de: 'Rechtsform (Platzhalter)',
|
| 421 |
+
'pt-BR': 'Forma Jurídica (Placeholder)',
|
| 422 |
+
ru: 'Организационно-правовая форма (заполнитель)'
|
| 423 |
+
},
|
| 424 |
+
'section-a-list-5-desc': {
|
| 425 |
+
en: 'SAS with a capital of €50,000 (Registration in progress)',
|
| 426 |
+
fr: 'SAS au capital de 50 000€ (Immatriculation en cours)',
|
| 427 |
+
es: 'SAS con un capital de 50.000€ (Registro en curso)',
|
| 428 |
+
'zh-CN': 'SAS 资本 50,000 欧元(正在注册中)',
|
| 429 |
+
ja: '資本金 €50,000 の SAS (登録進行中)',
|
| 430 |
+
de: 'SAS mit einem Kapital von 50.000 € (Registrierung läuft)',
|
| 431 |
+
'pt-BR': 'SAS com capital de €50.000 (Registro em andamento)',
|
| 432 |
+
ru: 'SAS с капиталом 50 000 евро (Регистрация в процессе)'
|
| 433 |
+
},
|
| 434 |
+
|
| 435 |
+
'section-b-title': {
|
| 436 |
+
en: 'Website Hosting',
|
| 437 |
+
fr: 'Hébergement du Site',
|
| 438 |
+
es: 'Alojamiento Web',
|
| 439 |
+
'zh-CN': '网站托管',
|
| 440 |
+
ja: 'ウェブサイトホスティング',
|
| 441 |
+
de: 'Website-Hosting',
|
| 442 |
+
'pt-BR': 'Hospedagem do Site',
|
| 443 |
+
ru: 'Хостинг сайта'
|
| 444 |
+
},
|
| 445 |
+
'section-b-desc-1': {
|
| 446 |
+
en: 'The GitForge platform is hosted by:',
|
| 447 |
+
fr: 'La plateforme GitForge est hébergée par :',
|
| 448 |
+
es: 'La plataforma GitForge está alojada por:',
|
| 449 |
+
'zh-CN': 'GitForge 平台由以下机构托管:',
|
| 450 |
+
ja: 'GitForge プラットフォームは以下によってホストされています:',
|
| 451 |
+
de: 'Die GitForge-Plattform wird gehostet von:',
|
| 452 |
+
'pt-BR': 'A plataforma GitForge é hospedada por:',
|
| 453 |
+
ru: 'Платформа GitForge размещена на:'
|
| 454 |
+
},
|
| 455 |
+
'section-b-list-1-title': {
|
| 456 |
+
en: 'Host Name',
|
| 457 |
+
fr: 'Nom de l\'Hébergeur',
|
| 458 |
+
es: 'Nombre del Anfitrión',
|
| 459 |
+
'zh-CN': '主机名',
|
| 460 |
+
ja: 'ホスト名',
|
| 461 |
+
de: 'Host-Name',
|
| 462 |
+
'pt-BR': 'Nome do Host',
|
| 463 |
+
ru: 'Имя хоста'
|
| 464 |
+
},
|
| 465 |
+
'section-b-list-1-desc': {
|
| 466 |
+
en: 'Render.com',
|
| 467 |
+
fr: 'Render.com',
|
| 468 |
+
es: 'Render.com',
|
| 469 |
+
'zh-CN': 'Render.com',
|
| 470 |
+
ja: 'Render.com',
|
| 471 |
+
de: 'Render.com',
|
| 472 |
+
'pt-BR': 'Render.com',
|
| 473 |
+
ru: 'Render.com'
|
| 474 |
+
},
|
| 475 |
+
'section-b-list-2-title': {
|
| 476 |
+
en: 'Host Contact',
|
| 477 |
+
fr: 'Contact de l\'Hébergeur',
|
| 478 |
+
es: 'Contacto del Anfitrión',
|
| 479 |
+
'zh-CN': '主机联系方式',
|
| 480 |
+
ja: 'ホスト連絡先',
|
| 481 |
+
de: 'Host-Kontakt',
|
| 482 |
+
'pt-BR': 'Contato do Host',
|
| 483 |
+
ru: 'Контакт хоста'
|
| 484 |
+
},
|
| 485 |
+
'section-b-list-2-desc': {
|
| 486 |
+
en: 'Please refer to the host\'s official website for contact information.',
|
| 487 |
+
fr: 'Veuillez vous référer au site officiel de l\'hébergeur pour les informations de contact.',
|
| 488 |
+
es: 'Consulte el sitio web oficial del anfitrión para obtener información de contacto.',
|
| 489 |
+
'zh-CN': '请参考主机的官方网站获取联系信息。',
|
| 490 |
+
ja: '連絡先については、ホストの公式ウェブサイトを参照してください。',
|
| 491 |
+
de: 'Bitte beachten Sie die offizielle Website des Host-Anbieters für Kontaktinformationen.',
|
| 492 |
+
'pt-BR': 'Por favor, consulte o site oficial do host para informações de contato.',
|
| 493 |
+
ru: 'Пожалуйста, обратитесь к официальному веб-сайту хоста для получения контактной информации.'
|
| 494 |
+
},
|
| 495 |
+
|
| 496 |
+
'section-c-title': {
|
| 497 |
+
en: 'Intellectual Property',
|
| 498 |
+
fr: 'Propriété Intellectuelle',
|
| 499 |
+
es: 'Propiedad Intelectual',
|
| 500 |
+
'zh-CN': '知识产权',
|
| 501 |
+
ja: '知的財産',
|
| 502 |
+
de: 'Geistiges Eigentum',
|
| 503 |
+
'pt-BR': 'Propriedade Intelectual',
|
| 504 |
+
ru: 'Интеллектуальная собственность'
|
| 505 |
+
},
|
| 506 |
+
'section-c-desc-1': {
|
| 507 |
+
en: 'All elements accessible on the GitForge platform (texts, images, graphics, logo, code, etc.) are the exclusive property of the publisher, Parisien Ernest, or are legitimately used under license.',
|
| 508 |
+
fr: 'Tous les éléments accessibles sur la plateforme GitForge (textes, images, graphismes, logo, code, etc.) sont la propriété exclusive de l’éditeur, Parisien Ernest, ou sont légitimement utilisés sous licence.',
|
| 509 |
+
es: 'Todos los elementos accesibles en la plataforma GitForge (textos, imágenes, gráficos, logotipo, código, etc.) son propiedad exclusiva del editor, Parisien Ernest, o son utilizados legítimamente bajo licencia.',
|
| 510 |
+
'zh-CN': 'GitForge 平台上可访问的所有元素(文本、图像、图形、徽标、代码等)均为发布者 Parisien Ernest 的独家财产,或根据许可合法使用。',
|
| 511 |
+
ja: 'GitForge プラットフォーム上でアクセス可能なすべての要素(テキスト、画像、グラフィック、ロゴ、コードなど)は、発行元である Parisien Ernest の独占的な財産であるか、またはライセンスに基づいて合法的に使用されています。',
|
| 512 |
+
de: 'Alle auf der GitForge-Plattform zugänglichen Elemente (Texte, Bilder, Grafiken, Logo, Code usw.) sind das ausschließliche Eigentum des Herausgebers, Parisien Ernest, oder werden rechtmäßig unter Lizenz genutzt.',
|
| 513 |
+
'pt-BR': 'Todos os elementos acessíveis na plataforma GitForge (textos, imagens, gráficos, logotipos, código, etc.) são propriedade exclusiva do editor, Parisien Ernest, ou são legitimamente utilizados sob licença.',
|
| 514 |
+
ru: 'Все элементы, доступные на платформе GitForge (тексты, изображения, графика, логотип, код и т. д.), являются исключительной собственностью издателя, Parisien Ernest, или правомерно используются по лицензии.'
|
| 515 |
+
},
|
| 516 |
+
'section-c-desc-2': {
|
| 517 |
+
en: 'Any reproduction, representation, modification, publication, or adaptation of all or part of the site elements, regardless of the means or process used, is strictly prohibited without the prior written authorization of the publisher.',
|
| 518 |
+
fr: 'Toute reproduction, représentation, modification, publication, ou adaptation de tout ou partie des éléments du site, quel que soit le moyen ou le procédé utilisé, est strictement interdite sans l’autorisation écrite préalable de l’éditeur.',
|
| 519 |
+
es: 'Cualquier reproducción, representación, modificación, publicación o adaptación de la totalidad o parte de los elementos del sitio, independientemente del medio o proceso utilizado, está estrictamente prohibida sin la autorización previa por escrito del editor.',
|
| 520 |
+
'zh-CN': '未经发布者事先书面授权,严禁以任何方式或过程对网站元素的全部或部分进行任何复制、表示、修改、发布或改编。',
|
| 521 |
+
ja: '使用される手段やプロセスに関係なく、サイト要素の全部または一部の複製、表現、変更、公開、または翻案は、発行元の事前の書面による許可なしに厳禁されています。',
|
| 522 |
+
de: 'Jede Vervielfältigung, Darstellung, Änderung, Veröffentlichung oder Anpassung aller oder eines Teils der Website-Elemente, unabhängig von den verwendeten Mitteln oder Verfahren, ist ohne die vorherige schriftliche Genehmigung des Herausgebers strengstens untersagt.',
|
| 523 |
+
'pt-BR': 'Qualquer reprodução, representação, modificação, publicação ou adaptação de todo ou parte dos elementos do site, independentemente do meio ou processo utilizado, é estritamente proibida sem a autorização prévia por escrito do editor.',
|
| 524 |
+
ru: 'Любое воспроизведение, представление, изменение, публикация или адаптация всех или части элементов сайта, независимо от используемых средств или процесса, строго запрещены без предварительного письменного разрешения издателя.'
|
| 525 |
+
},
|
| 526 |
+
|
| 527 |
+
'section-d-title': {
|
| 528 |
+
en: 'Responsibilities',
|
| 529 |
+
fr: 'Responsabilités',
|
| 530 |
+
es: 'Responsabilidades',
|
| 531 |
+
'zh-CN': '责任',
|
| 532 |
+
ja: '責任',
|
| 533 |
+
de: 'Verantwortlichkeiten',
|
| 534 |
+
'pt-BR': 'Responsabilidades',
|
| 535 |
+
ru: 'Ответственность'
|
| 536 |
+
},
|
| 537 |
+
'section-d-desc-1': {
|
| 538 |
+
en: 'The publisher is only responsible for the content he has directly created. The publisher shall not be held liable for direct or indirect damage caused to the user\'s equipment when accessing the GitForge site, resulting either from the use of equipment that does not meet the specifications indicated in the point above, or from the appearance of a bug or incompatibility.',
|
| 539 |
+
fr: 'L’éditeur n’est responsable que du contenu qu’il a directement créé. L’éditeur ne pourra être tenu responsable des dommages directs et indirects causés au matériel de l’utilisateur lors de l’accès au site GitForge, résultant soit de l’utilisation d’un matériel ne répondant pas aux spécifications indiquées au point ci-dessus, soit de l’apparition d’un bug ou d’une incompatibilité.',
|
| 540 |
+
es: 'El editor solo es responsable del contenido que ha creado directamente. El editor no será responsable de los daños directos o indirectos causados al equipo del usuario al acceder al sitio de GitForge, resultantes del uso de equipos que no cumplen con las especificaciones, o de la aparición de un error o incompatibilidad.',
|
| 541 |
+
'zh-CN': '发布者仅对其直接创建的内容负责。发布者对用户在访问 GitForge 网站时给用户设备造成的直接或间接损害不承担责任,这些损害是由于使用了不符合上述规格的设备,或由于出现错误或不兼容性造成的。',
|
| 542 |
+
ja: '発行元は、自身が直接作成したコンテンツについてのみ責任を負います。発行元は、GitForgeサイトにアクセスする際にユーザーの機器に生じた直接的または間接的な損害について責任を負いません。これは、上記で示された仕様を満たさない機器の使用、またはバグや非互換性の発生によるものです。',
|
| 543 |
+
de: 'Der Herausgeber ist nur für die von ihm direkt erstellten Inhalte verantwortlich. Der Herausgeber haftet nicht für direkte oder indirekte Schäden am Gerät des Benutzers beim Zugriff auf die GitForge-Website, die entweder aus der Verwendung von Geräten resultieren, die nicht den oben angegebenen Spezifikationen entsprechen, oder aus dem Auftreten eines Fehlers oder einer Inkompatibilität.',
|
| 544 |
+
'pt-BR': 'O editor é responsável apenas pelo conteúdo que ele criou diretamente. O editor não será responsabilizado por danos diretos ou indiretos causados ao equipamento do usuário ao acessar o site GitForge, resultantes do uso de equipamento que não atende às especificações indicadas no ponto acima, ou do surgimento de um bug ou incompatibilidade.',
|
| 545 |
+
ru: 'Издатель несет ответственность только за контент, который он создал непосредственно. Издатель не несет ответственности за прямой или косвенный ущерб, причиненный оборудованию пользователя при доступе к сайту GitForge, возникший в результате использования оборудования, не соответствующего указанным выше спецификациям, или из-за появления ошибки или несовместимости.'
|
| 546 |
+
},
|
| 547 |
+
'section-d-desc-2': {
|
| 548 |
+
en: 'Interactive spaces (possibility to ask questions in the contact area) are available to users. The publisher reserves the right to delete, without prior notice, any content posted in this space that would violate the applicable law in France, particularly the provisions relating to data protection.',
|
| 549 |
+
fr: 'Des espaces interactifs (possibilité de poser des questions dans l’espace contact) sont à la disposition des utilisateurs. L’éditeur se réserve le droit de supprimer, sans mise en demeure préalable, tout contenu déposé dans cet espace qui contreviendrait à la législation applicable en France, en particulier aux dispositions relatives à la protection des données.',
|
| 550 |
+
es: 'Los espacios interactivos (posibilidad de hacer preguntas en el área de contacto) están disponibles para los usuarios. El editor se reserva el derecho de eliminar, sin previo aviso, cualquier contenido publicado en este espacio que contravenga la legislación aplicable en Francia, en particular las disposiciones relativas a la protección de datos.',
|
| 551 |
+
'zh-CN': '互动空间(在联系区域提问的可能性)可供用户使用。发布者保留在不事先通知的情况下删除在此空间发布的任何违反法国适用法律(特别是与数据保护相关的规定)的内容的权利。',
|
| 552 |
+
ja: 'インタラクティブなスペース(連絡先エリアで質問をする可能性)がユーザーに提供されています。発行元は���フランスで適用される法律、特にデータ保護に関する規定に違反するこのスペースに投稿されたコンテンツを、事前の通知なしに削除する権利を留保します。',
|
| 553 |
+
de: 'Interaktive Bereiche (Möglichkeit, Fragen im Kontaktbereich zu stellen) stehen den Benutzern zur Verfügung. Der Herausgeber behält sich das Recht vor, ohne vorherige Ankündigung alle in diesem Bereich veröffentlichten Inhalte zu löschen, die gegen das in Frankreich geltende Recht verstoßen würden, insbesondere die Bestimmungen zum Datenschutz.',
|
| 554 |
+
'pt-BR': 'Espaços interativos (possibilidade de fazer perguntas na área de contato) estão disponíveis para os usuários. O editor se reserva o direito de excluir, sem aviso prévio, qualquer conteúdo postado neste espaço que viole a lei aplicável na França, em particular as disposições relativas à proteção de dados.',
|
| 555 |
+
ru: 'Интерактивные пространства (возможность задавать вопросы в зоне контактов) доступны пользователям. Издатель оставляет за собой право удалять без предварительного уведомления любой контент, размещенный в этом пространстве, который нарушает применимое законодательство Франции, в частности положения, касающиеся защиты данных.'
|
| 556 |
+
},
|
| 557 |
+
|
| 558 |
+
'section-e-title': {
|
| 559 |
+
en: 'General Terms of Use (GTU)',
|
| 560 |
+
fr: 'Conditions Générales d\'Utilisation (CGU)',
|
| 561 |
+
es: 'Condiciones Generales de Uso (CGU)',
|
| 562 |
+
'zh-CN': '一般使用条款 (GTU)',
|
| 563 |
+
ja: '一般利用規約 (GTU)',
|
| 564 |
+
de: 'Allgemeine Nutzungsbedingungen (ANB)',
|
| 565 |
+
'pt-BR': 'Termos Gerais de Uso (TGU)',
|
| 566 |
+
ru: 'Общие условия использования (ОУИ)'
|
| 567 |
+
},
|
| 568 |
+
'section-e-desc-1': {
|
| 569 |
+
en: 'The use of the GitForge platform implies the full acceptance of the General Terms of Use (GTU) described separately. These terms are intended to define the rules of use of the platform and the contractual obligations between the user and the publisher. Users are invited to consult them regularly.',
|
| 570 |
+
fr: 'L’utilisation de la plateforme GitForge implique l’acceptation pleine et entière des Conditions Générales d’Utilisation (CGU) décrites séparément. Ces conditions visent à définir les règles d’utilisation de la plateforme et les obligations contractuelles entre l’utilisateur et l’éditeur. Les utilisateurs sont invités à les consulter régulièrement.',
|
| 571 |
+
es: 'El uso de la plataforma GitForge implica la plena aceptación de las Condiciones Generales de Uso (CGU) descritas por separado. Estos términos tienen como objetivo definir las reglas de uso de la plataforma y las obligaciones contractuales entre el usuario y el editor. Se invita a los usuarios a consultarlas regularmente.',
|
| 572 |
+
'zh-CN': '使用 GitForge 平台即表示完全接受单独描述的一般使用条款 (GTU)。这些条款旨在界定平台的使用规则以及用户与发布者之间的合同义务。鼓励用户定期查阅这些条款。',
|
| 573 |
+
ja: 'GitForge プラットフォームの使用は、別途記述されている一般利用規約(GTU)の完全な受諾を意味します。これらの規約は、プラットフォームの使用規則と、ユーザーと発行元の間の契約上の義務を定義することを目的としています。ユーザーは定期的にこれらを参照することが推奨されます。',
|
| 574 |
+
de: 'Die Nutzung der GitForge-Plattform impliziert die vollständige Akzeptanz der separat beschriebenen Allgemeinen Nutzungsbedingungen (ANB). Diese Bedingungen sollen die Nutzungsregeln der Plattform und die vertraglichen Verpflichtungen zwischen dem Benutzer und dem Herausgeber definieren. Die Benutzer werden aufgefordert, diese regelmäßig zu konsultieren.',
|
| 575 |
+
'pt-BR': 'O uso da plataforma GitForge implica a aceitação total dos Termos Gerais de Uso (TGU) descritos separadamente. Estes termos visam definir as regras de uso da plataforma e as obrigações contratuais entre o usuário e o editor. Os usuários são convidados a consultá-los regularmente.',
|
| 576 |
+
ru: 'Использование платформы GitForge подразумевает полное принятие Общих условий использования (ОУИ), описанных отдельно. Эти условия предназначены для определения правил использования платформы и договорных обязательств между пользователем и издателем. Пользователям рекомендуется регулярно с ними ознакомляться.'
|
| 577 |
+
},
|
| 578 |
+
|
| 579 |
+
'section-f-title': {
|
| 580 |
+
en: 'Applicable Law and Jurisdiction',
|
| 581 |
+
fr: 'Droit Applicable et Attribution de Juridiction',
|
| 582 |
+
es: 'Ley Aplicable y Jurisdicción',
|
| 583 |
+
'zh-CN': '适用法律和管辖权',
|
| 584 |
+
ja: '準拠法および管轄',
|
| 585 |
+
de: 'Anwendbares Recht und Gerichtsstand',
|
| 586 |
+
'pt-BR': 'Lei Aplicável e Jurisdição',
|
| 587 |
+
ru: 'Применимое право и юрисдикция'
|
| 588 |
+
},
|
| 589 |
+
'section-f-desc-1': {
|
| 590 |
+
en: 'Any dispute in connection with the use of the GitForge site is subject to French law. Exclusive jurisdiction is given to the competent courts of Paris, France.',
|
| 591 |
+
fr: 'Tout litige en relation avec l’utilisation du site GitForge est soumis au droit français. Il est fait attribution exclusive de juridiction aux tribunaux compétents de Paris, France.',
|
| 592 |
+
es: 'Cualquier disputa en relación con el uso del sitio de GitForge está sujeta a la ley francesa. La jurisdicción exclusiva se otorga a los tribunales competentes de París, Francia.',
|
| 593 |
+
'zh-CN': '任何与使用 GitForge 网站有关的争议均受法国法律管辖。专属管辖权赋予法国巴黎的具有管辖权的法院。',
|
| 594 |
+
ja: 'GitForge サイトの使用に関する紛争はすべてフランス法に準拠します。専属管轄権は、フランス、パリの管轄裁判所に与えられます。',
|
| 595 |
+
de: 'Jede Streitigkeit im Zusammenhang mit der Nutzung der GitForge-Website unterliegt französischem Recht. Die ausschließliche Zuständigkeit liegt bei den zuständigen Gerichten von Paris, Frankreich.',
|
| 596 |
+
'pt-BR': 'Qualquer disputa relacionada ao uso do site GitForge está sujeita à lei francesa. A jurisdição exclusiva é dada aos tribunais competentes de Paris, França.',
|
| 597 |
+
ru: 'Любой спор, связанный с использованием сайта GitForge, регулируется французским законодательством. Исключительная юрисдикция принадлежит компетентным судам Парижа, Франция.'
|
| 598 |
+
},
|
| 599 |
+
'section-f-desc-2': {
|
| 600 |
+
en: 'In the event of a dispute, the user should first contact the publisher to seek an amicable solution.',
|
| 601 |
+
fr: 'En cas de litige, l’utilisateur doit contacter en premier lieu l’éditeur pour tenter de trouver une solution amiable.',
|
| 602 |
+
es: 'En caso de disputa, el usuario debe contactar primero al editor para buscar una solución amistosa.',
|
| 603 |
+
'zh-CN': '如发生争议,用户应首先联系发布者寻求友好解决方案。',
|
| 604 |
+
ja: '紛争が発生した場合、ユーザーはまず発行元に連絡を取り、友好的な解決策を試みる必要があります。',
|
| 605 |
+
de: 'Im Falle einer Streitigkeit sollte der Benutzer zunächst den Herausgeber kontaktieren, um eine gütliche Lösung zu suchen.',
|
| 606 |
+
'pt-BR': 'Em caso de disputa, o usuário deve primeiro entrar em contato com o editor para buscar uma solução amigável.',
|
| 607 |
+
ru: 'В случае спора пользователь должен сначала связаться с издателем, чтобы попытаться найти мирное решение.'
|
| 608 |
+
},
|
| 609 |
+
|
| 610 |
+
'section-g-title': {
|
| 611 |
+
en: 'Personal Data Management and Cookies',
|
| 612 |
+
fr: 'Gestion des Données Personnelles et Cookies',
|
| 613 |
+
es: 'Gestión de Datos Personales y Cookies',
|
| 614 |
+
'zh-CN': '个人数据管理和 Cookie',
|
| 615 |
+
ja: '個人データ管理とクッキー',
|
| 616 |
+
de: 'Verwaltung personenbezogener Daten und Cookies',
|
| 617 |
+
'pt-BR': 'Gerenciamento de Dados Pessoais e Cookies',
|
| 618 |
+
ru: 'Управление персональными данными и файлы cookie'
|
| 619 |
+
},
|
| 620 |
+
'section-g-desc-1': {
|
| 621 |
+
en: 'As required by the French Data Protection Act (Loi Informatique et Libertés) and the GDPR, GitForge commits to protecting personal data. Information regarding the collection, processing, and use of personal data is detailed in our dedicated Privacy Policy (which remains accessible via the footer).',
|
| 622 |
+
fr: 'Conformément à la Loi Informatique et Libertés française et au RGPD, GitForge s’engage à protéger les données personnelles. Les informations relatives à la collecte, au traitement et à l\'utilisation des données personnelles sont détaillées dans notre Politique de Confidentialité dédiée (qui reste accessible via le pied de page).',
|
| 623 |
+
es: 'Según lo exige la Ley de Protección de Datos francesa (Loi Informatique et Libertés) y el GDPR, GitForge se compromete a proteger los datos personales. La información sobre la recopilación, el procesamiento y el uso de datos personales se detalla en nuestra Política de Privacidad dedicada (que sigue siendo accesible a través del pie de página).',
|
| 624 |
+
'zh-CN': '根据法国数据保护法(Loi Informatique et Libertés)和 GDPR 的要求,GitForge 承诺保护个人数据。有关个人数据的收集、处理和使用的信息详见我们专门的隐私政策(可通过页脚访问)。',
|
| 625 |
+
ja: 'フランスのデータ保護法(Loi Informatique et Libertés)および GDPR の要求に従い、GitForge は個人データの保護に努めます。個人データの収集、処理、および使用に関する情報は、専用のプライバシーポリシー(フッターからアクセス可能)に詳述されています。',
|
| 626 |
+
de: 'Wie es das französische Datenschutzgesetz (Loi Informatique et Libertés) und die DSGVO verlangen, verpflichtet sich GitForge zum Schutz personenbezogener Daten. Informationen zur Erfassung, Verarbeitung und Nutzung personenbezogener Daten sind in unserer dedizierten Datenschutzrichtlinie (die über die Fußzeile zugänglich bleibt) detailliert aufgeführt.',
|
| 627 |
+
'pt-BR': 'Conforme exigido pela Lei Francesa de Proteção de Dados (Loi Informatique et Libertés) e pelo GDPR, o GitForge se compromete a proteger os dados pessoais. As informações sobre a coleta, processamento e uso de dados pessoais são detalhadas em nossa Política de Privacidade dedicada (que permanece acessível através do rodapé).',
|
| 628 |
+
ru: 'В соответствии с французским Законом о защите данных (Loi Informatique et Libertés) и GDPR, GitForge обязуется защищать персональные данные. Информация о сборе, обработке и использовании персональных данных подробно изложена в нашей специальной Политике конфиденциальности (которая остается доступной через нижний колонтитул).'
|
| 629 |
+
},
|
| 630 |
+
'section-g-desc-2': {
|
| 631 |
+
en: 'The management of cookies and other tracking technologies is also covered in the aforementioned policy. Users have the right to access, rectify, or erase their personal data by contacting the publisher via the email address provided.',
|
| 632 |
+
fr: 'La gestion des cookies et autres technologies de suivi est également couverte dans la politique susmentionnée. Les utilisateurs disposent d’un droit d’accès, de rectification ou de suppression des données personnelles les concernant en contactant l’éditeur via l’adresse email fournie.',
|
| 633 |
+
es: 'La gestión de cookies y otras tecnologías de seguimiento también está cubierta en la política mencionada. Los usuarios tienen derecho a acceder, rectificar o eliminar sus datos personales contactando al editor a través de la dirección de correo electrónico proporcionada.',
|
| 634 |
+
'zh-CN': 'Cookie 和其他跟踪技术的管理也包含在上述政策中。用户有权通过提供的电子邮件地址联系发布者,以访问、纠正或删除其个人数据。',
|
| 635 |
+
ja: 'クッキーおよびその他のトラッキング技術の管理も、前述のポリシーでカバーされています。ユーザーは、提供されたメールアドレスを通じて発行元に連絡することにより、自身の個人データへのアクセス、訂正、または削除の権利を有します。',
|
| 636 |
+
de: 'Die Verwaltung von Cookies und anderen Tracking-Technologien wird ebenfalls in der oben genannten Richtlinie behandelt. Benutzer haben das Recht auf Zugang, Berichtigung oder Löschung ihrer personenbezogenen Daten, indem sie den Herausgeber über die angegebene E-Mail-Adresse kontaktieren.',
|
| 637 |
+
'pt-BR': 'O gerenciamento de cookies e outras tecnologias de rastreamento também é abordado na política mencionada. Os usuários têm o direito de acessar, retificar ou apagar seus dados pessoais entrando em contato com o editor através do endereço de e-mail fornecido.',
|
| 638 |
+
ru: 'Управление файлами cookie и другими технологиями отслеживания также охвачено вышеупомянутой политикой. Пользователи имеют право на доступ, исправление или удаление своих персональных данных, связавшись с издателем по предоставленному адресу электронной почты.'
|
| 639 |
+
},
|
| 640 |
+
};
|
| 641 |
+
|
| 642 |
+
// Langage par défaut
|
| 643 |
+
let currentLang = 'en';
|
| 644 |
+
|
| 645 |
+
function applyTranslations(lang) {
|
| 646 |
+
currentLang = lang;
|
| 647 |
+
document.querySelectorAll('[data-translate]').forEach(element => {
|
| 648 |
+
const key = element.getAttribute('data-translate');
|
| 649 |
+
if (translations[key] && translations[key][lang]) {
|
| 650 |
+
element.textContent = translations[key][lang];
|
| 651 |
+
}
|
| 652 |
+
});
|
| 653 |
+
|
| 654 |
+
// Gérer les titres et descriptions composés (Summary Box)
|
| 655 |
+
document.querySelectorAll('[data-translate-lang-name]').forEach(element => {
|
| 656 |
+
const key = 'translate-lang-name-' + element.getAttribute('data-lang');
|
| 657 |
+
// S'assurer que la clé de traduction existe pour cette langue
|
| 658 |
+
const translationKey = element.getAttribute('data-lang');
|
| 659 |
+
if (translations[key] && translations[key][lang]) {
|
| 660 |
+
element.textContent = translations[key][lang];
|
| 661 |
+
} else if (translations[key] && translations[key]['en']) {
|
| 662 |
+
// Fallback en anglais si la traduction n'existe pas pour la langue cible
|
| 663 |
+
element.textContent = translations[key]['en'];
|
| 664 |
+
}
|
| 665 |
+
});
|
| 666 |
+
|
| 667 |
+
// Mettre à jour l'affichage de la langue actuelle
|
| 668 |
+
document.getElementById('current-lang-display').textContent = lang.toUpperCase();
|
| 669 |
+
|
| 670 |
+
// Générer la Table des Matières pour la nouvelle langue
|
| 671 |
+
generateTOC(lang);
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
function generateTOC(lang) {
|
| 675 |
+
const contentContainer = document.getElementById('content-container');
|
| 676 |
+
const tocNav = document.getElementById('toc-nav');
|
| 677 |
+
if (!contentContainer || !tocNav) return;
|
| 678 |
+
|
| 679 |
+
tocNav.innerHTML = '';
|
| 680 |
+
// Cibler les titres H2 et H3 dans l'article
|
| 681 |
+
const headings = contentContainer.querySelectorAll('.content-overlay h2, .content-overlay h3');
|
| 682 |
+
|
| 683 |
+
headings.forEach((heading) => {
|
| 684 |
+
const key = heading.getAttribute('data-translate');
|
| 685 |
+
|
| 686 |
+
if (key && translations[key]) {
|
| 687 |
+
// Créer un ID unique à partir de la traduction en français pour garantir la cohérence des ancres
|
| 688 |
+
let id_slug = translations[key]['fr'].toLowerCase().replace(/[^\w\s-]/g, '').trim().replace(/[-\s]+/g, '-');
|
| 689 |
+
heading.id = id_slug;
|
| 690 |
+
|
| 691 |
+
const isH2 = heading.tagName === 'H2';
|
| 692 |
+
const link = document.createElement('a');
|
| 693 |
+
link.href = `#${heading.id}`;
|
| 694 |
+
link.className = `block transition duration-200 hover:text-blue-600-var ${isH2 ? 'font-semibold text-gray-900-var pt-2' : 'ml-4 text-gray-600-var'}`;
|
| 695 |
+
|
| 696 |
+
// Utiliser le texte traduit pour le lien, avec un fallback en anglais
|
| 697 |
+
link.textContent = translations[key][lang] || translations[key]['en'];
|
| 698 |
+
|
| 699 |
+
tocNav.appendChild(link);
|
| 700 |
+
}
|
| 701 |
+
});
|
| 702 |
+
}
|
| 703 |
+
|
| 704 |
+
|
| 705 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 706 |
+
// Définir l'année actuelle dans le footer
|
| 707 |
+
document.getElementById('current-year').textContent = new Date().getFullYear();
|
| 708 |
+
|
| 709 |
+
// Logique d'activation/désactivation du sélecteur de langue
|
| 710 |
+
const langButton = document.getElementById('lang-menu-button');
|
| 711 |
+
const langDropdown = document.getElementById('lang-menu-dropdown');
|
| 712 |
+
|
| 713 |
+
langButton.addEventListener('click', (e) => {
|
| 714 |
+
e.stopPropagation();
|
| 715 |
+
langDropdown.style.display = langDropdown.style.display === 'block' ? 'none' : 'block';
|
| 716 |
+
});
|
| 717 |
+
|
| 718 |
+
document.addEventListener('click', (e) => {
|
| 719 |
+
if (!langButton.contains(e.target) && !langDropdown.contains(e.target)) {
|
| 720 |
+
langDropdown.style.display = 'none';
|
| 721 |
+
}
|
| 722 |
+
});
|
| 723 |
+
|
| 724 |
+
// Logique de sélection de la langue
|
| 725 |
+
document.querySelectorAll('.lang-option').forEach(option => {
|
| 726 |
+
option.addEventListener('click', (e) => {
|
| 727 |
+
e.preventDefault();
|
| 728 |
+
const newLang = option.getAttribute('data-lang');
|
| 729 |
+
applyTranslations(newLang);
|
| 730 |
+
langDropdown.style.display = 'none'; // Fermer le menu après la sélection
|
| 731 |
+
});
|
| 732 |
+
});
|
| 733 |
+
|
| 734 |
+
// Chargement initial: Appliquer les traductions pour la langue par défaut ('en')
|
| 735 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/github/templates/new_branch.html
ADDED
|
@@ -0,0 +1,564 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Clone Repository</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 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 |
+
/* Inter Font Configuration */
|
| 14 |
+
body { font-family: 'Inter', sans-serif; }
|
| 15 |
+
|
| 16 |
+
/* Theme Variables and Transitions (Light Mode) */
|
| 17 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 18 |
+
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E; /* Green button */
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
--bg-warning: #FFF8C5; /* Yellow warning banner */
|
| 31 |
+
--border-warning: #E2B200;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
/* Utility classes for theme variables */
|
| 35 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 36 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 37 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 38 |
+
.text-link-var { color: var(--text-link); }
|
| 39 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 40 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 41 |
+
.focus\:ring-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 42 |
+
|
| 43 |
+
/* Repository Navigation Link Styles */
|
| 44 |
+
.repo-nav-link {
|
| 45 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 46 |
+
margin-right: 0.5rem;
|
| 47 |
+
white-space: nowrap; /* Prevents wrapping in the horizontal nav */
|
| 48 |
+
}
|
| 49 |
+
.repo-nav-link.active {
|
| 50 |
+
border-bottom-color: #F78166; /* Vibrant orange/red for active tab */
|
| 51 |
+
color: var(--text-color) !important;
|
| 52 |
+
font-weight: 600;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/* Sidebar Styles (identical to previous file) */
|
| 56 |
+
#sidebar {
|
| 57 |
+
position: fixed;
|
| 58 |
+
top: 0;
|
| 59 |
+
left: 0;
|
| 60 |
+
width: 300px;
|
| 61 |
+
height: 100%;
|
| 62 |
+
background-color: var(--bg-card);
|
| 63 |
+
transform: translateX(-100%);
|
| 64 |
+
transition: transform 0.3s ease-in-out;
|
| 65 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 66 |
+
z-index: 100;
|
| 67 |
+
}
|
| 68 |
+
#sidebar.open {
|
| 69 |
+
transform: translateX(0);
|
| 70 |
+
}
|
| 71 |
+
#overlay {
|
| 72 |
+
position: fixed;
|
| 73 |
+
top: 0;
|
| 74 |
+
left: 0;
|
| 75 |
+
width: 100%;
|
| 76 |
+
height: 100%;
|
| 77 |
+
background: rgba(0, 0, 0, 0.5);
|
| 78 |
+
z-index: 90;
|
| 79 |
+
display: none;
|
| 80 |
+
}
|
| 81 |
+
#overlay.open {
|
| 82 |
+
display: block;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
/* Spinner Styles (from your provided file) */
|
| 86 |
+
.spinner {
|
| 87 |
+
border: 4px solid var(--border-color);
|
| 88 |
+
border-top: 4px solid var(--text-link); /* Couleur du spinner */
|
| 89 |
+
border-radius: 50%;
|
| 90 |
+
width: 20px;
|
| 91 |
+
height: 20px;
|
| 92 |
+
animation: spin 1s linear infinite;
|
| 93 |
+
}
|
| 94 |
+
.spinner-large {
|
| 95 |
+
width: 30px;
|
| 96 |
+
height: 30px;
|
| 97 |
+
}
|
| 98 |
+
@keyframes spin {
|
| 99 |
+
0% { transform: rotate(0deg); }
|
| 100 |
+
100% { transform: rotate(360deg); }
|
| 101 |
+
}
|
| 102 |
+
</style>
|
| 103 |
+
</head>
|
| 104 |
+
|
| 105 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 106 |
+
|
| 107 |
+
<div id="overlay"></div>
|
| 108 |
+
|
| 109 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 110 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 111 |
+
<i data-lucide="git-fork" class="text-3xl text-link-var"></i>
|
| 112 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 113 |
+
<i data-lucide="x" class="text-2xl"></i>
|
| 114 |
+
</button>
|
| 115 |
+
</div>
|
| 116 |
+
|
| 117 |
+
<nav class="space-y-1">
|
| 118 |
+
<a href="/mindus/nexus/dashboard?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 119 |
+
<i data-lucide="home" class="w-5 h-5 mr-3"></i> Home
|
| 120 |
+
</a>
|
| 121 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 122 |
+
<i data-lucide="alert-circle" class="w-5 h-5 mr-3"></i> Issues
|
| 123 |
+
</a>
|
| 124 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg bg-active-var transition-colors-theme font-semibold text-link-var">
|
| 125 |
+
<i data-lucide="git-pull-request" class="w-5 h-5 mr-3"></i> Pull requests
|
| 126 |
+
</a>
|
| 127 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 128 |
+
<i data-lucide="layout-grid" class="w-5 h-5 mr-3"></i> Projects
|
| 129 |
+
</a>
|
| 130 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 131 |
+
<i data-lucide="message-square" class="w-5 h-5 mr-3"></i> Discussions
|
| 132 |
+
</a>
|
| 133 |
+
<a href="/repo_files?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 134 |
+
<i data-lucide="code" class="w-5 h-5 mr-3"></i> Codespaces
|
| 135 |
+
</a>
|
| 136 |
+
<a href="/mindus/nexus/gitforge_copilot" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 137 |
+
<i data-lucide="cpu" class="w-5 h-5 mr-3"></i> Copilot
|
| 138 |
+
</a>
|
| 139 |
+
</nav>
|
| 140 |
+
|
| 141 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 142 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 143 |
+
<i data-lucide="compass" class="w-5 h-5 mr-3"></i> Explore
|
| 144 |
+
</a>
|
| 145 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 146 |
+
<i data-lucide="store" class="w-5 h-5 mr-3"></i> Marketplace
|
| 147 |
+
</a>
|
| 148 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 149 |
+
<i data-lucide="link" class="w-5 h-5 mr-3"></i> MCP registry
|
| 150 |
+
</a>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 156 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 157 |
+
<div class="flex justify-between items-center h-16">
|
| 158 |
+
|
| 159 |
+
<div class="flex items-center space-x-4">
|
| 160 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 161 |
+
<i data-lucide="menu" class="w-6 h-6"></i>
|
| 162 |
+
</button>
|
| 163 |
+
|
| 164 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 165 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 166 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 167 |
+
<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>
|
| 168 |
+
<i data-lucide="lock" class="w-4 h-4 ml-2 text-secondary-var"></i>
|
| 169 |
+
</a>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="flex items-center space-x-3">
|
| 173 |
+
<div class="hidden sm:block">
|
| 174 |
+
<input type="text" placeholder="Type / to search"
|
| 175 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 176 |
+
</div>
|
| 177 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 178 |
+
<i data-lucide="bell" class="w-5 h-5"></i>
|
| 179 |
+
</a>
|
| 180 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 181 |
+
<i data-lucide="plus" class="w-5 h-5"></i>
|
| 182 |
+
</a>
|
| 183 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 184 |
+
<i data-lucide="user-circle" class="w-5 h-5"></i>
|
| 185 |
+
</a>
|
| 186 |
+
</div>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 191 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 192 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 193 |
+
<a href="/repo_files?repo_slug=repo_slug" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 194 |
+
<i data-lucide="code" class="w-4 h-4 mr-1"></i> Code
|
| 195 |
+
</a>
|
| 196 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 197 |
+
<i data-lucide="alert-circle" class="w-4 h-4 mr-1"></i> Issues
|
| 198 |
+
</a>
|
| 199 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 200 |
+
<i data-lucide="git-pull-request" class="w-4 h-4 mr-1"></i> Pull requests
|
| 201 |
+
</a>
|
| 202 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 203 |
+
<i data-lucide="check-square" class="w-4 h-4 mr-1"></i> Actions
|
| 204 |
+
</a>
|
| 205 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 206 |
+
<i data-lucide="box" class="w-4 h-4 mr-1"></i> Projects
|
| 207 |
+
</a>
|
| 208 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 209 |
+
<i data-lucide="shield" class="w-4 h-4 mr-1"></i> Security
|
| 210 |
+
</a>
|
| 211 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 212 |
+
<i data-lucide="trending-up" class="w-4 h-4 mr-1"></i> Insights
|
| 213 |
+
</a>
|
| 214 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 215 |
+
<i data-lucide="settings" class="w-4 h-4 mr-1"></i> Settings
|
| 216 |
+
</a>
|
| 217 |
+
</nav>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
</header>
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 224 |
+
|
| 225 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 226 |
+
|
| 227 |
+
<div class="lg:col-span-3">
|
| 228 |
+
<h1 class="text-3xl font-semibold text-color-var mb-4 border-b border-color-var/50 pb-2">Repository Management</h1>
|
| 229 |
+
|
| 230 |
+
<div class="bg-card-var border border-color-var rounded-xl p-6 shadow-lg mb-10">
|
| 231 |
+
<h2 class="text-xl font-semibold text-color-var mb-4 flex items-center">
|
| 232 |
+
<i data-lucide="copy-plus" class="w-5 h-5 mr-2 text-link-var"></i>
|
| 233 |
+
Clone Existing Repository
|
| 234 |
+
</h2>
|
| 235 |
+
<p class="text-secondary-var text-sm mb-4">
|
| 236 |
+
Créez un nouveau dépôt de travail (clone) en copiant les fichiers d'un dépôt source existant.
|
| 237 |
+
</p>
|
| 238 |
+
<form id="clone-repo-form" class="space-y-4">
|
| 239 |
+
<div>
|
| 240 |
+
<label for="source-repo-slug" class="block text-sm font-medium text-color-var mb-1">Source Repository Slug (Dépôt existant)</label>
|
| 241 |
+
<input type="text" id="source-repo-slug" name="source_repo_slug" required
|
| 242 |
+
class="w-full p-2 text-sm bg-page-var border border-color-var rounded-lg focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var transition-colors-theme"
|
| 243 |
+
placeholder="ex: mindus/existing-dataset" title="Le dépôt source à cloner.">
|
| 244 |
+
<p class="mt-1 text-xs text-secondary-var">C'est le dépôt existant que vous voulez copier.</p>
|
| 245 |
+
</div>
|
| 246 |
+
|
| 247 |
+
<div>
|
| 248 |
+
<label for="new-repo-slug" class="block text-sm font-medium text-color-var mb-1">New Repository Name (Nom du nouveau dépôt)</label>
|
| 249 |
+
<input type="text" id="new-repo-slug" name="new_repo_slug" required pattern="[a-zA-Z0-9\-\/_]+"
|
| 250 |
+
class="w-full p-2 text-sm bg-page-var border border-color-var rounded-lg focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var transition-colors-theme"
|
| 251 |
+
placeholder="ex: my-new-project-clone" title="Seuls les lettres, chiffres, tirets, barres obliques et underscores sont autorisés.">
|
| 252 |
+
<p class="mt-1 text-xs text-secondary-var">Ce sera le nom de votre nouveau dépôt de travail isolé (dans votre espace PR).</p>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
<div class="flex justify-end pt-2">
|
| 256 |
+
<button type="submit" id="submit-clone-button"
|
| 257 |
+
class="inline-flex items-center justify-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed">
|
| 258 |
+
<div id="clone-loading-spinner" class="spinner mr-2 hidden"></div>
|
| 259 |
+
Clone Repository
|
| 260 |
+
</button>
|
| 261 |
+
</div>
|
| 262 |
+
</form>
|
| 263 |
+
<div id="clone-feedback-message" class="mt-4 p-3 hidden text-sm rounded-lg" role="alert"></div>
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<div class="bg-card-var border border-color-var rounded-xl p-6 shadow-lg">
|
| 267 |
+
<h2 class="text-xl font-semibold text-color-var mb-4 flex items-center">
|
| 268 |
+
<i data-lucide="git-fork" class="w-5 h-5 mr-2 text-link-var"></i>
|
| 269 |
+
Your Cloned Repositories (Workspaces)
|
| 270 |
+
</h2>
|
| 271 |
+
<p class="text-secondary-var text-sm mb-4">
|
| 272 |
+
Voici la liste de tous vos dépôts clonés (espaces de travail) actifs. Cliquez sur un dépôt pour y accéder.
|
| 273 |
+
</p>
|
| 274 |
+
|
| 275 |
+
<div id="cloned-repos-list" class="space-y-3">
|
| 276 |
+
<div class="flex items-center justify-center p-4">
|
| 277 |
+
<div class="spinner mr-3"></div>
|
| 278 |
+
<span class="text-secondary-var">Loading your workspaces...</span>
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
+
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
</main>
|
| 286 |
+
|
| 287 |
+
<div id="global-spinner-overlay" class="fixed inset-0 bg-black bg-opacity-10 z-50 items-center justify-center hidden">
|
| 288 |
+
<div class="p-6 bg-card-var rounded-lg shadow-xl flex flex-col items-center">
|
| 289 |
+
<div class="spinner spinner-large mb-3"></div>
|
| 290 |
+
<p id="global-spinner-text" class="text-color-var font-semibold">Processing operation...</p>
|
| 291 |
+
</div>
|
| 292 |
+
</div>
|
| 293 |
+
|
| 294 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 295 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 296 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 297 |
+
<i data-lucide="git-fork" class="w-5 h-5"></i>
|
| 298 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 299 |
+
</div>
|
| 300 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 301 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 302 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Privacy</a>
|
| 303 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Security</a>
|
| 304 |
+
<a href="/mindus/nexus/statut" class="hover:text-link-var">Status</a>
|
| 305 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 306 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 307 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 308 |
+
</nav>
|
| 309 |
+
</div>
|
| 310 |
+
</footer>
|
| 311 |
+
|
| 312 |
+
<script>
|
| 313 |
+
// Initialiser Lucide Icons
|
| 314 |
+
lucide.createIcons();
|
| 315 |
+
|
| 316 |
+
// ----------------------------------------------------------------------
|
| 317 |
+
// SIDEBAR LOGIC (inchangée)
|
| 318 |
+
// ----------------------------------------------------------------------
|
| 319 |
+
const sidebar = document.getElementById('sidebar');
|
| 320 |
+
const overlay = document.getElementById('overlay');
|
| 321 |
+
const openButton = document.getElementById('open-sidebar');
|
| 322 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 323 |
+
|
| 324 |
+
const toggleSidebar = () => {
|
| 325 |
+
sidebar.classList.toggle('open');
|
| 326 |
+
overlay.classList.toggle('open');
|
| 327 |
+
};
|
| 328 |
+
|
| 329 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 330 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 331 |
+
overlay.addEventListener('click', toggleSidebar);
|
| 332 |
+
|
| 333 |
+
const body = document.body;
|
| 334 |
+
const observer = new MutationObserver(() => {
|
| 335 |
+
if (sidebar.classList.contains('open')) {
|
| 336 |
+
body.style.overflow = 'hidden';
|
| 337 |
+
} else {
|
| 338 |
+
body.style.overflow = '';
|
| 339 |
+
}
|
| 340 |
+
});
|
| 341 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 342 |
+
|
| 343 |
+
// ----------------------------------------------------------------------
|
| 344 |
+
// LOGIQUE COMMUNE
|
| 345 |
+
// ----------------------------------------------------------------------
|
| 346 |
+
|
| 347 |
+
const API_BASE_URL = "";
|
| 348 |
+
const REPO_SLUG_DEFAULT = 'mindus0/mindus';
|
| 349 |
+
// Constante pour la page des fichiers du dépôt. Utiliser ?repo_slug=...
|
| 350 |
+
const FILES_PAGE_BASE_URL = '/mindus/nexus/repo_files_branch';
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
// Récupération des éléments du DOM
|
| 354 |
+
const globalSpinnerOverlay = document.getElementById('global-spinner-overlay');
|
| 355 |
+
const globalSpinnerText = document.getElementById('global-spinner-text');
|
| 356 |
+
const clonedReposListContainer = document.getElementById('cloned-repos-list'); // NOUVEAU
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
// Fonction utilitaire pour récupérer le paramètre de l'URL
|
| 360 |
+
const getUrlParameter = (name) => {
|
| 361 |
+
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
| 362 |
+
const regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
| 363 |
+
const results = regex.exec(location.search);
|
| 364 |
+
return results === null ? null : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
| 365 |
+
};
|
| 366 |
+
|
| 367 |
+
// Initialisation du slug de dépôt (du dépôt actuellement visualisé)
|
| 368 |
+
let repoSlug = getUrlParameter('repo_slug') || REPO_SLUG_DEFAULT;
|
| 369 |
+
|
| 370 |
+
// Mise à jour de la variable repoSlug dans l'en-tête (pour l'affichage)
|
| 371 |
+
// La route n'utilise pas le repo_slug pour le clonage, mais on maintient l'affichage si l'URL le contient.
|
| 372 |
+
document.getElementById('repo-name').textContent = repoSlug.split('/')[1] || repoSlug;
|
| 373 |
+
|
| 374 |
+
// ----------------------------------------------------------------------
|
| 375 |
+
// LOGIQUE DE CLONAGE DE DÉPÔT
|
| 376 |
+
// ----------------------------------------------------------------------
|
| 377 |
+
|
| 378 |
+
const cloneRepoForm = document.getElementById('clone-repo-form');
|
| 379 |
+
const sourceRepoInput = document.getElementById('source-repo-slug');
|
| 380 |
+
const newRepoInput = document.getElementById('new-repo-slug');
|
| 381 |
+
const submitCloneButton = document.getElementById('submit-clone-button');
|
| 382 |
+
const cloneLoadingSpinner = document.getElementById('clone-loading-spinner');
|
| 383 |
+
const cloneFeedbackMessage = document.getElementById('clone-feedback-message');
|
| 384 |
+
|
| 385 |
+
// Fonction pour gérer l'état de chargement du formulaire de clonage
|
| 386 |
+
const toggleCloneLoadingState = (isLoading) => {
|
| 387 |
+
if (isLoading) {
|
| 388 |
+
submitCloneButton.disabled = true;
|
| 389 |
+
cloneLoadingSpinner.classList.remove('hidden');
|
| 390 |
+
globalSpinnerText.textContent = 'Cloning and initializing new repository... This may take a moment.';
|
| 391 |
+
globalSpinnerOverlay.classList.remove('hidden');
|
| 392 |
+
globalSpinnerOverlay.classList.add('flex');
|
| 393 |
+
submitCloneButton.innerHTML = '<div class="spinner mr-2"></div> Cloning...';
|
| 394 |
+
cloneFeedbackMessage.classList.add('hidden');
|
| 395 |
+
cloneFeedbackMessage.classList.remove('bg-red-50', 'bg-green-50', 'text-red-800', 'text-green-800');
|
| 396 |
+
// Ré-initialisation des icônes après modification du innerHTML
|
| 397 |
+
lucide.createIcons();
|
| 398 |
+
|
| 399 |
+
} else {
|
| 400 |
+
submitCloneButton.disabled = false;
|
| 401 |
+
cloneLoadingSpinner.classList.add('hidden');
|
| 402 |
+
globalSpinnerOverlay.classList.remove('flex');
|
| 403 |
+
globalSpinnerOverlay.classList.add('hidden');
|
| 404 |
+
submitCloneButton.innerHTML = '<i data-lucide="copy-plus" class="w-4 h-4 mr-2"></i> Clone Repository';
|
| 405 |
+
// Ré-initialisation des icônes après modification du innerHTML
|
| 406 |
+
lucide.createIcons();
|
| 407 |
+
}
|
| 408 |
+
};
|
| 409 |
+
|
| 410 |
+
// LOGIQUE DE SOUMISSION DU FORMULAIRE DE CLONAGE
|
| 411 |
+
cloneRepoForm.addEventListener('submit', async (e) => {
|
| 412 |
+
e.preventDefault();
|
| 413 |
+
|
| 414 |
+
if (!cloneRepoForm.checkValidity()) {
|
| 415 |
+
return;
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
const sourceRepoSlug = sourceRepoInput.value.trim();
|
| 419 |
+
const newRepoSlug = newRepoInput.value.trim();
|
| 420 |
+
|
| 421 |
+
toggleCloneLoadingState(true);
|
| 422 |
+
|
| 423 |
+
try {
|
| 424 |
+
// APPEL API pour le clonage (route: /api/repo/clone)
|
| 425 |
+
const response = await fetch(`${API_BASE_URL}/api/repo/clone`, {
|
| 426 |
+
method: 'POST',
|
| 427 |
+
headers: {
|
| 428 |
+
'Content-Type': 'application/json',
|
| 429 |
+
},
|
| 430 |
+
body: JSON.stringify({
|
| 431 |
+
source_repo_slug: sourceRepoSlug,
|
| 432 |
+
new_repo_slug: newRepoSlug,
|
| 433 |
+
})
|
| 434 |
+
});
|
| 435 |
+
|
| 436 |
+
const result = await response.json();
|
| 437 |
+
|
| 438 |
+
toggleCloneLoadingState(false);
|
| 439 |
+
|
| 440 |
+
if (response.ok && result.success) {
|
| 441 |
+
// Succès: Afficher le message de succès et rediriger
|
| 442 |
+
cloneFeedbackMessage.textContent = result.message;
|
| 443 |
+
cloneFeedbackMessage.classList.add('bg-green-50', 'text-green-800');
|
| 444 |
+
cloneFeedbackMessage.classList.remove('hidden');
|
| 445 |
+
|
| 446 |
+
// Réinitialiser les champs
|
| 447 |
+
sourceRepoInput.value = '';
|
| 448 |
+
newRepoInput.value = '';
|
| 449 |
+
|
| 450 |
+
// Mettre à jour la liste des dépôts clonés immédiatement
|
| 451 |
+
await fetchAndDisplayClonedRepos();
|
| 452 |
+
|
| 453 |
+
// OPTIONNEL: Rediriger l'utilisateur vers le nouveau dépôt cloné
|
| 454 |
+
setTimeout(() => {
|
| 455 |
+
// Utiliser le nom du nouveau dépôt pour rediriger
|
| 456 |
+
window.location.href = `${FILES_PAGE_BASE_URL}?repo_slug=${encodeURIComponent(newRepoSlug)}`;
|
| 457 |
+
}, 2000);
|
| 458 |
+
|
| 459 |
+
} else {
|
| 460 |
+
// Échec de l'API: Afficher le message d'erreur
|
| 461 |
+
cloneFeedbackMessage.textContent = `Clonage échoué: ${result.message || 'Erreur inconnue'}.`;
|
| 462 |
+
cloneFeedbackMessage.classList.add('bg-red-50', 'text-red-800');
|
| 463 |
+
cloneFeedbackMessage.classList.remove('hidden');
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
} catch (error) {
|
| 467 |
+
console.error("Error cloning repository:", error);
|
| 468 |
+
toggleCloneLoadingState(false);
|
| 469 |
+
// Erreur réseau
|
| 470 |
+
cloneFeedbackMessage.textContent = "Une erreur est survenue lors de la communication réseau. Vérifiez votre connexion.";
|
| 471 |
+
cloneFeedbackMessage.classList.add('bg-red-50', 'text-red-800');
|
| 472 |
+
cloneFeedbackMessage.classList.remove('hidden');
|
| 473 |
+
}
|
| 474 |
+
});
|
| 475 |
+
|
| 476 |
+
|
| 477 |
+
// ----------------------------------------------------------------------
|
| 478 |
+
// LOGIQUE D'AFFICHAGE DES DÉPÔTS CLONÉS (NOUVEAU)
|
| 479 |
+
// ----------------------------------------------------------------------
|
| 480 |
+
|
| 481 |
+
/**
|
| 482 |
+
* Récupère la liste des dépôts clonés de l'utilisateur et les affiche.
|
| 483 |
+
*/
|
| 484 |
+
async function fetchAndDisplayClonedRepos() {
|
| 485 |
+
clonedReposListContainer.innerHTML = `
|
| 486 |
+
<div class="flex items-center justify-center p-4">
|
| 487 |
+
<div class="spinner mr-3"></div>
|
| 488 |
+
<span class="text-secondary-var">Loading your workspaces...</span>
|
| 489 |
+
</div>`;
|
| 490 |
+
lucide.createIcons(); // Ré-initialiser les icônes si besoin
|
| 491 |
+
|
| 492 |
+
try {
|
| 493 |
+
// APPEL API pour lister les dépôts clonés (route: /api/repo/list_cloned)
|
| 494 |
+
const response = await fetch(`${API_BASE_URL}/api/repo/list_cloned`);
|
| 495 |
+
|
| 496 |
+
if (!response.ok) {
|
| 497 |
+
throw new Error(`HTTP error! status: ${response.status}`);
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
const result = await response.json();
|
| 501 |
+
|
| 502 |
+
if (result.success && result.cloned_repos) {
|
| 503 |
+
const repoSlugs = result.cloned_repos;
|
| 504 |
+
clonedReposListContainer.innerHTML = ''; // Vider le spinner
|
| 505 |
+
|
| 506 |
+
if (repoSlugs.length === 0) {
|
| 507 |
+
clonedReposListContainer.innerHTML = `
|
| 508 |
+
<div class="p-4 text-center bg-active-var/50 border border-color-var/50 rounded-lg text-secondary-var">
|
| 509 |
+
<i data-lucide="info" class="w-5 h-5 inline-block mr-1"></i>
|
| 510 |
+
You don't have any cloned repositories yet.
|
| 511 |
+
</div>
|
| 512 |
+
`;
|
| 513 |
+
lucide.createIcons();
|
| 514 |
+
return;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
repoSlugs.forEach(slug => {
|
| 518 |
+
const repoItem = document.createElement('a');
|
| 519 |
+
// Le lien doit pointer vers la page de fichiers du dépôt cloné
|
| 520 |
+
repoItem.href = `${FILES_PAGE_BASE_URL}?repo_slug=${encodeURIComponent(slug)}`;
|
| 521 |
+
repoItem.className = 'flex items-center justify-between p-3 bg-active-var/50 hover:bg-active-var border border-color-var/75 rounded-lg transition-colors cursor-pointer group';
|
| 522 |
+
|
| 523 |
+
// Utiliser le 'slug' comme nom de dépôt
|
| 524 |
+
const repoName = slug;
|
| 525 |
+
|
| 526 |
+
repoItem.innerHTML = `
|
| 527 |
+
<div class="flex items-center">
|
| 528 |
+
<i data-lucide="folder-git" class="w-5 h-5 mr-3 text-link-var group-hover:text-color-var"></i>
|
| 529 |
+
<span class="text-color-var font-medium group-hover:underline">${repoName}</span>
|
| 530 |
+
</div>
|
| 531 |
+
<i data-lucide="chevron-right" class="w-4 h-4 text-secondary-var"></i>
|
| 532 |
+
`;
|
| 533 |
+
clonedReposListContainer.appendChild(repoItem);
|
| 534 |
+
});
|
| 535 |
+
lucide.createIcons();
|
| 536 |
+
|
| 537 |
+
} else {
|
| 538 |
+
clonedReposListContainer.innerHTML = `
|
| 539 |
+
<div class="p-4 text-center bg-red-50/50 border border-red-800/50 rounded-lg text-red-800">
|
| 540 |
+
<i data-lucide="alert-triangle" class="w-5 h-5 inline-block mr-1"></i>
|
| 541 |
+
Error loading cloned repositories: ${result.message || 'Unknown error.'}
|
| 542 |
+
</div>
|
| 543 |
+
`;
|
| 544 |
+
lucide.createIcons();
|
| 545 |
+
}
|
| 546 |
+
|
| 547 |
+
} catch (error) {
|
| 548 |
+
console.error("Fetch error for cloned repos:", error);
|
| 549 |
+
clonedReposListContainer.innerHTML = `
|
| 550 |
+
<div class="p-4 text-center bg-red-50/50 border border-red-800/50 rounded-lg text-red-800">
|
| 551 |
+
<i data-lucide="alert-triangle" class="w-5 h-5 inline-block mr-1"></i>
|
| 552 |
+
Network or system error while loading workspaces.
|
| 553 |
+
</div>
|
| 554 |
+
`;
|
| 555 |
+
lucide.createIcons();
|
| 556 |
+
}
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
// Charger la liste des dépôts clonés au chargement initial de la page
|
| 560 |
+
document.addEventListener('DOMContentLoaded', fetchAndDisplayClonedRepos);
|
| 561 |
+
|
| 562 |
+
</script>
|
| 563 |
+
</body>
|
| 564 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/new_issue.html
ADDED
|
@@ -0,0 +1,853 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Issues</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 |
+
<style>
|
| 12 |
+
/* Inter Font Configuration */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Theme Variables and Transitions */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Light Mode Theme */
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E; /* Green button */
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
}
|
| 31 |
+
/* Utility classes for theme 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); }
|
| 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 |
+
.focus\:ring-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 39 |
+
|
| 40 |
+
/* Repository Navigation Link Styles */
|
| 41 |
+
.repo-nav-link {
|
| 42 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 43 |
+
margin-right: 0.5rem;
|
| 44 |
+
}
|
| 45 |
+
.repo-nav-link.active {
|
| 46 |
+
border-bottom-color: #F78166; /* Using a vibrant orange/red for active tab like the image */
|
| 47 |
+
color: var(--text-color) !important;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
/* Sidebar Styles */
|
| 52 |
+
#sidebar {
|
| 53 |
+
position: fixed;
|
| 54 |
+
top: 0;
|
| 55 |
+
left: 0;
|
| 56 |
+
width: 300px;
|
| 57 |
+
height: 100%;
|
| 58 |
+
background-color: var(--bg-card);
|
| 59 |
+
transform: translateX(-100%);
|
| 60 |
+
transition: transform 0.3s ease-in-out;
|
| 61 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 62 |
+
z-index: 100;
|
| 63 |
+
}
|
| 64 |
+
#sidebar.open {
|
| 65 |
+
transform: translateX(0);
|
| 66 |
+
}
|
| 67 |
+
#overlay {
|
| 68 |
+
position: fixed;
|
| 69 |
+
top: 0;
|
| 70 |
+
left: 0;
|
| 71 |
+
width: 100%;
|
| 72 |
+
height: 100%;
|
| 73 |
+
background: rgba(0, 0, 0, 0.5);
|
| 74 |
+
z-index: 90;
|
| 75 |
+
display: none;
|
| 76 |
+
}
|
| 77 |
+
#overlay.open {
|
| 78 |
+
display: block;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
/* Loading Spinner */
|
| 82 |
+
.spinner {
|
| 83 |
+
border: 4px solid rgba(0, 0, 0, 0.1);
|
| 84 |
+
width: 36px;
|
| 85 |
+
height: 36px;
|
| 86 |
+
border-radius: 50%;
|
| 87 |
+
border-left-color: var(--text-link);
|
| 88 |
+
animation: spin 1s ease infinite;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
@keyframes spin {
|
| 92 |
+
0% { transform: rotate(0deg); }
|
| 93 |
+
100% { transform: rotate(360deg); }
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
/* Issue Card Content Collapse Animation */
|
| 97 |
+
.collapse-content {
|
| 98 |
+
max-height: 0;
|
| 99 |
+
overflow: hidden;
|
| 100 |
+
transition: max-height 0.3s ease-in-out;
|
| 101 |
+
}
|
| 102 |
+
.collapse-content.open {
|
| 103 |
+
max-height: 1000px; /* Grande valeur pour permettre l'expansion */
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/* Custom style for editable fields to look like a large field */
|
| 107 |
+
.editable-field-input {
|
| 108 |
+
height: 150px; /* Make it vertically larger */
|
| 109 |
+
}
|
| 110 |
+
</style>
|
| 111 |
+
</head>
|
| 112 |
+
|
| 113 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 114 |
+
|
| 115 |
+
<div id="overlay"></div>
|
| 116 |
+
|
| 117 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 118 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 119 |
+
<span class="material-symbols-rounded text-3xl">data_object</span>
|
| 120 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 121 |
+
<span class="material-symbols-rounded text-2xl">close</span>
|
| 122 |
+
</button>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<nav class="space-y-1">
|
| 126 |
+
<a href="/mindus/nexus/dashboard" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 127 |
+
<span class="material-symbols-rounded mr-3 text-lg">home</span> Home
|
| 128 |
+
</a>
|
| 129 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg bg-active-var transition-colors-theme font-semibold text-link-var">
|
| 130 |
+
<span class="material-symbols-rounded mr-3 text-lg">bug_report</span> Issues
|
| 131 |
+
</a>
|
| 132 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 133 |
+
<span class="material-symbols-rounded mr-3 text-lg">merge</span> Pull requests
|
| 134 |
+
</a>
|
| 135 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 136 |
+
<span class="material-symbols-rounded mr-3 text-lg">box</span> Projects
|
| 137 |
+
</a>
|
| 138 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 139 |
+
<span class="material-symbols-rounded mr-3 text-lg">chat</span> Discussions
|
| 140 |
+
</a>
|
| 141 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 142 |
+
<span class="material-symbols-rounded mr-3 text-lg">developer_mode</span> Codespaces
|
| 143 |
+
</a>
|
| 144 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 145 |
+
<span class="material-symbols-rounded mr-3 text-lg">smart_toy</span> Copilot
|
| 146 |
+
</a>
|
| 147 |
+
</nav>
|
| 148 |
+
|
| 149 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 150 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 151 |
+
<span class="material-symbols-rounded mr-3 text-lg">explore</span> Explore
|
| 152 |
+
</a>
|
| 153 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 154 |
+
<span class="material-symbols-rounded mr-3 text-lg">storefront</span> Marketplace
|
| 155 |
+
</a>
|
| 156 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 157 |
+
<span class="material-symbols-rounded mr-3 text-lg">link</span> MCP registry
|
| 158 |
+
</a>
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme sticky top-0 z-50">
|
| 164 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 165 |
+
<div class="flex justify-between items-center h-16">
|
| 166 |
+
|
| 167 |
+
<div class="flex items-center space-x-4">
|
| 168 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 169 |
+
<span class="material-symbols-rounded text-2xl">menu</span>
|
| 170 |
+
</button>
|
| 171 |
+
|
| 172 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 173 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 174 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 175 |
+
<span id="repo-user">mindus0</span> / <span id="repo-name">mailix</span>
|
| 176 |
+
<span class="material-symbols-rounded text-base ml-2 text-secondary-var">lock</span>
|
| 177 |
+
</a>
|
| 178 |
+
</div>
|
| 179 |
+
|
| 180 |
+
<div class="flex items-center space-x-3">
|
| 181 |
+
<div class="hidden sm:block">
|
| 182 |
+
<input type="text" placeholder="Type / to search"
|
| 183 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 184 |
+
</div>
|
| 185 |
+
<a href="/mindus/nexus/notentification" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 186 |
+
<span class="material-symbols-rounded">notifications</span>
|
| 187 |
+
</a>
|
| 188 |
+
<a href="mindus/nexus/nouveau_project" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 189 |
+
<span class="material-symbols-rounded">add</span>
|
| 190 |
+
</a>
|
| 191 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 192 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 193 |
+
</a>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
</div>
|
| 197 |
+
|
| 198 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 199 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 200 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 201 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 202 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 203 |
+
</a>
|
| 204 |
+
<a href="#" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 205 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues <span id="issue-count-nav" class="ml-1 px-1 bg-active-var rounded-full text-xs font-normal">0</span>
|
| 206 |
+
</a>
|
| 207 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 208 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests
|
| 209 |
+
</a>
|
| 210 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 211 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 212 |
+
</a>
|
| 213 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 214 |
+
<span class="material-symbols-rounded text-base mr-1">box</span> Projects
|
| 215 |
+
</a>
|
| 216 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 217 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 218 |
+
</a>
|
| 219 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 220 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 221 |
+
</a>
|
| 222 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 223 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 224 |
+
</a>
|
| 225 |
+
</nav>
|
| 226 |
+
</div>
|
| 227 |
+
</div>
|
| 228 |
+
</header>
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 232 |
+
|
| 233 |
+
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6 space-y-3 md:space-y-0">
|
| 234 |
+
<div class="flex items-center space-x-2 w-full md:w-auto">
|
| 235 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 236 |
+
Filters <span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 237 |
+
</button>
|
| 238 |
+
<input type="text" placeholder="is:issue is:open"
|
| 239 |
+
class="w-full md:w-96 p-1.5 text-sm rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 240 |
+
</div>
|
| 241 |
+
|
| 242 |
+
<div class="flex items-center space-x-3 w-full md:w-auto justify-end">
|
| 243 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 244 |
+
Labels <span class="ml-1 font-semibold">0</span>
|
| 245 |
+
</button>
|
| 246 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 247 |
+
Milestones <span class="ml-1 font-semibold">0</span>
|
| 248 |
+
</button>
|
| 249 |
+
<button id="add-comment-btn" class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 250 |
+
<span class="material-symbols-rounded text-base mr-1">comment</span> Add Comment
|
| 251 |
+
</button>
|
| 252 |
+
<a id="new-issue-btn-top" href="/mindus/nexus/create_new_issue?repo_slug={{ repo_slug }}" class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 253 |
+
<span class="material-symbols-rounded text-base mr-1">add</span> New issue
|
| 254 |
+
</a>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
|
| 258 |
+
<div id="comment-form-area" class="bg-card-var border border-color-var rounded-lg mb-6 shadow-md p-4 hidden">
|
| 259 |
+
<h3 class="text-lg font-semibold text-color-var mb-3">Post a new comment</h3>
|
| 260 |
+
|
| 261 |
+
<div class="mb-4">
|
| 262 |
+
<label for="comment-issue-select" class="block text-sm font-medium text-secondary-var mb-2">Select Issue to Comment</label>
|
| 263 |
+
<select id="comment-issue-select" class="w-full p-2 border border-color-var bg-page-var rounded-lg text-color-var"></select>
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<label for="comment-modal-textarea" class="block text-sm font-medium text-secondary-var mb-2">Comment Content</label>
|
| 267 |
+
<textarea id="comment-modal-textarea" rows="4" class="w-full p-3 border border-color-var bg-page-var rounded-lg text-color-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var" placeholder="Write your comment here..."></textarea>
|
| 268 |
+
|
| 269 |
+
<div class="flex justify-end space-x-3 mt-4">
|
| 270 |
+
<button id="cancel-comment-form" class="px-4 py-2 text-sm font-semibold border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 271 |
+
Cancel
|
| 272 |
+
</button>
|
| 273 |
+
<button id="submit-comment-form" class="px-4 py-2 text-sm font-semibold bg-primary-color-var text-white rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 274 |
+
Post Comment
|
| 275 |
+
</button>
|
| 276 |
+
</div>
|
| 277 |
+
</div>
|
| 278 |
+
|
| 279 |
+
<div id="loading-indicator" class="mt-20 flex flex-col items-center text-center hidden">
|
| 280 |
+
<div class="spinner mb-4"></div>
|
| 281 |
+
<p class="text-secondary-var">Chargement des Issues...</p>
|
| 282 |
+
</div>
|
| 283 |
+
|
| 284 |
+
<div id="welcome-message" class="mt-20 flex flex-col items-center text-center">
|
| 285 |
+
<span class="material-symbols-rounded text-6xl text-secondary-var mb-4">bug_report</span>
|
| 286 |
+
|
| 287 |
+
<h1 class="text-2xl font-semibold text-color-var mb-2">Welcome to issues!</h1>
|
| 288 |
+
<p class="text-secondary-var max-w-lg mb-4">
|
| 289 |
+
Issues are a great way to keep track of bugs, enhancements, and other tasks for your project.
|
| 290 |
+
As issues are created, they'll appear here in a searchable and filterable list. To get started, you should
|
| 291 |
+
<a id="new-issue-link-welcome" href="/mindus/nexus/create_new_issue?repo_slug={{ repo_slug }}" class="text-link-var hover:underline">create an issue</a>.
|
| 292 |
+
</p>
|
| 293 |
+
</div>
|
| 294 |
+
|
| 295 |
+
<div id="issues-list-container" class="hidden">
|
| 296 |
+
</div>
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
</main>
|
| 300 |
+
|
| 301 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 302 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 303 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 304 |
+
<span class="material-symbols-rounded text-xl">data_object</span>
|
| 305 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 306 |
+
</div>
|
| 307 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 308 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 309 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Privacy</a>
|
| 310 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Security</a>
|
| 311 |
+
<a href="/mindus/nexus/satut" class="hover:text-link-var">Status</a>
|
| 312 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 313 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 314 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 315 |
+
</nav>
|
| 316 |
+
</div>
|
| 317 |
+
</footer>
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
<script>
|
| 321 |
+
// --- SIDEBAR LOGIC (UNCHANGED) ---
|
| 322 |
+
const sidebar = document.getElementById('sidebar');
|
| 323 |
+
const overlay = document.getElementById('overlay');
|
| 324 |
+
const openButton = document.getElementById('open-sidebar');
|
| 325 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 326 |
+
|
| 327 |
+
const toggleSidebar = () => {
|
| 328 |
+
sidebar.classList.toggle('open');
|
| 329 |
+
overlay.classList.toggle('open');
|
| 330 |
+
};
|
| 331 |
+
|
| 332 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 333 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 334 |
+
overlay.addEventListener('click', toggleSidebar); // L'overlay principal est utilisé pour la sidebar
|
| 335 |
+
|
| 336 |
+
const body = document.body;
|
| 337 |
+
const observer = new MutationObserver(() => {
|
| 338 |
+
if (sidebar.classList.contains('open')) {
|
| 339 |
+
body.style.overflow = 'hidden';
|
| 340 |
+
} else {
|
| 341 |
+
body.style.overflow = '';
|
| 342 |
+
}
|
| 343 |
+
});
|
| 344 |
+
|
| 345 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 346 |
+
|
| 347 |
+
// --- GLOBAL VARIABLES & ELEMENTS ---
|
| 348 |
+
let ALL_ISSUES = []; // Pour stocker toutes les issues
|
| 349 |
+
let currentEditingIssueId = null; // Pour suivre l'issue actuellement en édition
|
| 350 |
+
|
| 351 |
+
const repoUserElement = document.getElementById('repo-user');
|
| 352 |
+
const repoNameElement = document.getElementById('repo-name');
|
| 353 |
+
const issuesListContainer = document.getElementById('issues-list-container');
|
| 354 |
+
const welcomeMessage = document.getElementById('welcome-message');
|
| 355 |
+
const loadingIndicator = document.getElementById('loading-indicator');
|
| 356 |
+
const issueCountNav = document.getElementById('issue-count-nav');
|
| 357 |
+
|
| 358 |
+
// Comment Form Elements
|
| 359 |
+
const commentFormArea = document.getElementById('comment-form-area');
|
| 360 |
+
const addCommentBtn = document.getElementById('add-comment-btn');
|
| 361 |
+
const cancelCommentFormBtn = document.getElementById('cancel-comment-form');
|
| 362 |
+
const submitCommentFormBtn = document.getElementById('submit-comment-form');
|
| 363 |
+
const commentIssueSelect = document.getElementById('comment-issue-select');
|
| 364 |
+
const commentModalTextarea = document.getElementById('comment-modal-textarea');
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
// --- UTILITY FUNCTIONS ---
|
| 368 |
+
|
| 369 |
+
function getRepoSlug() {
|
| 370 |
+
const user = repoUserElement ? repoUserElement.textContent.trim() : '{{ repo_user_fallback }}';
|
| 371 |
+
const repo = repoNameElement ? repoNameElement.textContent.trim() : '{{ repo_name_fallback }}';
|
| 372 |
+
|
| 373 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 374 |
+
const slugFromQuery = urlParams.get('repo_slug');
|
| 375 |
+
|
| 376 |
+
if (slugFromQuery && slugFromQuery !== '{{ repo_slug }}') {
|
| 377 |
+
return slugFromQuery;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
if (user && repo && user !== 'mindus0' && repo !== 'mailix') {
|
| 381 |
+
return `${user}/${repo}`;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
const templateSlug = '{{ repo_slug }}';
|
| 385 |
+
if (templateSlug && templateSlug !== '{{ repo_slug }}') {
|
| 386 |
+
return templateSlug;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
return "default/repo";
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
+
function formatDate(isoString) {
|
| 393 |
+
if (!isoString) return 'N/A';
|
| 394 |
+
const date = new Date(isoString);
|
| 395 |
+
return date.toLocaleDateString() + ' ' + date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
/**
|
| 399 |
+
* Truncate text and append '(...)' if longer than maxLength.
|
| 400 |
+
*/
|
| 401 |
+
function truncateText(text, maxLength) {
|
| 402 |
+
if (!text) return 'N/A';
|
| 403 |
+
const str = String(text);
|
| 404 |
+
if (str.length > maxLength) {
|
| 405 |
+
return str.substring(0, maxLength).trim() + ' (...)';
|
| 406 |
+
}
|
| 407 |
+
return str;
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
// --- ISSUE CARD GENERATION ---
|
| 411 |
+
|
| 412 |
+
function createIssueCard(issue) {
|
| 413 |
+
const card = document.createElement('div');
|
| 414 |
+
card.className = 'issue-card bg-card-var border border-color-var rounded-lg mb-3 shadow-sm transition-colors-theme';
|
| 415 |
+
card.setAttribute('data-issue-id', issue.issue_id);
|
| 416 |
+
|
| 417 |
+
// Truncate Title for header display
|
| 418 |
+
const displayTitle = truncateText(issue.title, 80);
|
| 419 |
+
|
| 420 |
+
// Header (Titre de la carte déroulante)
|
| 421 |
+
const header = document.createElement('div');
|
| 422 |
+
header.className = 'flex justify-between items-center p-4 cursor-pointer hover:bg-active-var transition-colors-theme rounded-t-lg';
|
| 423 |
+
header.innerHTML = `
|
| 424 |
+
<div class="flex items-center space-x-3 min-w-0">
|
| 425 |
+
<span class="material-symbols-rounded text-xl ${issue.status === 'Open' ? 'text-primary-color-var' : 'text-secondary-var'}">
|
| 426 |
+
${issue.status === 'Open' ? 'bug_report' : 'check_circle'}
|
| 427 |
+
</span>
|
| 428 |
+
<h3 class="text-lg font-semibold text-color-var truncate min-w-0">
|
| 429 |
+
<span class="hover:underline cursor-pointer text-link-var editable" data-edit-field="title" data-original-value="${issue.title}">
|
| 430 |
+
${displayTitle}
|
| 431 |
+
</span>
|
| 432 |
+
</h3>
|
| 433 |
+
${issue.labels.map(label => `<span class="text-xs font-medium px-2 py-0.5 rounded-full bg-active-var text-secondary-var">${label}</span>`).join('')}
|
| 434 |
+
</div>
|
| 435 |
+
<span class="material-symbols-rounded text-xl text-secondary-var toggle-icon">
|
| 436 |
+
expand_more
|
| 437 |
+
</span>
|
| 438 |
+
`;
|
| 439 |
+
header.addEventListener('click', (e) => {
|
| 440 |
+
// Empêcher l'ouverture/fermeture si on clique sur un champ éditable
|
| 441 |
+
if (e.target.closest('.editable') || e.target.closest('.edit-action-btn')) return;
|
| 442 |
+
|
| 443 |
+
const content = card.querySelector('.collapse-content');
|
| 444 |
+
const icon = card.querySelector('.toggle-icon');
|
| 445 |
+
content.classList.toggle('open');
|
| 446 |
+
icon.textContent = content.classList.contains('open') ? 'expand_less' : 'expand_more';
|
| 447 |
+
});
|
| 448 |
+
|
| 449 |
+
// Contenu (Tableau d'informations de l'Issue)
|
| 450 |
+
const content = document.createElement('div');
|
| 451 |
+
content.className = 'collapse-content border-t border-color-var/50';
|
| 452 |
+
|
| 453 |
+
// Truncated Description for the main view inside the collapsed card
|
| 454 |
+
const displayDescription = truncateText(issue.description || 'Aucune description fournie.', 200);
|
| 455 |
+
|
| 456 |
+
content.innerHTML = `
|
| 457 |
+
<div class="issue-card-content p-4 bg-page-var rounded-b-lg">
|
| 458 |
+
<p class="text-sm text-color-var font-medium mb-3">Description:</p>
|
| 459 |
+
<div class="description-view p-3 mb-4 bg-active-var border border-color-var rounded-lg text-secondary-var text-sm whitespace-pre-wrap cursor-pointer hover:bg-active-var/70 editable"
|
| 460 |
+
data-edit-field="description" data-original-value="${issue.description || 'Aucune description fournie.'}">
|
| 461 |
+
${displayDescription}
|
| 462 |
+
</div>
|
| 463 |
+
|
| 464 |
+
<div class="overflow-x-auto">
|
| 465 |
+
<table class="w-full text-sm text-left text-color-var bg-card-var border border-color-var rounded-lg">
|
| 466 |
+
<thead class="text-xs text-secondary-var uppercase bg-header-var">
|
| 467 |
+
<tr>
|
| 468 |
+
<th scope="col" class="px-3 py-2 font-medium">Champ</th>
|
| 469 |
+
<th scope="col" class="px-3 py-2 font-medium">Valeur</th>
|
| 470 |
+
</tr>
|
| 471 |
+
</thead>
|
| 472 |
+
<tbody>
|
| 473 |
+
<tr class="border-b border-color-var/50">
|
| 474 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">ID</td>
|
| 475 |
+
<td class="px-3 py-2">${issue.issue_id}</td>
|
| 476 |
+
</tr>
|
| 477 |
+
<tr class="border-b border-color-var/50 bg-active-var">
|
| 478 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">Statut</td>
|
| 479 |
+
<td class="px-3 py-2 font-semibold ${issue.status === 'Open' ? 'text-primary-color-var' : 'text-secondary-var'} cursor-pointer hover:underline editable"
|
| 480 |
+
data-edit-field="status" data-original-value="${issue.status}">
|
| 481 |
+
${issue.status}
|
| 482 |
+
</td>
|
| 483 |
+
</tr>
|
| 484 |
+
<tr class="border-b border-color-var/50">
|
| 485 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">Créateur</td>
|
| 486 |
+
<td class="px-3 py-2">${issue.creator_id || 'N/A'}</td>
|
| 487 |
+
</tr>
|
| 488 |
+
<tr class="border-b border-color-var/50 bg-active-var">
|
| 489 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">Assigné à</td>
|
| 490 |
+
<td class="px-3 py-2 cursor-pointer hover:underline editable"
|
| 491 |
+
data-edit-field="assigned_to" data-original-value="${issue.assigned_to || ''}">
|
| 492 |
+
${issue.assigned_to || 'Non assigné'}
|
| 493 |
+
</td>
|
| 494 |
+
</tr>
|
| 495 |
+
<tr class="border-b border-color-var/50">
|
| 496 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">Labels</td>
|
| 497 |
+
<td class="px-3 py-2 cursor-pointer hover:underline editable"
|
| 498 |
+
data-edit-field="labels" data-original-value="${issue.labels.join(', ')}">
|
| 499 |
+
${truncateText(issue.labels.length > 0 ? issue.labels.join(', ') : 'Aucun label', 50)}
|
| 500 |
+
</td>
|
| 501 |
+
</tr>
|
| 502 |
+
<tr class="border-b border-color-var/50">
|
| 503 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">Créé le</td>
|
| 504 |
+
<td class="px-3 py-2">${formatDate(issue.created_at)}</td>
|
| 505 |
+
</tr>
|
| 506 |
+
<tr class="bg-active-var">
|
| 507 |
+
<td class="px-3 py-2 font-medium whitespace-nowrap">Mis à jour le</td>
|
| 508 |
+
<td class="px-3 py-2">${formatDate(issue.updated_at)}</td>
|
| 509 |
+
</tr>
|
| 510 |
+
</tbody>
|
| 511 |
+
</table>
|
| 512 |
+
</div>
|
| 513 |
+
|
| 514 |
+
<div class="edit-actions mt-4 flex justify-end space-x-3 hidden">
|
| 515 |
+
<button class="edit-action-btn cancel-btn px-4 py-2 text-sm font-semibold border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 516 |
+
Cancel
|
| 517 |
+
</button>
|
| 518 |
+
<button class="edit-action-btn save-btn px-4 py-2 text-sm font-semibold bg-primary-color-var text-white rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 519 |
+
Save
|
| 520 |
+
</button>
|
| 521 |
+
</div>
|
| 522 |
+
|
| 523 |
+
<div class="view-details mt-4 text-right">
|
| 524 |
+
<a href="/mindus/nexus/issue_details/${issue.issue_id}?repo_slug=${issue.repo_slug}" class="text-link-var hover:underline text-sm font-medium">Voir les détails & commentaires</a>
|
| 525 |
+
</div>
|
| 526 |
+
</div>
|
| 527 |
+
`;
|
| 528 |
+
|
| 529 |
+
card.appendChild(header);
|
| 530 |
+
card.appendChild(content);
|
| 531 |
+
return card;
|
| 532 |
+
}
|
| 533 |
+
|
| 534 |
+
|
| 535 |
+
// --- ISSUE LISTING LOGIC ---
|
| 536 |
+
|
| 537 |
+
async function loadIssues() {
|
| 538 |
+
const repoSlug = getRepoSlug();
|
| 539 |
+
|
| 540 |
+
loadingIndicator.classList.remove('hidden');
|
| 541 |
+
welcomeMessage.classList.add('hidden');
|
| 542 |
+
issuesListContainer.classList.add('hidden');
|
| 543 |
+
|
| 544 |
+
try {
|
| 545 |
+
const apiUrl = `/api/issue/list_by_repo?repo_slug=${repoSlug}`;
|
| 546 |
+
const response = await fetch(apiUrl, {
|
| 547 |
+
method: 'GET',
|
| 548 |
+
headers: { 'Content-Type': 'application/json' }
|
| 549 |
+
});
|
| 550 |
+
|
| 551 |
+
if (!response.ok) {
|
| 552 |
+
throw new Error(`Erreur HTTP: ${response.status}`);
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
const result = await response.json();
|
| 556 |
+
|
| 557 |
+
if (result.success && result.issues && Array.isArray(result.issues)) {
|
| 558 |
+
ALL_ISSUES = result.issues; // Stocker les issues globalement
|
| 559 |
+
const issues = result.issues;
|
| 560 |
+
|
| 561 |
+
issueCountNav.textContent = issues.length;
|
| 562 |
+
updateCommentSelect(issues); // Mettre à jour la liste déroulante des commentaires
|
| 563 |
+
|
| 564 |
+
if (issues.length === 0) {
|
| 565 |
+
welcomeMessage.classList.remove('hidden');
|
| 566 |
+
issuesListContainer.classList.add('hidden');
|
| 567 |
+
commentFormArea.classList.add('hidden'); // Cacher le formulaire de commentaire s'il n'y a pas d'issues
|
| 568 |
+
} else {
|
| 569 |
+
issuesListContainer.innerHTML = '';
|
| 570 |
+
issues.forEach(issue => {
|
| 571 |
+
issuesListContainer.appendChild(createIssueCard(issue));
|
| 572 |
+
});
|
| 573 |
+
welcomeMessage.classList.add('hidden');
|
| 574 |
+
issuesListContainer.classList.remove('hidden');
|
| 575 |
+
}
|
| 576 |
+
} else {
|
| 577 |
+
console.error("Erreur API:", result.message);
|
| 578 |
+
issueCountNav.textContent = '0';
|
| 579 |
+
welcomeMessage.classList.remove('hidden');
|
| 580 |
+
}
|
| 581 |
+
|
| 582 |
+
} catch (error) {
|
| 583 |
+
console.error("Échec du chargement des Issues:", error);
|
| 584 |
+
issueCountNav.textContent = '0';
|
| 585 |
+
welcomeMessage.classList.remove('hidden');
|
| 586 |
+
} finally {
|
| 587 |
+
loadingIndicator.classList.add('hidden');
|
| 588 |
+
}
|
| 589 |
+
}
|
| 590 |
+
|
| 591 |
+
// --- IN-LINE EDITING LOGIC ---
|
| 592 |
+
|
| 593 |
+
function startInlineEdit(targetElement) {
|
| 594 |
+
if (currentEditingIssueId) {
|
| 595 |
+
alert('Veuillez sauvegarder ou annuler l\'édition en cours.');
|
| 596 |
+
return;
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
const card = targetElement.closest('.issue-card');
|
| 600 |
+
const issueId = card.getAttribute('data-issue-id');
|
| 601 |
+
const fieldKey = targetElement.getAttribute('data-edit-field');
|
| 602 |
+
const originalValue = targetElement.getAttribute('data-original-value');
|
| 603 |
+
|
| 604 |
+
currentEditingIssueId = issueId;
|
| 605 |
+
|
| 606 |
+
// 1. Ouvrir la carte (si elle est fermée)
|
| 607 |
+
card.querySelector('.collapse-content').classList.add('open');
|
| 608 |
+
card.querySelector('.toggle-icon').textContent = 'expand_less';
|
| 609 |
+
|
| 610 |
+
// 2. Afficher les boutons Save/Cancel
|
| 611 |
+
card.querySelector('.edit-actions').classList.remove('hidden');
|
| 612 |
+
card.querySelector('.view-details').classList.add('hidden');
|
| 613 |
+
|
| 614 |
+
// 3. Remplacer l'élément cliqué par le champ de saisie
|
| 615 |
+
let inputElement;
|
| 616 |
+
|
| 617 |
+
if (fieldKey === 'status') {
|
| 618 |
+
inputElement = document.createElement('select');
|
| 619 |
+
inputElement.className = 'w-full p-2 border border-color-var bg-page-var rounded-lg text-color-var editable-field-input';
|
| 620 |
+
inputElement.innerHTML = `
|
| 621 |
+
<option value="Open" ${originalValue === 'Open' ? 'selected' : ''}>Open</option>
|
| 622 |
+
<option value="Closed" ${originalValue === 'Closed' ? 'selected' : ''}>Closed</option>
|
| 623 |
+
`;
|
| 624 |
+
// Le statut est un champ de tableau, il remplace directement l'intérieur du <td>
|
| 625 |
+
targetElement.innerHTML = '';
|
| 626 |
+
targetElement.appendChild(inputElement);
|
| 627 |
+
} else {
|
| 628 |
+
inputElement = document.createElement('textarea');
|
| 629 |
+
inputElement.value = originalValue;
|
| 630 |
+
inputElement.className = 'w-full p-3 border border-color-var bg-page-var rounded-lg text-color-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var editable-field-input';
|
| 631 |
+
|
| 632 |
+
if (fieldKey === 'title') {
|
| 633 |
+
inputElement.rows = 2;
|
| 634 |
+
targetElement.textContent = ''; // Vider le <span>
|
| 635 |
+
targetElement.appendChild(inputElement); // Remplacer le titre dans le H3
|
| 636 |
+
} else if (fieldKey === 'description') {
|
| 637 |
+
inputElement.rows = 6;
|
| 638 |
+
// Remplacer le div de description par le textarea
|
| 639 |
+
targetElement.style.display = 'none';
|
| 640 |
+
inputElement.setAttribute('data-original-value', originalValue); // Pour le retrouver au save/cancel
|
| 641 |
+
card.querySelector('.issue-card-content').insertBefore(inputElement, targetElement.nextSibling);
|
| 642 |
+
|
| 643 |
+
} else {
|
| 644 |
+
inputElement.rows = 2;
|
| 645 |
+
// Pour les champs Assigné à et Labels dans le tableau, on remplace le contenu du <td>
|
| 646 |
+
targetElement.textContent = '';
|
| 647 |
+
targetElement.appendChild(inputElement);
|
| 648 |
+
}
|
| 649 |
+
|
| 650 |
+
if (fieldKey === 'labels') {
|
| 651 |
+
inputElement.placeholder = 'Enter labels separated by comma (e.g., bug, frontend, priority)';
|
| 652 |
+
} else if (fieldKey === 'assigned_to') {
|
| 653 |
+
inputElement.placeholder = 'Enter the user ID or name...';
|
| 654 |
+
}
|
| 655 |
+
}
|
| 656 |
+
|
| 657 |
+
// Cacher l'élément d'origine si on a créé un nouvel élément (comme pour la description)
|
| 658 |
+
if (fieldKey !== 'status' && fieldKey !== 'title' && targetElement.tagName === 'TD') {
|
| 659 |
+
targetElement.style.display = 'none';
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
inputElement.focus();
|
| 663 |
+
|
| 664 |
+
// Attacher les listeners aux boutons d'action (Save/Cancel)
|
| 665 |
+
card.querySelector('.save-btn').onclick = () => saveInlineUpdate(issueId, fieldKey, inputElement, targetElement);
|
| 666 |
+
card.querySelector('.cancel-btn').onclick = () => cancelInlineEdit(issueId, fieldKey, originalValue, inputElement, targetElement);
|
| 667 |
+
}
|
| 668 |
+
|
| 669 |
+
function cancelInlineEdit(issueId, fieldKey, originalValue, inputElement, targetElement) {
|
| 670 |
+
const card = document.querySelector(`.issue-card[data-issue-id="${issueId}"]`);
|
| 671 |
+
|
| 672 |
+
// 1. Restaurer l'affichage du champ
|
| 673 |
+
if (fieldKey === 'title') {
|
| 674 |
+
targetElement.innerHTML = truncateText(originalValue, 80);
|
| 675 |
+
} else if (fieldKey === 'description') {
|
| 676 |
+
inputElement.remove(); // Supprimer le textarea
|
| 677 |
+
targetElement.style.display = 'block'; // Réafficher le div de description
|
| 678 |
+
} else if (fieldKey === 'status') {
|
| 679 |
+
targetElement.innerHTML = originalValue; // Restaurer le texte du statut
|
| 680 |
+
} else { // assigned_to, labels
|
| 681 |
+
targetElement.innerHTML = truncateText(originalValue, fieldKey === 'labels' ? 50 : 80);
|
| 682 |
+
}
|
| 683 |
+
|
| 684 |
+
if (fieldKey !== 'description') {
|
| 685 |
+
if (inputElement && inputElement.tagName !== 'TD') { // Pour le titre et les champs de tableau qui contiennent l'input
|
| 686 |
+
if (targetElement.tagName === 'TD' || targetElement.tagName === 'SPAN') {
|
| 687 |
+
// Supprimer l'élément input/select si on l'a inséré
|
| 688 |
+
targetElement.removeChild(inputElement);
|
| 689 |
+
}
|
| 690 |
+
}
|
| 691 |
+
if (targetElement.tagName === 'TD') {
|
| 692 |
+
targetElement.style.display = ''; // Rendre le <td> visible à nouveau
|
| 693 |
+
}
|
| 694 |
+
if (fieldKey !== 'status' && fieldKey !== 'title') {
|
| 695 |
+
targetElement.style.display = ''; // Rendre le <td> visible à nouveau
|
| 696 |
+
}
|
| 697 |
+
}
|
| 698 |
+
|
| 699 |
+
// 2. Cacher les boutons Save/Cancel
|
| 700 |
+
card.querySelector('.edit-actions').classList.add('hidden');
|
| 701 |
+
card.querySelector('.view-details').classList.remove('hidden');
|
| 702 |
+
|
| 703 |
+
currentEditingIssueId = null;
|
| 704 |
+
}
|
| 705 |
+
|
| 706 |
+
|
| 707 |
+
async function saveInlineUpdate(issueId, fieldKey, inputElement, targetElement) {
|
| 708 |
+
const repoSlug = getRepoSlug();
|
| 709 |
+
let newValue;
|
| 710 |
+
|
| 711 |
+
if (fieldKey === 'status') {
|
| 712 |
+
newValue = inputElement.value;
|
| 713 |
+
} else if (fieldKey === 'labels') {
|
| 714 |
+
// Convertir la chaîne de labels séparés par des virgules en tableau
|
| 715 |
+
newValue = inputElement.value.split(',').map(s => s.trim()).filter(s => s.length > 0);
|
| 716 |
+
} else {
|
| 717 |
+
newValue = inputElement.value;
|
| 718 |
+
}
|
| 719 |
+
|
| 720 |
+
if (!newValue && fieldKey !== 'assigned_to') {
|
| 721 |
+
alert(`Le champ ${fieldKey} ne peut être vide.`);
|
| 722 |
+
return;
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
const updates = { [fieldKey]: newValue };
|
| 726 |
+
|
| 727 |
+
try {
|
| 728 |
+
// ✅ CORRECTION : Encodage du repoSlug pour gérer le caractère '/'
|
| 729 |
+
const encodedRepoSlug = encodeURIComponent(repoSlug);
|
| 730 |
+
const apiUrl = `/api/issue/update/${encodedRepoSlug}/${issueId}`;
|
| 731 |
+
|
| 732 |
+
const response = await fetch(apiUrl, {
|
| 733 |
+
method: 'PUT',
|
| 734 |
+
headers: { 'Content-Type': 'application/json' },
|
| 735 |
+
body: JSON.stringify(updates)
|
| 736 |
+
});
|
| 737 |
+
|
| 738 |
+
const result = await response.json();
|
| 739 |
+
|
| 740 |
+
if (result.success) {
|
| 741 |
+
alert('Mise à jour réussie !');
|
| 742 |
+
// Réinitialiser le mode édition et recharger les issues pour l'affichage
|
| 743 |
+
currentEditingIssueId = null;
|
| 744 |
+
loadIssues();
|
| 745 |
+
} else {
|
| 746 |
+
alert(`Échec de la mise à jour: ${result.message}`);
|
| 747 |
+
}
|
| 748 |
+
|
| 749 |
+
} catch (error) {
|
| 750 |
+
console.error("Échec de l'appel API UPDATE:", error);
|
| 751 |
+
alert("Erreur lors de la communication avec le serveur.");
|
| 752 |
+
}
|
| 753 |
+
}
|
| 754 |
+
|
| 755 |
+
|
| 756 |
+
// --- COMMENT FORM LOGIC ---
|
| 757 |
+
|
| 758 |
+
function updateCommentSelect(issues) {
|
| 759 |
+
commentIssueSelect.innerHTML = '';
|
| 760 |
+
if (issues.length === 0) {
|
| 761 |
+
commentIssueSelect.innerHTML = '<option value="">No active issues</option>';
|
| 762 |
+
commentIssueSelect.disabled = true;
|
| 763 |
+
submitCommentFormBtn.disabled = true;
|
| 764 |
+
return;
|
| 765 |
+
}
|
| 766 |
+
issues.forEach(issue => {
|
| 767 |
+
const option = document.createElement('option');
|
| 768 |
+
option.value = issue.issue_id;
|
| 769 |
+
option.textContent = `#${truncateText(issue.issue_id.substring(0, 8), 8)} - ${truncateText(issue.title, 60)}`;
|
| 770 |
+
commentIssueSelect.appendChild(option);
|
| 771 |
+
});
|
| 772 |
+
commentIssueSelect.disabled = false;
|
| 773 |
+
submitCommentFormBtn.disabled = false;
|
| 774 |
+
}
|
| 775 |
+
|
| 776 |
+
function toggleCommentForm() {
|
| 777 |
+
if (ALL_ISSUES.length === 0) {
|
| 778 |
+
alert("Veuillez créer une Issue avant d'ajouter un commentaire.");
|
| 779 |
+
return;
|
| 780 |
+
}
|
| 781 |
+
commentFormArea.classList.toggle('hidden');
|
| 782 |
+
}
|
| 783 |
+
|
| 784 |
+
async function postComment() {
|
| 785 |
+
const issueId = commentIssueSelect.value;
|
| 786 |
+
const repoSlug = getRepoSlug();
|
| 787 |
+
const content = commentModalTextarea.value.trim();
|
| 788 |
+
|
| 789 |
+
if (!issueId) {
|
| 790 |
+
alert('Veuillez sélectionner une Issue.');
|
| 791 |
+
return;
|
| 792 |
+
}
|
| 793 |
+
if (content.length === 0) {
|
| 794 |
+
alert('Le contenu du commentaire ne peut être vide.');
|
| 795 |
+
return;
|
| 796 |
+
}
|
| 797 |
+
|
| 798 |
+
try {
|
| 799 |
+
const apiUrl = `/api/issue/comment/${repoSlug}/${issueId}`;
|
| 800 |
+
const response = await fetch(apiUrl, {
|
| 801 |
+
method: 'POST',
|
| 802 |
+
headers: { 'Content-Type': 'application/json' },
|
| 803 |
+
body: JSON.stringify({ content: content })
|
| 804 |
+
});
|
| 805 |
+
|
| 806 |
+
const result = await response.json();
|
| 807 |
+
|
| 808 |
+
if (result.success) {
|
| 809 |
+
alert('Commentaire ajouté avec succès !');
|
| 810 |
+
commentFormArea.classList.add('hidden'); // Cacher le formulaire
|
| 811 |
+
commentModalTextarea.value = ''; // Réinitialiser le champ
|
| 812 |
+
loadIssues(); // Recharger la liste
|
| 813 |
+
} else {
|
| 814 |
+
alert(`Échec de l'ajout du commentaire: ${result.message}`);
|
| 815 |
+
}
|
| 816 |
+
|
| 817 |
+
} catch (error) {
|
| 818 |
+
console.error("Échec de l'appel API COMMENT:", error);
|
| 819 |
+
alert("Erreur lors de la communication avec le serveur.");
|
| 820 |
+
}
|
| 821 |
+
}
|
| 822 |
+
|
| 823 |
+
|
| 824 |
+
// --- EVENT LISTENERS ---
|
| 825 |
+
|
| 826 |
+
// Comment Form Listeners
|
| 827 |
+
addCommentBtn.addEventListener('click', toggleCommentForm);
|
| 828 |
+
cancelCommentFormBtn.addEventListener('click', toggleCommentForm);
|
| 829 |
+
submitCommentFormBtn.addEventListener('click', postComment);
|
| 830 |
+
|
| 831 |
+
// Event Delegation for Editable Fields
|
| 832 |
+
issuesListContainer.addEventListener('click', (e) => {
|
| 833 |
+
const editableField = e.target.closest('.editable');
|
| 834 |
+
if (editableField) {
|
| 835 |
+
startInlineEdit(editableField);
|
| 836 |
+
}
|
| 837 |
+
});
|
| 838 |
+
|
| 839 |
+
// --- INITIALIZATION ---
|
| 840 |
+
|
| 841 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 842 |
+
// Exécuter le chargement des Issues au chargement de la page
|
| 843 |
+
loadIssues();
|
| 844 |
+
|
| 845 |
+
// Initialiser les liens "New issue" avec le repo_slug
|
| 846 |
+
const repoSlug = getRepoSlug();
|
| 847 |
+
document.getElementById('new-issue-btn-top').href = `/mindus/nexus/create_new_issue?repo_slug=${repoSlug}`;
|
| 848 |
+
document.getElementById('new-issue-link-welcome').href = `/mindus/nexus/create_new_issue?repo_slug=${repoSlug}`;
|
| 849 |
+
});
|
| 850 |
+
|
| 851 |
+
</script>
|
| 852 |
+
</body>
|
| 853 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/new_pull_requests.html
ADDED
|
@@ -0,0 +1,632 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Compare Changes</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 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 |
+
/* Inter Font Configuration */
|
| 14 |
+
body { font-family: 'Inter', sans-serif; }
|
| 15 |
+
|
| 16 |
+
/* Theme Variables and Transitions (Light Mode) */
|
| 17 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 18 |
+
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E; /* Green button */
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
--bg-warning: #FFF8C5; /* Yellow warning banner */
|
| 31 |
+
--border-warning: #E2B200;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
/* Utility classes for theme variables */
|
| 35 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 36 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 37 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 38 |
+
.text-link-var { color: var(--text-link); }
|
| 39 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 40 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 41 |
+
.focus\:ring-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 42 |
+
|
| 43 |
+
/* Repository Navigation Link Styles */
|
| 44 |
+
.repo-nav-link {
|
| 45 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 46 |
+
margin-right: 0.5rem;
|
| 47 |
+
white-space: nowrap; /* Prevents wrapping in the horizontal nav */
|
| 48 |
+
}
|
| 49 |
+
.repo-nav-link.active {
|
| 50 |
+
border-bottom-color: #F78166; /* Vibrant orange/red for active tab */
|
| 51 |
+
color: var(--text-color) !important;
|
| 52 |
+
font-weight: 600;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/* Sidebar Styles (identical to previous file) */
|
| 56 |
+
#sidebar {
|
| 57 |
+
position: fixed;
|
| 58 |
+
top: 0;
|
| 59 |
+
left: 0;
|
| 60 |
+
width: 300px;
|
| 61 |
+
height: 100%;
|
| 62 |
+
background-color: var(--bg-card);
|
| 63 |
+
transform: translateX(-100%);
|
| 64 |
+
transition: transform 0.3s ease-in-out;
|
| 65 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 66 |
+
z-index: 100;
|
| 67 |
+
}
|
| 68 |
+
#sidebar.open {
|
| 69 |
+
transform: translateX(0);
|
| 70 |
+
}
|
| 71 |
+
#overlay {
|
| 72 |
+
position: fixed;
|
| 73 |
+
top: 0;
|
| 74 |
+
left: 0;
|
| 75 |
+
width: 100%;
|
| 76 |
+
height: 100%;
|
| 77 |
+
background: rgba(0, 0, 0, 0.5);
|
| 78 |
+
z-index: 90;
|
| 79 |
+
display: none;
|
| 80 |
+
}
|
| 81 |
+
#overlay.open {
|
| 82 |
+
display: block;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
/* Branch Dropdown Card Styles */
|
| 86 |
+
.dropdown-card {
|
| 87 |
+
position: absolute;
|
| 88 |
+
top: 100%; /* Position below the button */
|
| 89 |
+
left: 0;
|
| 90 |
+
width: 300px;
|
| 91 |
+
background-color: var(--bg-card);
|
| 92 |
+
border: 1px solid var(--border-color);
|
| 93 |
+
border-radius: 0.5rem;
|
| 94 |
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
| 95 |
+
z-index: 50;
|
| 96 |
+
display: none;
|
| 97 |
+
overflow: hidden;
|
| 98 |
+
max-height: 400px; /* Limite la hauteur du dropdown */
|
| 99 |
+
}
|
| 100 |
+
.dropdown-card.open {
|
| 101 |
+
display: block;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
/* NOUVEAUX STYLES: Spinner */
|
| 105 |
+
.spinner {
|
| 106 |
+
border: 4px solid var(--border-color);
|
| 107 |
+
border-top: 4px solid var(--text-link); /* Couleur du spinner */
|
| 108 |
+
border-radius: 50%;
|
| 109 |
+
width: 20px;
|
| 110 |
+
height: 20px;
|
| 111 |
+
animation: spin 1s linear infinite;
|
| 112 |
+
}
|
| 113 |
+
.spinner-large {
|
| 114 |
+
width: 30px;
|
| 115 |
+
height: 30px;
|
| 116 |
+
}
|
| 117 |
+
@keyframes spin {
|
| 118 |
+
0% { transform: rotate(0deg); }
|
| 119 |
+
100% { transform: rotate(360deg); }
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
/* Scrollbar pour la liste des branches dans le dropdown */
|
| 123 |
+
.dropdown-content-scroll {
|
| 124 |
+
max-height: 300px;
|
| 125 |
+
overflow-y: auto;
|
| 126 |
+
}
|
| 127 |
+
</style>
|
| 128 |
+
</head>
|
| 129 |
+
|
| 130 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 131 |
+
|
| 132 |
+
<div id="overlay"></div>
|
| 133 |
+
|
| 134 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 135 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 136 |
+
<i data-lucide="git-fork" class="text-3xl text-link-var"></i>
|
| 137 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 138 |
+
<i data-lucide="x" class="text-2xl"></i>
|
| 139 |
+
</button>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<nav class="space-y-1">
|
| 143 |
+
<a href="/mindus/nexus/dashboard?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 144 |
+
<i data-lucide="home" class="w-5 h-5 mr-3"></i> Home
|
| 145 |
+
</a>
|
| 146 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 147 |
+
<i data-lucide="alert-circle" class="w-5 h-5 mr-3"></i> Issues
|
| 148 |
+
</a>
|
| 149 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg bg-active-var transition-colors-theme font-semibold text-link-var">
|
| 150 |
+
<i data-lucide="git-pull-request" class="w-5 h-5 mr-3"></i> Pull requests
|
| 151 |
+
</a>
|
| 152 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 153 |
+
<i data-lucide="layout-grid" class="w-5 h-5 mr-3"></i> Projects
|
| 154 |
+
</a>
|
| 155 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 156 |
+
<i data-lucide="message-square" class="w-5 h-5 mr-3"></i> Discussions
|
| 157 |
+
</a>
|
| 158 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 159 |
+
<i data-lucide="code" class="w-5 h-5 mr-3"></i> Codespaces
|
| 160 |
+
</a>
|
| 161 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 162 |
+
<i data-lucide="cpu" class="w-5 h-5 mr-3"></i> Copilot
|
| 163 |
+
</a>
|
| 164 |
+
</nav>
|
| 165 |
+
|
| 166 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 167 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 168 |
+
<i data-lucide="compass" class="w-5 h-5 mr-3"></i> Explore
|
| 169 |
+
</a>
|
| 170 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 171 |
+
<i data-lucide="store" class="w-5 h-5 mr-3"></i> Marketplace
|
| 172 |
+
</a>
|
| 173 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 174 |
+
<i data-lucide="link" class="w-5 h-5 mr-3"></i> MCP registry
|
| 175 |
+
</a>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 181 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 182 |
+
<div class="flex justify-between items-center h-16">
|
| 183 |
+
|
| 184 |
+
<div class="flex items-center space-x-4">
|
| 185 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 186 |
+
<i data-lucide="menu" class="w-6 h-6"></i>
|
| 187 |
+
</button>
|
| 188 |
+
|
| 189 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 190 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 191 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 192 |
+
<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>
|
| 193 |
+
<i data-lucide="lock" class="w-4 h-4 ml-2 text-secondary-var"></i>
|
| 194 |
+
</a>
|
| 195 |
+
</div>
|
| 196 |
+
|
| 197 |
+
<div class="flex items-center space-x-3">
|
| 198 |
+
<div class="hidden sm:block">
|
| 199 |
+
<input type="text" placeholder="Type / to search"
|
| 200 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 201 |
+
</div>
|
| 202 |
+
<a href="/mindus/nexus/notentification?repo_slug={{ repo_slug }}" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 203 |
+
<i data-lucide="bell" class="w-5 h-5"></i>
|
| 204 |
+
</a>
|
| 205 |
+
<a href="/mindus/nexus/nouveau_project?repo_slug={{ repo_slug }}" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 206 |
+
<i data-lucide="plus" class="w-5 h-5"></i>
|
| 207 |
+
</a>
|
| 208 |
+
<a href="/mindus/nexus/profile?repo_slug={{ repo_slug }}" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 209 |
+
<i data-lucide="user-circle" class="w-5 h-5"></i>
|
| 210 |
+
</a>
|
| 211 |
+
</div>
|
| 212 |
+
</div>
|
| 213 |
+
</div>
|
| 214 |
+
|
| 215 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 216 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 217 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 218 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 219 |
+
<i data-lucide="code" class="w-4 h-4 mr-1"></i> Code
|
| 220 |
+
</a>
|
| 221 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 222 |
+
<i data-lucide="alert-circle" class="w-4 h-4 mr-1"></i> Issues
|
| 223 |
+
</a>
|
| 224 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 225 |
+
<i data-lucide="git-pull-request" class="w-4 h-4 mr-1"></i> Pull requests
|
| 226 |
+
</a>
|
| 227 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 228 |
+
<i data-lucide="check-square" class="w-4 h-4 mr-1"></i> Actions
|
| 229 |
+
</a>
|
| 230 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 231 |
+
<i data-lucide="box" class="w-4 h-4 mr-1"></i> Projects
|
| 232 |
+
</a>
|
| 233 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 234 |
+
<i data-lucide="shield" class="w-4 h-4 mr-1"></i> Security
|
| 235 |
+
</a>
|
| 236 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 237 |
+
<i data-lucide="trending-up" class="w-4 h-4 mr-1"></i> Insights
|
| 238 |
+
</a>
|
| 239 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 240 |
+
<i data-lucide="settings" class="w-4 h-4 mr-1"></i> Settings
|
| 241 |
+
</a>
|
| 242 |
+
</nav>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
</header>
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 249 |
+
|
| 250 |
+
<h1 class="text-3xl font-semibold text-color-var mb-2">Compare changes</h1>
|
| 251 |
+
<p class="text-secondary-var mb-6 text-sm">
|
| 252 |
+
Compare changes across branches, commits, tags, and more below. If you need to, you can also
|
| 253 |
+
<a href="#" class="text-link-var hover:underline">compare across forks</a>.
|
| 254 |
+
</p>
|
| 255 |
+
|
| 256 |
+
<div class="p-4 border border-color-var rounded-xl bg-active-var/50 mb-6">
|
| 257 |
+
<div class="flex items-center space-x-2 relative">
|
| 258 |
+
|
| 259 |
+
<div class="relative inline-block" id="base-branch-container">
|
| 260 |
+
<button id="base-branch-button" data-branch-type="base" class="branch-dropdown-button flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme font-semibold">
|
| 261 |
+
<i data-lucide="git-branch" class="w-4 h-4 mr-1 text-secondary-var"></i> base: <span id="base-branch-name" class="ml-1 text-link-var">main</span>
|
| 262 |
+
<i data-lucide="chevron-down" class="w-4 h-4 ml-1"></i>
|
| 263 |
+
</button>
|
| 264 |
+
|
| 265 |
+
<div id="base-dropdown-card" class="dropdown-card">
|
| 266 |
+
<div class="p-3 border-b border-color-var/50 flex justify-between items-center">
|
| 267 |
+
<span class="text-sm font-semibold">Choose a base ref</span>
|
| 268 |
+
<button class="text-secondary-var hover:text-color-var" onclick="closeDropdown('base')">
|
| 269 |
+
<i data-lucide="x" class="w-4 h-4"></i>
|
| 270 |
+
</button>
|
| 271 |
+
</div>
|
| 272 |
+
<div class="p-2">
|
| 273 |
+
<input type="text" placeholder="Find a branch" id="base-branch-search"
|
| 274 |
+
class="w-full p-2 text-sm rounded-lg border border-color-var bg-page-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var mb-2">
|
| 275 |
+
<div class="flex border-b border-color-var/50 text-sm mb-2">
|
| 276 |
+
<button class="py-1 px-3 border-b-2 border-link-var text-link-var font-semibold">Branches</button>
|
| 277 |
+
<button class="py-1 px-3 text-secondary-var hover:text-color-var">Tags</button>
|
| 278 |
+
</div>
|
| 279 |
+
<div id="base-branch-list" class="dropdown-content-scroll">
|
| 280 |
+
<div class="flex justify-center py-4">
|
| 281 |
+
<div class="spinner"></div> </div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
</div>
|
| 286 |
+
|
| 287 |
+
<i data-lucide="arrow-left-right" class="w-4 h-4 text-secondary-var"></i>
|
| 288 |
+
|
| 289 |
+
<div class="relative inline-block" id="compare-branch-container">
|
| 290 |
+
<button id="compare-branch-button" data-branch-type="compare" class="branch-dropdown-button flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme font-semibold">
|
| 291 |
+
<i data-lucide="git-branch" class="w-4 h-4 mr-1 text-secondary-var"></i> compare: <span id="compare-branch-name" class="ml-1 text-link-var">main</span>
|
| 292 |
+
<i data-lucide="chevron-down" class="w-4 h-4 ml-1"></i>
|
| 293 |
+
</button>
|
| 294 |
+
|
| 295 |
+
<div id="compare-dropdown-card" class="dropdown-card">
|
| 296 |
+
<div class="p-3 border-b border-color-var/50 flex justify-between items-center">
|
| 297 |
+
<span class="text-sm font-semibold">Choose a head ref</span>
|
| 298 |
+
<button class="text-secondary-var hover:text-color-var" onclick="closeDropdown('compare')">
|
| 299 |
+
<i data-lucide="x" class="w-4 h-4"></i>
|
| 300 |
+
</button>
|
| 301 |
+
</div>
|
| 302 |
+
<div class="p-2">
|
| 303 |
+
<input type="text" placeholder="Find a branch" id="compare-branch-search"
|
| 304 |
+
class="w-full p-2 text-sm rounded-lg border border-color-var bg-page-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var mb-2">
|
| 305 |
+
<div class="flex border-b border-color-var/50 text-sm mb-2">
|
| 306 |
+
<button class="py-1 px-3 border-b-2 border-link-var text-link-var font-semibold">Branches</button>
|
| 307 |
+
<button class="py-1 px-3 text-secondary-var hover:text-color-var">Tags</button>
|
| 308 |
+
</div>
|
| 309 |
+
<div id="compare-branch-list" class="dropdown-content-scroll">
|
| 310 |
+
<div class="flex justify-center py-4">
|
| 311 |
+
<div class="spinner"></div> </div>
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
</div>
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
</div>
|
| 318 |
+
</div>
|
| 319 |
+
|
| 320 |
+
<div id="pr-creation-banner" class="p-4 flex flex-col sm:flex-row justify-between items-start sm:items-center rounded-lg border border-border-warning bg-bg-warning mb-12 space-y-3 sm:space-y-0">
|
| 321 |
+
<p id="pr-banner-message" class="text-color-var text-sm">
|
| 322 |
+
Choose different branches or forks above to discuss and review changes.
|
| 323 |
+
<a href="#" class="text-link-var hover:underline font-medium">Learn about pull requests</a>.
|
| 324 |
+
</p>
|
| 325 |
+
<button id="create-pr-button" class="inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap w-full sm:w-auto">
|
| 326 |
+
Create pull request
|
| 327 |
+
</button>
|
| 328 |
+
</div>
|
| 329 |
+
|
| 330 |
+
<div id="pr-creation-spinner-overlay" class="fixed inset-0 bg-black bg-opacity-10 z-50 items-center justify-center hidden">
|
| 331 |
+
<div class="p-6 bg-card-var rounded-lg shadow-xl flex flex-col items-center">
|
| 332 |
+
<div class="spinner spinner-large mb-3"></div>
|
| 333 |
+
<p class="text-color-var font-semibold">Creating Pull Request and checking for conflicts...</p>
|
| 334 |
+
</div>
|
| 335 |
+
</div>
|
| 336 |
+
|
| 337 |
+
</main>
|
| 338 |
+
|
| 339 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 340 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 341 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 342 |
+
<i data-lucide="git-fork" class="w-5 h-5"></i>
|
| 343 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 344 |
+
</div>
|
| 345 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 346 |
+
<a href="/mindus/nexus/conditions_utilisation?repo_slug={{ repo_slug }}" class="hover:text-link-var">Terms</a>
|
| 347 |
+
<a href="/mindus/nexus/mentions_legales?repo_slug={{ repo_slug }}" class="hover:text-link-var">Privacy</a>
|
| 348 |
+
<a href="/mindus/nexus/politique_confidentialite?repo_slug={{ repo_slug }}" class="hover:text-link-var">Security</a>
|
| 349 |
+
<a href="/mindus/nexus/statut?repo_slug={{ repo_slug }}" class="hover:text-link-var">Status</a>
|
| 350 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 351 |
+
<a href="/mindus/nexus/documentation?repo_slug={{ repo_slug }}" class="hover:text-link-var">Docs</a>
|
| 352 |
+
<a href="/mindus/nexus/contact?repo_slug={{ repo_slug }}" class="hover:text-link-var">Contact</a>
|
| 353 |
+
</nav>
|
| 354 |
+
</div>
|
| 355 |
+
</footer>
|
| 356 |
+
|
| 357 |
+
<script>
|
| 358 |
+
// Variables de contexte (Jinja2)
|
| 359 |
+
const REPO_SLUG = "{{ repo_slug if repo_slug else 'mindus0/mindus' }}"; // Variable par défaut si non fournie
|
| 360 |
+
const API_BASE_URL = ""; // Assumer que les routes sont relatives (ex: /api/pr/create)
|
| 361 |
+
let BASE_BRANCH = 'main';
|
| 362 |
+
let COMPARE_BRANCH = 'main';
|
| 363 |
+
let ALL_BRANCHES = [];
|
| 364 |
+
|
| 365 |
+
// Initialiser Lucide Icons
|
| 366 |
+
lucide.createIcons();
|
| 367 |
+
|
| 368 |
+
// SIDEBAR LOGIC (inchangée)
|
| 369 |
+
const sidebar = document.getElementById('sidebar');
|
| 370 |
+
const overlay = document.getElementById('overlay');
|
| 371 |
+
const openButton = document.getElementById('open-sidebar');
|
| 372 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 373 |
+
|
| 374 |
+
const toggleSidebar = () => {
|
| 375 |
+
sidebar.classList.toggle('open');
|
| 376 |
+
overlay.classList.toggle('open');
|
| 377 |
+
};
|
| 378 |
+
|
| 379 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 380 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 381 |
+
overlay.addEventListener('click', toggleSidebar); // Close when clicking overlay
|
| 382 |
+
|
| 383 |
+
// Prevent scrolling when sidebar is open (for better mobile UX)
|
| 384 |
+
const body = document.body;
|
| 385 |
+
const observer = new MutationObserver(() => {
|
| 386 |
+
if (sidebar.classList.contains('open')) {
|
| 387 |
+
body.style.overflow = 'hidden';
|
| 388 |
+
} else {
|
| 389 |
+
body.style.overflow = '';
|
| 390 |
+
}
|
| 391 |
+
});
|
| 392 |
+
|
| 393 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 394 |
+
|
| 395 |
+
// ----------------------------------------------------------------------
|
| 396 |
+
// LOGIQUE DE GESTION DES BRANCHES & DES DROPDOWNS
|
| 397 |
+
// ----------------------------------------------------------------------
|
| 398 |
+
|
| 399 |
+
const baseButton = document.getElementById('base-branch-button');
|
| 400 |
+
const baseNameSpan = document.getElementById('base-branch-name');
|
| 401 |
+
const baseCard = document.getElementById('base-dropdown-card');
|
| 402 |
+
const baseList = document.getElementById('base-branch-list');
|
| 403 |
+
const baseSearch = document.getElementById('base-branch-search');
|
| 404 |
+
|
| 405 |
+
const compareButton = document.getElementById('compare-branch-button');
|
| 406 |
+
const compareNameSpan = document.getElementById('compare-branch-name');
|
| 407 |
+
const compareCard = document.getElementById('compare-dropdown-card');
|
| 408 |
+
const compareList = document.getElementById('compare-branch-list');
|
| 409 |
+
const compareSearch = document.getElementById('compare-branch-search');
|
| 410 |
+
|
| 411 |
+
const prBannerMessage = document.getElementById('pr-banner-message');
|
| 412 |
+
const createPrButton = document.getElementById('create-pr-button');
|
| 413 |
+
const prCreationSpinnerOverlay = document.getElementById('pr-creation-spinner-overlay');
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
/**
|
| 417 |
+
* Ferme une dropdown spécifique.
|
| 418 |
+
* @param {'base'|'compare'} type
|
| 419 |
+
*/
|
| 420 |
+
const closeDropdown = (type) => {
|
| 421 |
+
const card = type === 'base' ? baseCard : compareCard;
|
| 422 |
+
card.classList.remove('open');
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
/**
|
| 426 |
+
* Ouvre/ferme le dropdown et charge les branches si nécessaire.
|
| 427 |
+
* @param {'base'|'compare'} type
|
| 428 |
+
*/
|
| 429 |
+
const toggleDropdown = async (type) => {
|
| 430 |
+
const card = type === 'base' ? baseCard : compareCard;
|
| 431 |
+
const otherCard = type === 'base' ? compareCard : baseCard;
|
| 432 |
+
|
| 433 |
+
// Fermer l'autre carte si elle est ouverte
|
| 434 |
+
if (otherCard.classList.contains('open')) {
|
| 435 |
+
otherCard.classList.remove('open');
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
const isOpen = card.classList.toggle('open');
|
| 439 |
+
|
| 440 |
+
if (isOpen && ALL_BRANCHES.length === 0) {
|
| 441 |
+
await fetchBranches();
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
if (isOpen) {
|
| 445 |
+
renderBranchList(type, ALL_BRANCHES);
|
| 446 |
+
}
|
| 447 |
+
};
|
| 448 |
+
|
| 449 |
+
baseButton.addEventListener('click', (e) => {
|
| 450 |
+
e.stopPropagation();
|
| 451 |
+
toggleDropdown('base');
|
| 452 |
+
});
|
| 453 |
+
|
| 454 |
+
compareButton.addEventListener('click', (e) => {
|
| 455 |
+
e.stopPropagation();
|
| 456 |
+
toggleDropdown('compare');
|
| 457 |
+
});
|
| 458 |
+
|
| 459 |
+
// Fermer les dropdowns quand on clique ailleurs
|
| 460 |
+
document.addEventListener('click', (e) => {
|
| 461 |
+
if (baseCard.classList.contains('open') && !document.getElementById('base-branch-container').contains(e.target)) {
|
| 462 |
+
baseCard.classList.remove('open');
|
| 463 |
+
}
|
| 464 |
+
if (compareCard.classList.contains('open') && !document.getElementById('compare-branch-container').contains(e.target)) {
|
| 465 |
+
compareCard.classList.remove('open');
|
| 466 |
+
}
|
| 467 |
+
});
|
| 468 |
+
|
| 469 |
+
/**
|
| 470 |
+
* Simule un appel API pour charger les branches.
|
| 471 |
+
*/
|
| 472 |
+
const fetchBranches = async () => {
|
| 473 |
+
try {
|
| 474 |
+
// Données simulées pour la démo
|
| 475 |
+
await new Promise(resolve => setTimeout(resolve, 500));
|
| 476 |
+
ALL_BRANCHES = ['main', 'feature/dev-2.0', 'feature/bugfix-101', 'docs/readme-update', 'release/v1.0'];
|
| 477 |
+
|
| 478 |
+
} catch (error) {
|
| 479 |
+
console.error("Erreur lors du chargement des branches:", error);
|
| 480 |
+
ALL_BRANCHES = ['main']; // Default fallback
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// Met à jour les listes si elles sont ouvertes
|
| 484 |
+
if (baseCard.classList.contains('open')) renderBranchList('base', ALL_BRANCHES);
|
| 485 |
+
if (compareCard.classList.contains('open')) renderBranchList('compare', ALL_BRANCHES);
|
| 486 |
+
};
|
| 487 |
+
|
| 488 |
+
/**
|
| 489 |
+
* Rend la liste des branches dans le dropdown.
|
| 490 |
+
* @param {'base'|'compare'} type
|
| 491 |
+
* @param {string[]} branches
|
| 492 |
+
*/
|
| 493 |
+
const renderBranchList = (type, branches) => {
|
| 494 |
+
const listElement = type === 'base' ? baseList : compareList;
|
| 495 |
+
const currentBranch = type === 'base' ? BASE_BRANCH : COMPARE_BRANCH;
|
| 496 |
+
const searchInput = type === 'base' ? baseSearch : compareSearch;
|
| 497 |
+
|
| 498 |
+
// Filtrer les branches
|
| 499 |
+
const searchTerm = searchInput.value.toLowerCase();
|
| 500 |
+
const filteredBranches = branches.filter(b => b.toLowerCase().includes(searchTerm));
|
| 501 |
+
|
| 502 |
+
listElement.innerHTML = ''; // Nettoyer le contenu
|
| 503 |
+
|
| 504 |
+
if (filteredBranches.length === 0) {
|
| 505 |
+
listElement.innerHTML = '<p class="text-secondary-var text-sm p-2">No branches found.</p>';
|
| 506 |
+
return;
|
| 507 |
+
}
|
| 508 |
+
|
| 509 |
+
filteredBranches.forEach(branch => {
|
| 510 |
+
const isSelected = branch === currentBranch;
|
| 511 |
+
const item = document.createElement('div');
|
| 512 |
+
item.className = `flex items-center justify-between p-2 rounded-lg text-sm cursor-pointer ${isSelected ? 'bg-active-var font-medium' : 'hover:bg-active-var'}`;
|
| 513 |
+
item.innerHTML = `
|
| 514 |
+
<span class="flex items-center ${isSelected ? 'text-link-var' : 'text-color-var'}">
|
| 515 |
+
${isSelected ? '<i data-lucide="check" class="w-4 h-4 mr-2"></i>' : '<i data-lucide="git-branch" class="w-4 h-4 mr-2 text-secondary-var"></i>'}
|
| 516 |
+
${branch}
|
| 517 |
+
</span>
|
| 518 |
+
${branch === 'main' ? '<span class="text-xs text-secondary-var px-2 py-0.5 border border-color-var rounded-full">default</span>' : ''}
|
| 519 |
+
`;
|
| 520 |
+
|
| 521 |
+
// Mise à jour de la branche sélectionnée
|
| 522 |
+
item.addEventListener('click', () => {
|
| 523 |
+
if (type === 'base') {
|
| 524 |
+
BASE_BRANCH = branch;
|
| 525 |
+
baseNameSpan.textContent = branch;
|
| 526 |
+
} else {
|
| 527 |
+
COMPARE_BRANCH = branch;
|
| 528 |
+
compareNameSpan.textContent = branch;
|
| 529 |
+
}
|
| 530 |
+
updateBranchComparisonStatus();
|
| 531 |
+
closeDropdown(type);
|
| 532 |
+
lucide.createIcons(); // Rendre l'icône de check si nécessaire
|
| 533 |
+
});
|
| 534 |
+
|
| 535 |
+
listElement.appendChild(item);
|
| 536 |
+
});
|
| 537 |
+
lucide.createIcons(); // Rendre les icônes ajoutées
|
| 538 |
+
};
|
| 539 |
+
|
| 540 |
+
baseSearch.addEventListener('input', () => renderBranchList('base', ALL_BRANCHES));
|
| 541 |
+
compareSearch.addEventListener('input', () => renderBranchList('compare', ALL_BRANCHES));
|
| 542 |
+
|
| 543 |
+
/**
|
| 544 |
+
* Met à jour le message d'en-tête et l'état du bouton PR en fonction des branches sélectionnées.
|
| 545 |
+
*/
|
| 546 |
+
const updateBranchComparisonStatus = () => {
|
| 547 |
+
if (BASE_BRANCH === COMPARE_BRANCH) {
|
| 548 |
+
prBannerMessage.innerHTML = `Choose different branches or forks above to discuss and review changes. <a href="#" class="text-link-var hover:underline font-medium">Learn about pull requests</a>.`;
|
| 549 |
+
createPrButton.disabled = true;
|
| 550 |
+
createPrButton.classList.remove('bg-primary-color-var', 'hover:bg-primary-hover-var');
|
| 551 |
+
createPrButton.classList.add('bg-secondary-var/50', 'cursor-not-allowed');
|
| 552 |
+
createPrButton.textContent = 'Create pull request';
|
| 553 |
+
} else {
|
| 554 |
+
prBannerMessage.innerHTML = `Ready to create a pull request from <span class="font-bold">${COMPARE_BRANCH}</span> to <span class="font-bold">${BASE_BRANCH}</span>. <a href="#" class="text-link-var hover:underline font-medium">Learn about pull requests</a>.`;
|
| 555 |
+
createPrButton.disabled = false;
|
| 556 |
+
createPrButton.classList.remove('bg-secondary-var/50', 'cursor-not-allowed');
|
| 557 |
+
createPrButton.classList.add('bg-primary-color-var', 'hover:bg-primary-hover-var');
|
| 558 |
+
createPrButton.textContent = `Create pull request for ${COMPARE_BRANCH}`;
|
| 559 |
+
}
|
| 560 |
+
};
|
| 561 |
+
|
| 562 |
+
// Initialisation
|
| 563 |
+
updateBranchComparisonStatus();
|
| 564 |
+
|
| 565 |
+
|
| 566 |
+
// ----------------------------------------------------------------------
|
| 567 |
+
// LOGIQUE DE CRÉATION DE PULL REQUEST
|
| 568 |
+
// ----------------------------------------------------------------------
|
| 569 |
+
|
| 570 |
+
createPrButton.addEventListener('click', async () => {
|
| 571 |
+
if (createPrButton.disabled) return;
|
| 572 |
+
|
| 573 |
+
// 1. Afficher le spinner centralisé
|
| 574 |
+
prCreationSpinnerOverlay.classList.remove('hidden');
|
| 575 |
+
prCreationSpinnerOverlay.classList.add('flex');
|
| 576 |
+
|
| 577 |
+
// Prompt pour le titre et la description
|
| 578 |
+
const title = prompt("Enter a title for your Pull Request (required):");
|
| 579 |
+
if (!title) {
|
| 580 |
+
alert("PR creation cancelled: Title is required.");
|
| 581 |
+
prCreationSpinnerOverlay.classList.remove('flex');
|
| 582 |
+
prCreationSpinnerOverlay.classList.add('hidden');
|
| 583 |
+
return;
|
| 584 |
+
}
|
| 585 |
+
const description = prompt("Enter a description (optional):") || "";
|
| 586 |
+
|
| 587 |
+
try {
|
| 588 |
+
// 2. Appel API pour la création
|
| 589 |
+
const response = await fetch(`${API_BASE_URL}/api/pr/create`, {
|
| 590 |
+
method: 'POST',
|
| 591 |
+
headers: {
|
| 592 |
+
'Content-Type': 'application/json',
|
| 593 |
+
},
|
| 594 |
+
body: JSON.stringify({
|
| 595 |
+
repo_slug: REPO_SLUG,
|
| 596 |
+
source_branch: COMPARE_BRANCH, // Source / Head
|
| 597 |
+
target_branch: BASE_BRANCH, // Target / Base
|
| 598 |
+
title: title,
|
| 599 |
+
description: description
|
| 600 |
+
})
|
| 601 |
+
});
|
| 602 |
+
|
| 603 |
+
const result = await response.json();
|
| 604 |
+
|
| 605 |
+
// 3. Masquer le spinner
|
| 606 |
+
prCreationSpinnerOverlay.classList.remove('flex');
|
| 607 |
+
prCreationSpinnerOverlay.classList.add('hidden');
|
| 608 |
+
|
| 609 |
+
if (result.success) {
|
| 610 |
+
// REDIRECTION demandée après succès
|
| 611 |
+
window.location.href = `/mindus/nexus/pull_requests?repo_slug=${REPO_SLUG}`;
|
| 612 |
+
} else {
|
| 613 |
+
alert(`PR Creation Failed: ${result.message}`);
|
| 614 |
+
}
|
| 615 |
+
|
| 616 |
+
} catch (error) {
|
| 617 |
+
console.error("Error creating PR:", error);
|
| 618 |
+
prCreationSpinnerOverlay.classList.remove('flex');
|
| 619 |
+
prCreationSpinnerOverlay.classList.add('hidden');
|
| 620 |
+
alert("An error occurred during PR creation.");
|
| 621 |
+
}
|
| 622 |
+
});
|
| 623 |
+
|
| 624 |
+
|
| 625 |
+
// --- Initialisation au chargement de la page ---
|
| 626 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 627 |
+
// Pré-charger les branches
|
| 628 |
+
fetchBranches();
|
| 629 |
+
});
|
| 630 |
+
</script>
|
| 631 |
+
</body>
|
| 632 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/nouveau_project.html
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 | Create a New Repository</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 |
+
<style>
|
| 13 |
+
/* Configuration de la police Inter et Variables de Thème */
|
| 14 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
| 15 |
+
body { font-family: 'Inter', sans-serif; }
|
| 16 |
+
|
| 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 Create repository (Vert) */
|
| 27 |
+
--primary-hover: #2C974B;
|
| 28 |
+
--danger-color: #CF222E;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* Classes Tailwind CSS pour les Variables */
|
| 32 |
+
.bg-var-bg-header { background-color: var(--bg-header); }
|
| 33 |
+
.bg-var-bg-page { background-color: var(--bg-page); }
|
| 34 |
+
.bg-var-bg-card { background-color: var(--bg-card); }
|
| 35 |
+
.bg-var-bg-active { background-color: var(--bg-active); }
|
| 36 |
+
.border-var-border-color { border-color: var(--border-color); }
|
| 37 |
+
.text-var-text-color { color: var(--text-color); }
|
| 38 |
+
.text-var-text-secondary { color: var(--text-secondary); }
|
| 39 |
+
.text-var-text-link { color: var(--text-link); }
|
| 40 |
+
.bg-var-primary-color { background-color: var(--primary-color); }
|
| 41 |
+
.hover-bg-var-primary-hover:hover { background-color: var(--primary-hover); }
|
| 42 |
+
|
| 43 |
+
/* Style pour les champs de formulaire focusés (imite GitHub) */
|
| 44 |
+
input[type="text"]:focus, select:focus, textarea:focus {
|
| 45 |
+
border-color: var(--text-link);
|
| 46 |
+
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3); /* Ring color */
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
/* Cacher la scrollbar (optionnel, pour certains designs) */
|
| 50 |
+
/*
|
| 51 |
+
body {
|
| 52 |
+
overflow: -moz-scrollbars-none;
|
| 53 |
+
-ms-overflow-style: none;
|
| 54 |
+
}
|
| 55 |
+
body::-webkit-scrollbar {
|
| 56 |
+
width: 0 !important;
|
| 57 |
+
display: none;
|
| 58 |
+
}
|
| 59 |
+
*/
|
| 60 |
+
</style>
|
| 61 |
+
</head>
|
| 62 |
+
<body class="bg-var-bg-page text-var-text-color min-h-screen flex flex-col">
|
| 63 |
+
|
| 64 |
+
<header class="bg-var-bg-header border-b border-var-border-color py-3 px-4 md:px-8 shadow-sm">
|
| 65 |
+
<div class="max-w-7xl mx-auto flex justify-between items-center">
|
| 66 |
+
<a href="/" class="text-xl font-semibold text-var-text-color flex items-center">
|
| 67 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="Logo" class="w-6 h-6 mr-2">
|
| 68 |
+
GitForge
|
| 69 |
+
</a>
|
| 70 |
+
|
| 71 |
+
<nav class="space-x-4 flex items-center text-sm">
|
| 72 |
+
<a href="#" class="text-var-text-secondary hover:text-var-text-link">Dashboard</a>
|
| 73 |
+
<a href="#" class="text-var-text-secondary hover:text-var-text-link">Profile</a>
|
| 74 |
+
</nav>
|
| 75 |
+
</div>
|
| 76 |
+
</header>
|
| 77 |
+
|
| 78 |
+
<main class="flex-grow max-w-4xl mx-auto py-8 px-4 md:px-8">
|
| 79 |
+
<h1 class="text-3xl font-semibold border-b border-var-border-color pb-3 mb-6">Create a new repository</h1>
|
| 80 |
+
|
| 81 |
+
<form id="new-repository-form" class="space-y-8">
|
| 82 |
+
|
| 83 |
+
<div class="flex flex-col md:flex-row md:space-x-8 space-y-8 md:space-y-0">
|
| 84 |
+
<div class="md:w-1/3 space-y-1">
|
| 85 |
+
<label for="owner" class="text-sm font-medium text-var-text-secondary">Owner</label>
|
| 86 |
+
<div id="owner-display" class="p-2 border border-var-border-color rounded-md bg-var-bg-active text-var-text-color font-medium">
|
| 87 |
+
{{ user.username if user.username else 'current_user' }} </div>
|
| 88 |
+
<p class="text-xs text-var-text-secondary">Your personal account.</p>
|
| 89 |
+
</div>
|
| 90 |
+
|
| 91 |
+
<div class="md:w-2/3 space-y-1">
|
| 92 |
+
<label for="repo-name" class="text-sm font-medium text-var-text-color flex items-center">
|
| 93 |
+
Repository name <span class="text-danger-color text-lg ml-1">*</span>
|
| 94 |
+
</label>
|
| 95 |
+
<input type="text" id="repo-name" name="repo_name" required
|
| 96 |
+
class="w-full p-2 border border-var-border-color rounded-md focus:outline-none transition duration-150"
|
| 97 |
+
placeholder="my-awesome-project">
|
| 98 |
+
<p class="text-xs text-var-text-secondary" id="name-feedback">Great repository names are short and memorable.</p>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<div class="space-y-1">
|
| 103 |
+
<label for="description" class="text-sm font-medium text-var-text-color">Description <span class="text-var-text-secondary">(optional)</span></label>
|
| 104 |
+
<textarea id="description" name="description" rows="2"
|
| 105 |
+
class="w-full p-2 border border-var-border-color rounded-md focus:outline-none transition duration-150"
|
| 106 |
+
placeholder="Short description of your repository"></textarea>
|
| 107 |
+
</div>
|
| 108 |
+
|
| 109 |
+
<div class="border-b border-var-border-color pb-6 space-y-4">
|
| 110 |
+
<div class="flex items-start space-x-3">
|
| 111 |
+
<input type="radio" id="public-radio" name="visibility" value="public" checked
|
| 112 |
+
class="mt-1 w-4 h-4 text-var-text-link border-var-border-color focus:ring-var-text-link">
|
| 113 |
+
<label for="public-radio" class="cursor-pointer">
|
| 114 |
+
<span class="font-medium flex items-center text-var-text-color">
|
| 115 |
+
<span class="material-symbols-rounded mr-2">lock_open</span> Public
|
| 116 |
+
</span>
|
| 117 |
+
<p class="text-sm text-var-text-secondary ml-6 -mt-1">Anyone on the internet can see this repository. You choose who can commit.</p>
|
| 118 |
+
</label>
|
| 119 |
+
</div>
|
| 120 |
+
|
| 121 |
+
<div class="flex items-start space-x-3">
|
| 122 |
+
<input type="radio" id="private-radio" name="visibility" value="private"
|
| 123 |
+
class="mt-1 w-4 h-4 text-var-text-link border-var-border-color focus:ring-var-text-link">
|
| 124 |
+
<label for="private-radio" class="cursor-pointer">
|
| 125 |
+
<span class="font-medium flex items-center text-var-text-color">
|
| 126 |
+
<span class="material-symbols-rounded mr-2">lock</span> Private
|
| 127 |
+
</span>
|
| 128 |
+
<p class="text-sm text-var-text-secondary ml-6 -mt-1">You choose who can see and commit to this repository.</p>
|
| 129 |
+
</label>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<div class="space-y-4">
|
| 134 |
+
<h2 class="text-lg font-semibold text-var-text-color">Initialize this repository with:</h2>
|
| 135 |
+
|
| 136 |
+
<div class="space-y-1">
|
| 137 |
+
<input type="checkbox" id="add-gitignore" class="mr-2 w-4 h-4 text-var-text-link border-var-border-color focus:ring-var-text-link">
|
| 138 |
+
<label for="add-gitignore" class="text-sm font-medium text-var-text-color">Add a .gitignore</label>
|
| 139 |
+
<p class="text-xs text-var-text-secondary ml-6">Select which files and folders to ignore.</p>
|
| 140 |
+
|
| 141 |
+
<div id="gitignore-options" class="ml-6 mt-2 space-y-2 hidden">
|
| 142 |
+
<select id="gitignore-select" name="gitignore_template" class="w-full md:w-1/2 p-2 border border-var-border-color rounded-md focus:outline-none transition duration-150">
|
| 143 |
+
<option value="">None</option>
|
| 144 |
+
<option value="Python">Python</option>
|
| 145 |
+
<option value="Node">Node</option>
|
| 146 |
+
<option value="Java">Java</option>
|
| 147 |
+
<option value="Vue">Vue</option>
|
| 148 |
+
<option value="React">React</option>
|
| 149 |
+
</select>
|
| 150 |
+
|
| 151 |
+
<input type="text" id="gitignore-search" placeholder="Search templates..." class="w-full md:w-1/2 p-2 border border-var-border-color rounded-md focus:outline-none transition duration-150">
|
| 152 |
+
<ul id="gitignore-list" class="mt-2 space-y-1 border border-var-border-color rounded-md max-h-40 overflow-y-auto hidden">
|
| 153 |
+
</ul>
|
| 154 |
+
<p id="no-gitignore-items" class="text-sm text-var-text-secondary hidden p-2">No items available.</p>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
|
| 158 |
+
<div class="space-y-1">
|
| 159 |
+
<input type="checkbox" id="add-license" class="mr-2 w-4 h-4 text-var-text-link border-var-border-color focus:ring-var-text-link">
|
| 160 |
+
<label for="add-license" class="text-sm font-medium text-var-text-color">Choose a license</label>
|
| 161 |
+
|
| 162 |
+
<div id="license-options" class="ml-6 mt-2 space-y-2 hidden">
|
| 163 |
+
<select id="license-select" name="license_template" class="w-full md:w-1/2 p-2 border border-var-border-color rounded-md focus:outline-none transition duration-150">
|
| 164 |
+
<option value="">None</option>
|
| 165 |
+
<option value="MIT">MIT License</option>
|
| 166 |
+
<option value="GPLv3">GNU GPLv3</option>
|
| 167 |
+
<option value="Apache-2.0">Apache License 2.0</option>
|
| 168 |
+
</select>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
</div>
|
| 172 |
+
|
| 173 |
+
<div class="pt-6 border-t border-var-border-color">
|
| 174 |
+
<button type="submit" id="submit-repo-btn"
|
| 175 |
+
class="bg-var-primary-color text-white py-2 px-4 rounded-md font-semibold hover-bg-var-primary-hover transition duration-150 flex items-center space-x-2 disabled:opacity-50 disabled:cursor-not-allowed">
|
| 176 |
+
<span class="material-symbols-rounded">box_add</span>
|
| 177 |
+
<span>Créer le dépôt</span>
|
| 178 |
+
</button>
|
| 179 |
+
</div>
|
| 180 |
+
|
| 181 |
+
</form>
|
| 182 |
+
</main>
|
| 183 |
+
|
| 184 |
+
<footer class="bg-var-bg-header border-t border-var-border-color py-4 mt-8">
|
| 185 |
+
<div class="max-w-7xl mx-auto px-4 md:px-8 text-center text-xs text-var-text-secondary">
|
| 186 |
+
© 2024 GitForge. Tous droits réservés.
|
| 187 |
+
</div>
|
| 188 |
+
</footer>
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
<script>
|
| 192 |
+
// Variables pour les éléments du DOM
|
| 193 |
+
const form = document.getElementById('new-repository-form');
|
| 194 |
+
const repoNameInput = document.getElementById('repo-name');
|
| 195 |
+
|
| 196 |
+
const addGitignoreCheckbox = document.getElementById('add-gitignore');
|
| 197 |
+
const gitignoreOptions = document.getElementById('gitignore-options');
|
| 198 |
+
const gitignoreSelect = document.getElementById('gitignore-select');
|
| 199 |
+
const gitignoreSearch = document.getElementById('gitignore-search');
|
| 200 |
+
const gitignoreList = document.getElementById('gitignore-list');
|
| 201 |
+
const noGitignoreItems = document.getElementById('no-gitignore-items');
|
| 202 |
+
|
| 203 |
+
const addLicenseCheckbox = document.getElementById('add-license');
|
| 204 |
+
const licenseOptions = document.getElementById('license-options');
|
| 205 |
+
const licenseSelect = document.getElementById('license-select');
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
// 1. Logique d'affichage/masquage des options .gitignore
|
| 209 |
+
addGitignoreCheckbox.addEventListener('change', () => {
|
| 210 |
+
if (addGitignoreCheckbox.checked) {
|
| 211 |
+
gitignoreOptions.classList.remove('hidden');
|
| 212 |
+
} else {
|
| 213 |
+
gitignoreOptions.classList.add('hidden');
|
| 214 |
+
// Réinitialiser la sélection et le champ de recherche lors de la fermeture
|
| 215 |
+
gitignoreSelect.value = '';
|
| 216 |
+
gitignoreSearch.value = '';
|
| 217 |
+
gitignoreList.classList.add('hidden');
|
| 218 |
+
noGitignoreItems.classList.add('hidden');
|
| 219 |
+
}
|
| 220 |
+
});
|
| 221 |
+
|
| 222 |
+
// 2. Logique d'affichage/masquage des options de License
|
| 223 |
+
addLicenseCheckbox.addEventListener('change', () => {
|
| 224 |
+
if (addLicenseCheckbox.checked) {
|
| 225 |
+
licenseOptions.classList.remove('hidden');
|
| 226 |
+
} else {
|
| 227 |
+
licenseOptions.classList.add('hidden');
|
| 228 |
+
licenseSelect.value = ''; // Réinitialiser la sélection
|
| 229 |
+
}
|
| 230 |
+
});
|
| 231 |
+
|
| 232 |
+
// --- Logique .gitignore (recherche, etc.) ---
|
| 233 |
+
// Clonage des options du select dans l'UL pour la recherche (si la recherche doit affecter le select)
|
| 234 |
+
function populateGitignoreList() {
|
| 235 |
+
gitignoreList.innerHTML = '';
|
| 236 |
+
const options = Array.from(gitignoreSelect.options).filter(opt => opt.value !== '');
|
| 237 |
+
options.forEach(option => {
|
| 238 |
+
const li = document.createElement('li');
|
| 239 |
+
li.textContent = option.textContent;
|
| 240 |
+
li.dataset.value = option.value;
|
| 241 |
+
li.className = 'p-2 hover:bg-var-bg-active cursor-pointer text-sm';
|
| 242 |
+
li.addEventListener('click', () => {
|
| 243 |
+
gitignoreSelect.value = option.value;
|
| 244 |
+
gitignoreSearch.value = option.textContent;
|
| 245 |
+
gitignoreList.classList.add('hidden');
|
| 246 |
+
});
|
| 247 |
+
gitignoreList.appendChild(li);
|
| 248 |
+
});
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
// 3. Gestion de la Recherche .gitignore
|
| 252 |
+
gitignoreSearch.addEventListener('focus', () => {
|
| 253 |
+
populateGitignoreList(); // Mettre à jour la liste avant l'affichage
|
| 254 |
+
gitignoreList.classList.remove('hidden');
|
| 255 |
+
});
|
| 256 |
+
// On pourrait cacher la liste au 'blur' avec un petit délai pour permettre le clic
|
| 257 |
+
// gitignoreSearch.addEventListener('blur', () => { setTimeout(() => gitignoreList.classList.add('hidden'), 200); });
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
gitignoreSearch.addEventListener('input', (e) => {
|
| 261 |
+
const searchText = e.target.value.toLowerCase().trim();
|
| 262 |
+
const items = gitignoreList.querySelectorAll('li');
|
| 263 |
+
let itemsFound = 0;
|
| 264 |
+
|
| 265 |
+
items.forEach(item => {
|
| 266 |
+
const text = item.textContent.toLowerCase();
|
| 267 |
+
if (text.includes(searchText)) {
|
| 268 |
+
item.style.display = 'block'; // Afficher
|
| 269 |
+
itemsFound++;
|
| 270 |
+
} else {
|
| 271 |
+
item.style.display = 'none'; // Cacher
|
| 272 |
+
}
|
| 273 |
+
});
|
| 274 |
+
|
| 275 |
+
// Afficher le message "No items available" si aucun résultat
|
| 276 |
+
if (itemsFound === 0 && searchText.length > 0) {
|
| 277 |
+
noGitignoreItems.classList.remove('hidden');
|
| 278 |
+
} else {
|
| 279 |
+
noGitignoreItems.classList.add('hidden');
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
// S'assurer que la liste est visible si l'utilisateur tape
|
| 283 |
+
if (searchText.length > 0) {
|
| 284 |
+
gitignoreList.classList.remove('hidden');
|
| 285 |
+
} else {
|
| 286 |
+
// Si le champ est vide, on peut choisir de cacher ou de tout afficher
|
| 287 |
+
gitignoreList.classList.add('hidden');
|
| 288 |
+
}
|
| 289 |
+
});
|
| 290 |
+
|
| 291 |
+
// 4. Mettre à jour le select quand l'utilisateur change la valeur du select manuellement
|
| 292 |
+
gitignoreSelect.addEventListener('change', () => {
|
| 293 |
+
// Mettre à jour le champ de recherche pour refléter la sélection
|
| 294 |
+
const selectedOption = gitignoreSelect.options[gitignoreSelect.selectedIndex];
|
| 295 |
+
gitignoreSearch.value = selectedOption.textContent === 'None' ? '' : selectedOption.textContent;
|
| 296 |
+
});
|
| 297 |
+
|
| 298 |
+
// 5. Soumission du Formulaire (Connexion Backend)
|
| 299 |
+
form.addEventListener('submit', async (e) => {
|
| 300 |
+
e.preventDefault();
|
| 301 |
+
|
| 302 |
+
// 1. Récupération des données du formulaire
|
| 303 |
+
const repoName = repoNameInput.value.trim();
|
| 304 |
+
const description = document.getElementById('description').value.trim();
|
| 305 |
+
|
| 306 |
+
// Récupérer la valeur du select .gitignore (vide si non coché/sélectionné)
|
| 307 |
+
const gitignore = addGitignoreCheckbox.checked && gitignoreSelect.value ? gitignoreSelect.value : '';
|
| 308 |
+
// Récupérer la valeur du select license (vide si non coché/sélectionné)
|
| 309 |
+
const license = addLicenseCheckbox.checked && licenseSelect.value ? licenseSelect.value : '';
|
| 310 |
+
|
| 311 |
+
// Récupérer la visibilité
|
| 312 |
+
const visibilityInput = document.querySelector('input[name="visibility"]:checked');
|
| 313 |
+
const visibility = visibilityInput ? visibilityInput.value : 'public';
|
| 314 |
+
|
| 315 |
+
if (!repoName) {
|
| 316 |
+
alert("Veuillez donner un nom à votre dépôt.");
|
| 317 |
+
return;
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
// Désactiver le bouton et montrer un état de chargement
|
| 321 |
+
const submitButton = document.getElementById('submit-repo-btn');
|
| 322 |
+
const originalButtonContent = submitButton.innerHTML;
|
| 323 |
+
submitButton.disabled = true;
|
| 324 |
+
submitButton.innerHTML = `<span class="material-symbols-rounded animate-spin">progress_activity">progress_activity</span> Création...`;
|
| 325 |
+
|
| 326 |
+
try {
|
| 327 |
+
// 2. Envoi des données au backend (vers l'endpoint supposé)
|
| 328 |
+
const response = await fetch('/api/create_repo', {
|
| 329 |
+
method: 'POST',
|
| 330 |
+
headers: {
|
| 331 |
+
'Content-Type': 'application/json',
|
| 332 |
+
// Le backend gère l'authentification de session via les décorateurs Flask
|
| 333 |
+
},
|
| 334 |
+
body: JSON.stringify({
|
| 335 |
+
repo_name: repoName,
|
| 336 |
+
description: description,
|
| 337 |
+
visibility: visibility,
|
| 338 |
+
gitignore_template: gitignore,
|
| 339 |
+
license_template: license,
|
| 340 |
+
})
|
| 341 |
+
});
|
| 342 |
+
|
| 343 |
+
const data = await response.json();
|
| 344 |
+
|
| 345 |
+
// 3. Traitement de la réponse
|
| 346 |
+
if (response.ok && data.success) {
|
| 347 |
+
console.log("Dépôt créé avec succès:", data.message);
|
| 348 |
+
|
| 349 |
+
// --- REDIRECTION MISE À JOUR ---
|
| 350 |
+
// Utilisation du repo_slug (slug normalisé) renvoyé par le backend pour la redirection
|
| 351 |
+
const finalRepoSlug = data.repo_slug || repoName;
|
| 352 |
+
const redirectPath = `/mindus/nexus/repo_files?repo=${encodeURIComponent(finalRepoSlug)}&status=created`;
|
| 353 |
+
window.location.href = redirectPath;
|
| 354 |
+
|
| 355 |
+
} else {
|
| 356 |
+
// Échec de la création
|
| 357 |
+
alert(`Erreur lors de la création du dépôt: ${data.message || 'Erreur inconnue.'}`);
|
| 358 |
+
console.error("Erreur backend:", data.message);
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
} catch (error) {
|
| 362 |
+
console.error("Erreur réseau/générale:", error);
|
| 363 |
+
alert("Une erreur inattendue est survenue. Veuillez vérifier votre connexion.");
|
| 364 |
+
} finally {
|
| 365 |
+
// Réactiver le bouton après erreur (si pas de redirection)
|
| 366 |
+
if (submitButton.disabled) { // Vérifie si la redirection n'a pas déjà eu lieu
|
| 367 |
+
submitButton.disabled = false;
|
| 368 |
+
submitButton.innerHTML = originalButtonContent;
|
| 369 |
+
}
|
| 370 |
+
}
|
| 371 |
+
});
|
| 372 |
+
|
| 373 |
+
// 6. Initialisation (pour que la liste .gitignore soit prête)
|
| 374 |
+
populateGitignoreList();
|
| 375 |
+
|
| 376 |
+
</script>
|
| 377 |
+
|
| 378 |
+
</body>
|
| 379 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/phtnjdjbejeuefwkq.html
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Chat Interface</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<style>
|
| 9 |
+
/* Custom scrollbar styling */
|
| 10 |
+
::-webkit-scrollbar {
|
| 11 |
+
width: 8px;
|
| 12 |
+
}
|
| 13 |
+
::-webkit-scrollbar-thumb {
|
| 14 |
+
background-color: #0078D4; /* Custom scrollbar color */
|
| 15 |
+
border-radius: 10px; /* Rounded corners */
|
| 16 |
+
}
|
| 17 |
+
::-webkit-scrollbar-thumb:hover {
|
| 18 |
+
background-color: #005A9E; /* Hover color */
|
| 19 |
+
}
|
| 20 |
+
::-webkit-scrollbar-track {
|
| 21 |
+
background: #E8E8E8; /* Track background */
|
| 22 |
+
}
|
| 23 |
+
</style>
|
| 24 |
+
</head>
|
| 25 |
+
<body class="bg-gray-100">
|
| 26 |
+
<div class="flex flex-col items-center h-screen p-4">
|
| 27 |
+
<div class="w-full max-w-3xl p-4 bg-white rounded shadow-lg flex flex-col">
|
| 28 |
+
<header class="border-b pb-3 mb-4">
|
| 29 |
+
<h1 class="text-lg font-bold">Chat Interface</h1>
|
| 30 |
+
</header>
|
| 31 |
+
|
| 32 |
+
<!-- Conversation Window -->
|
| 33 |
+
<div id="chat-container" class="flex-1 overflow-y-auto p-3 border rounded-lg bg-gray-50" style="scroll-behavior: smooth;">
|
| 34 |
+
<!-- Example conversation items -->
|
| 35 |
+
<div class="mb-3">
|
| 36 |
+
<p class="bg-blue-500 text-white rounded px-4 py-2 w-fit max-w-md">Bonjour, comment puis-je vous aider aujourd'hui ?</p>
|
| 37 |
+
<span class="text-gray-500 text-sm block">10:00 AM</span>
|
| 38 |
+
</div>
|
| 39 |
+
<div class="mb-3 text-right">
|
| 40 |
+
<p class="bg-gray-200 text-gray-800 rounded px-4 py-2 w-fit ml-auto max-w-md">Salut, j'aimerais en savoir plus sur votre service.</p>
|
| 41 |
+
<span class="text-gray-500 text-sm block">10:01 AM</span>
|
| 42 |
+
</div>
|
| 43 |
+
<div class="mb-3">
|
| 44 |
+
<p class="bg-blue-500 text-white rounded px-4 py-2 w-fit max-w-md">Bien sûr, je suis là pour répondre à vos questions !</p>
|
| 45 |
+
<span class="text-gray-500 text-sm block">10:02 AM</span>
|
| 46 |
+
</div>
|
| 47 |
+
<!-- More messages can go here -->
|
| 48 |
+
</div>
|
| 49 |
+
|
| 50 |
+
<!-- Input Bar -->
|
| 51 |
+
<div class="mt-4 flex items-center border-t pt-4">
|
| 52 |
+
<input id="input-box" type="text" placeholder="Écrivez votre message..."
|
| 53 |
+
class="flex-1 px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 54 |
+
<button id="send-button" class="ml-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 focus:outline-none">Envoyer</button>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
|
| 59 |
+
<script>
|
| 60 |
+
// Dummy message sending functionality for testing
|
| 61 |
+
const chatContainer = document.getElementById('chat-container');
|
| 62 |
+
const inputBox = document.getElementById('input-box');
|
| 63 |
+
const sendButton = document.getElementById('send-button');
|
| 64 |
+
|
| 65 |
+
sendButton.addEventListener('click', () => {
|
| 66 |
+
const userMessage = inputBox.value.trim();
|
| 67 |
+
if (!userMessage) return;
|
| 68 |
+
|
| 69 |
+
// Add user message to the chat
|
| 70 |
+
const messageDiv = document.createElement('div');
|
| 71 |
+
messageDiv.classList.add('mb-3', 'text-right');
|
| 72 |
+
messageDiv.innerHTML = `
|
| 73 |
+
<p class="bg-gray-200 text-gray-800 rounded px-4 py-2 w-fit ml-auto max-w-md">${userMessage}</p>
|
| 74 |
+
<span class="text-gray-500 text-sm block">${new Date().toLocaleTimeString()}</span>
|
| 75 |
+
`;
|
| 76 |
+
chatContainer.appendChild(messageDiv);
|
| 77 |
+
|
| 78 |
+
// Simulate bot reply
|
| 79 |
+
setTimeout(() => {
|
| 80 |
+
const botMessageDiv = document.createElement('div');
|
| 81 |
+
botMessageDiv.classList.add('mb-3');
|
| 82 |
+
botMessageDiv.innerHTML = `
|
| 83 |
+
<p class="bg-blue-500 text-white rounded px-4 py-2 w-fit max-w-md">Réponse automatique : ${userMessage}</p>
|
| 84 |
+
<span class="text-gray-500 text-sm block">${new Date().toLocaleTimeString()}</span>
|
| 85 |
+
`;
|
| 86 |
+
chatContainer.appendChild(botMessageDiv);
|
| 87 |
+
|
| 88 |
+
// Scroll to bottom
|
| 89 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
| 90 |
+
}, 1000);
|
| 91 |
+
|
| 92 |
+
// Clear input
|
| 93 |
+
inputBox.value = '';
|
| 94 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
| 95 |
+
});
|
| 96 |
+
</script>
|
| 97 |
+
</body>
|
| 98 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/politique_confidentialite.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/profile.html
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>GitForge | Mon Profil</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 |
+
<style>
|
| 12 |
+
/* Configuration de la police Inter */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Variables de Thème et Styles (Copie des pages précédentes) */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Mode Clair (Thème UNIQUE) */
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA;
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E;
|
| 29 |
+
--primary-hover: #2C974B;
|
| 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 |
+
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 39 |
+
|
| 40 |
+
/* Style pour les liens de la barre latérale */
|
| 41 |
+
.sidebar-link {
|
| 42 |
+
display: flex; align-items: center; padding: 0.5rem 0.75rem; border-radius: 0.5rem;
|
| 43 |
+
color: var(--text-color); border: 1px solid transparent;
|
| 44 |
+
}
|
| 45 |
+
.sidebar-link:hover {
|
| 46 |
+
background-color: var(--bg-active);
|
| 47 |
+
}
|
| 48 |
+
.sidebar-link.active {
|
| 49 |
+
border-color: var(--border-color);
|
| 50 |
+
background-color: var(--bg-card);
|
| 51 |
+
font-weight: 600;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
/* Style spécifique aux inputs */
|
| 55 |
+
.form-input {
|
| 56 |
+
width: 100%;
|
| 57 |
+
padding: 0.5rem 0.75rem;
|
| 58 |
+
border-radius: 0.375rem; /* rounded-md */
|
| 59 |
+
border: 1px solid var(--border-color);
|
| 60 |
+
background-color: var(--bg-card);
|
| 61 |
+
color: var(--text-color);
|
| 62 |
+
transition: all 0.2s;
|
| 63 |
+
}
|
| 64 |
+
.form-input:focus {
|
| 65 |
+
outline: none;
|
| 66 |
+
border-color: var(--text-link);
|
| 67 |
+
box-shadow: 0 0 0 1px var(--text-link);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/* Style pour l'animation de chargement (Spinner) */
|
| 71 |
+
.spinner {
|
| 72 |
+
border: 4px solid rgba(0, 0, 0, 0.1);
|
| 73 |
+
border-left-color: var(--text-link);
|
| 74 |
+
border-radius: 50%;
|
| 75 |
+
width: 24px;
|
| 76 |
+
height: 24px;
|
| 77 |
+
animation: spin 1s linear infinite;
|
| 78 |
+
display: none; /* Caché par défaut */
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
@keyframes spin {
|
| 82 |
+
to { transform: rotate(360deg); }
|
| 83 |
+
}
|
| 84 |
+
</style>
|
| 85 |
+
</head>
|
| 86 |
+
|
| 87 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme flex flex-col">
|
| 88 |
+
|
| 89 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme sticky top-0 z-50">
|
| 90 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 91 |
+
<div class="flex justify-between items-center h-16">
|
| 92 |
+
<div class="flex items-center space-x-4">
|
| 93 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="GitForge Logo" class="h-6">
|
| 94 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme">GitForge</span>
|
| 95 |
+
|
| 96 |
+
<span class="text-secondary-var hidden sm:inline">/</span>
|
| 97 |
+
<span class="text-secondary-var text-lg font-semibold transition-colors-theme hidden sm:inline">
|
| 98 |
+
<span id="user-context">{{ user.username if user else 'Chargement...' }}</span>
|
| 99 |
+
</span>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<div class="flex items-center space-x-3">
|
| 103 |
+
<div class="hidden sm:block">
|
| 104 |
+
<input type="text" placeholder="Rechercher /"
|
| 105 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
<a href="{{ url_for('project_bp.nouveau_project_page_with_user_context') }}" title="Créer un nouveau dépôt"
|
| 109 |
+
class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 110 |
+
<span class="material-symbols-rounded text-base">add</span>
|
| 111 |
+
<span class="hidden md:inline ml-1"> Nouveau Dépôt</span>
|
| 112 |
+
</a>
|
| 113 |
+
|
| 114 |
+
<a href="{{ url_for('user_bp.profile') }}" title="Mon Profil"
|
| 115 |
+
class="p-2 rounded-full text-color-var hover:text-link-var transition-colors-theme">
|
| 116 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 117 |
+
</a>
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 123 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 124 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 125 |
+
<a href="{{ url_for('user_bp.dashboard') }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center p-2">
|
| 126 |
+
<span class="material-symbols-rounded text-base mr-1">home</span> Dashboard
|
| 127 |
+
</a>
|
| 128 |
+
<a href="{{ url_for('user_bp.upload_file_page') }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center p-2">
|
| 129 |
+
<span class="material-symbols-rounded text-base mr-1">upload_file</span> Importer
|
| 130 |
+
</a>
|
| 131 |
+
<a href="{{ url_for('web_bp.a_propos_page') }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center p-2">
|
| 132 |
+
<span class="material-symbols-rounded text-base mr-1">info</span> À Propos
|
| 133 |
+
</a>
|
| 134 |
+
</nav>
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
</header>
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
<div id="main-content" class="flex-grow max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 transition-colors-theme w-full">
|
| 141 |
+
<h1 class="text-3xl font-bold text-color-var mb-6 border-b pb-3 border-color-var/50">Paramètres du Compte</h1>
|
| 142 |
+
|
| 143 |
+
{% with messages = get_flashed_messages(with_categories=true) %}
|
| 144 |
+
{% if messages %}
|
| 145 |
+
<div class="mb-4 space-y-2">
|
| 146 |
+
{% for category, message in messages %}
|
| 147 |
+
<div class="p-3 rounded-lg text-sm
|
| 148 |
+
{% if category == 'success' %} bg-green-100 text-green-800 border border-green-300
|
| 149 |
+
{% elif category == 'error' %} bg-red-100 text-red-800 border border-red-300
|
| 150 |
+
{% else %} bg-blue-100 text-blue-800 border border-blue-300
|
| 151 |
+
{% endif %}" role="alert">
|
| 152 |
+
{{ message }}
|
| 153 |
+
</div>
|
| 154 |
+
{% endfor %}
|
| 155 |
+
</div>
|
| 156 |
+
{% endif %}
|
| 157 |
+
{% endwith %}
|
| 158 |
+
|
| 159 |
+
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
| 160 |
+
|
| 161 |
+
<div class="lg:col-span-1 space-y-2">
|
| 162 |
+
<nav class="space-y-1 text-sm bg-card-var p-4 rounded-lg border border-color-var">
|
| 163 |
+
<a href="{{ url_for('user_bp.profile') }}" class="sidebar-link active transition-colors-theme">
|
| 164 |
+
<span class="material-symbols-rounded text-base mr-3">person</span>
|
| 165 |
+
Profil Public
|
| 166 |
+
</a>
|
| 167 |
+
<a href="/mindus/nexus/settings_security" class="sidebar-link transition-colors-theme">
|
| 168 |
+
<span class="material-symbols-rounded text-base mr-3">lock</span>
|
| 169 |
+
Sécurité et Connexion
|
| 170 |
+
</a>
|
| 171 |
+
<a href="/mindus/nexus/settings_notifications" class="sidebar-link transition-colors-theme">
|
| 172 |
+
<span class="material-symbols-rounded text-base mr-3">notifications</span>
|
| 173 |
+
Notifications
|
| 174 |
+
</a>
|
| 175 |
+
<a href="/mindus/nexus/settings_billing" class="sidebar-link transition-colors-theme">
|
| 176 |
+
<span class="material-symbols-rounded text-base mr-3">credit_card</span>
|
| 177 |
+
Facturation (Tarifs)
|
| 178 |
+
</a>
|
| 179 |
+
</nav>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div class="lg:col-span-3 space-y-8">
|
| 183 |
+
|
| 184 |
+
<div id="loading-spinner" class="flex justify-center items-center p-12">
|
| 185 |
+
<div class="spinner" style="display: block;"></div>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<div id="profile-content" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme" style="display: none;">
|
| 189 |
+
<h2 class="text-xl font-semibold text-color-var mb-6 border-b pb-2 border-color-var/50">
|
| 190 |
+
Informations de Profil Public
|
| 191 |
+
</h2>
|
| 192 |
+
|
| 193 |
+
<form id="public-profile-form" method="POST" action="{{ url_for('user_bp.profile') }}" class="space-y-6">
|
| 194 |
+
|
| 195 |
+
<div>
|
| 196 |
+
<label for="username" class="block text-sm font-medium mb-1 text-color-var">Nom d'Utilisateur GitForge</label>
|
| 197 |
+
<input type="text" id="username" name="username" value="{{ user.username if user else '' }}"
|
| 198 |
+
placeholder="Nom d'utilisateur GitForge" class="form-input" required>
|
| 199 |
+
</div>
|
| 200 |
+
|
| 201 |
+
<div>
|
| 202 |
+
<label for="email" class="block text-sm font-medium mb-1 text-color-var">Adresse E-mail</label>
|
| 203 |
+
<input type="email" id="email" name="email" value="{{ user.email if user else '' }}"
|
| 204 |
+
placeholder="votre.email@exemple.com" class="form-input" required>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<div>
|
| 208 |
+
<label for="bio" class="block text-sm font-medium mb-1 text-color-var">Bio (Max. 160 caractères)</label>
|
| 209 |
+
<textarea id="bio" name="bio" rows="3" maxlength="160"
|
| 210 |
+
placeholder="Parlez de vous en quelques mots..." class="form-input">Développeur passionné par les forges logicielles.</textarea>
|
| 211 |
+
</div>
|
| 212 |
+
|
| 213 |
+
<div>
|
| 214 |
+
<label for="location" class="block text-sm font-medium mb-1 text-color-var">Localisation</label>
|
| 215 |
+
<input type="text" id="location" name="location" value="Port-au-Prince, Haïti"
|
| 216 |
+
placeholder="Ville, Pays" class="form-input">
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
<div>
|
| 220 |
+
<label for="website" class="block text-sm font-medium mb-1 text-color-var">Site Web (URL)</label>
|
| 221 |
+
<input type="url" id="website" name="website" value=""
|
| 222 |
+
placeholder="https://votre-site.com" class="form-input">
|
| 223 |
+
</div>
|
| 224 |
+
|
| 225 |
+
<div class="pt-4 border-t border-color-var/50">
|
| 226 |
+
<button type="submit"
|
| 227 |
+
class="inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 228 |
+
<span class="material-symbols-rounded text-base mr-1">save</span> Sauvegarder les changements
|
| 229 |
+
</button>
|
| 230 |
+
</div>
|
| 231 |
+
</form>
|
| 232 |
+
</div>
|
| 233 |
+
|
| 234 |
+
<div id="password-update-content" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme" style="display: none;">
|
| 235 |
+
<h2 class="text-xl font-semibold text-color-var mb-6 border-b pb-2 border-color-var/50">
|
| 236 |
+
Mettre à Jour le Mot de Passe
|
| 237 |
+
</h2>
|
| 238 |
+
|
| 239 |
+
<form id="password-form" method="POST" action="{{ url_for('user_bp.profile') }}" class="space-y-6">
|
| 240 |
+
|
| 241 |
+
<input type="hidden" name="username" value="{{ user.username if user else '' }}">
|
| 242 |
+
<input type="hidden" name="email" value="{{ user.email if user else '' }}">
|
| 243 |
+
|
| 244 |
+
<div>
|
| 245 |
+
<label for="new_password" class="block text-sm font-medium mb-1 text-color-var">Nouveau Mot de Passe (min 8 car.)</label>
|
| 246 |
+
<input type="password" id="new_password" name="new_password"
|
| 247 |
+
placeholder="Laissez vide si vous ne voulez pas le changer" class="form-input">
|
| 248 |
+
</div>
|
| 249 |
+
|
| 250 |
+
<div>
|
| 251 |
+
<label for="confirm_password" class="block text-sm font-medium mb-1 text-color-var">Confirmer le Nouveau Mot de Passe</label>
|
| 252 |
+
<input type="password" id="confirm_password" name="confirm_password"
|
| 253 |
+
placeholder="Confirmer le nouveau mot de passe" class="form-input">
|
| 254 |
+
</div>
|
| 255 |
+
|
| 256 |
+
<div class="pt-4 border-t border-color-var/50">
|
| 257 |
+
<button type="submit"
|
| 258 |
+
class="inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 259 |
+
<span class="material-symbols-rounded text-base mr-1">save</span> Mettre à jour le Mot de Passe
|
| 260 |
+
</button>
|
| 261 |
+
</div>
|
| 262 |
+
</form>
|
| 263 |
+
</div>
|
| 264 |
+
|
| 265 |
+
<div class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 266 |
+
<h2 class="text-xl font-semibold text-color-var mb-6 border-b pb-2 border-color-var/50">
|
| 267 |
+
Photo de Profil
|
| 268 |
+
</h2>
|
| 269 |
+
|
| 270 |
+
<div class="flex items-center space-x-6">
|
| 271 |
+
<div class="w-24 h-24 rounded-full bg-secondary-var flex items-center justify-center text-4xl text-white overflow-hidden border border-color-var">
|
| 272 |
+
<span class="material-symbols-rounded text-5xl">account_circle</span>
|
| 273 |
+
</div>
|
| 274 |
+
<div>
|
| 275 |
+
<button type="button"
|
| 276 |
+
class="inline-flex items-center px-3 py-1.5 text-sm border border-color-var bg-active-var text-color-var font-medium rounded-lg hover:bg-page-var transition duration-150">
|
| 277 |
+
Télécharger une nouvelle photo
|
| 278 |
+
</button>
|
| 279 |
+
<p class="text-xs mt-2 text-secondary-var">JPG, PNG ou GIF. Taille max. 5MB.</p>
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
</div>
|
| 287 |
+
</div>
|
| 288 |
+
|
| 289 |
+
<footer class="mt-auto w-full bg-header-var border-t border-color-var transition-colors-theme py-4">
|
| 290 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-sm">
|
| 291 |
+
<p class="text-secondary-var mb-2">© 2025 GitForge, Inc.</p>
|
| 292 |
+
<nav class="space-x-4">
|
| 293 |
+
<a href="{{ url_for('web_bp.conditions_utilisation_page') }}" class="text-link-var hover:text-link-hover-var">Conditions d'Utilisation</a>
|
| 294 |
+
<a href="{{ url_for('web_bp.mentions_legales_page') }}" class="text-link-var hover:text-link-hover-var">Mentions Légales</a>
|
| 295 |
+
<a href="{{ url_for('web_bp.politique_confidentialite_page') }}" class="text-link-var hover:text-link-hover-var">Confidentialité</a>
|
| 296 |
+
</nav>
|
| 297 |
+
</div>
|
| 298 |
+
</footer>
|
| 299 |
+
|
| 300 |
+
<script>
|
| 301 |
+
// Script pour gérer l'affichage du spinner et des contenus
|
| 302 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 303 |
+
const spinner = document.getElementById('loading-spinner');
|
| 304 |
+
const profileContent = document.getElementById('profile-content');
|
| 305 |
+
const passwordContent = document.getElementById('password-update-content');
|
| 306 |
+
|
| 307 |
+
// Étant donné que les données 'user' sont rendues côté serveur par Jinja,
|
| 308 |
+
// nous pouvons cacher le spinner et afficher le contenu immédiatement.
|
| 309 |
+
// Si le bloc 'user' est non vide (i.e. l'utilisateur est connecté et chargé)
|
| 310 |
+
{% if user %}
|
| 311 |
+
spinner.style.display = 'none';
|
| 312 |
+
profileContent.style.display = 'block';
|
| 313 |
+
passwordContent.style.display = 'block';
|
| 314 |
+
{% endif %}
|
| 315 |
+
|
| 316 |
+
// Assurer que les champs cachés du formulaire de mot de passe sont synchronisés
|
| 317 |
+
const usernameInput = document.querySelector('form#public-profile-form input[name="username"]');
|
| 318 |
+
const emailInput = document.querySelector('form#public-profile-form input[name="email"]');
|
| 319 |
+
const passwordUsernameHidden = document.querySelector('form#password-form input[name="username"]');
|
| 320 |
+
const passwordEmailHidden = document.querySelector('form#password-form input[name="email"]');
|
| 321 |
+
|
| 322 |
+
// Synchronisation en temps réel (utile si l'utilisateur modifie l'username/email avant le POST)
|
| 323 |
+
function syncHiddenFields() {
|
| 324 |
+
passwordUsernameHidden.value = usernameInput.value;
|
| 325 |
+
passwordEmailHidden.value = emailInput.value;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
if (usernameInput && passwordUsernameHidden) {
|
| 329 |
+
usernameInput.addEventListener('input', syncHiddenFields);
|
| 330 |
+
emailInput.addEventListener('input', syncHiddenFields);
|
| 331 |
+
}
|
| 332 |
+
});
|
| 333 |
+
</script>
|
| 334 |
+
</body>
|
| 335 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/pull_requests.html
ADDED
|
@@ -0,0 +1,562 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Pull Requests</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 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 12 |
+
|
| 13 |
+
<style>
|
| 14 |
+
/* Inter Font Configuration */
|
| 15 |
+
body { font-family: 'Inter', sans-serif; }
|
| 16 |
+
|
| 17 |
+
/* Theme Variables and Transitions */
|
| 18 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 19 |
+
|
| 20 |
+
/* Light Mode Theme */
|
| 21 |
+
.light {
|
| 22 |
+
--bg-page: #FFFFFF;
|
| 23 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 24 |
+
--bg-card: #FFFFFF;
|
| 25 |
+
--bg-active: #F3F4F6;
|
| 26 |
+
--border-color: #D0D7DE;
|
| 27 |
+
--text-color: #24292F;
|
| 28 |
+
--text-secondary: #57606A;
|
| 29 |
+
--text-link: #0969DA;
|
| 30 |
+
--primary-color: #2DA44E; /* Green button */
|
| 31 |
+
--primary-hover: #2C974B;
|
| 32 |
+
}
|
| 33 |
+
/* Utility classes for theme 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); }
|
| 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-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 41 |
+
|
| 42 |
+
/* Repository Navigation Link Styles */
|
| 43 |
+
.repo-nav-link {
|
| 44 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 45 |
+
margin-right: 0.5rem;
|
| 46 |
+
}
|
| 47 |
+
.repo-nav-link.active {
|
| 48 |
+
border-bottom-color: #F78166; /* Using a vibrant orange/red for active tab like the image */
|
| 49 |
+
color: var(--text-color) !important;
|
| 50 |
+
font-weight: 600;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
/* Sidebar Styles (Unchanged) */
|
| 54 |
+
#sidebar {
|
| 55 |
+
position: fixed;
|
| 56 |
+
top: 0;
|
| 57 |
+
left: 0;
|
| 58 |
+
width: 300px;
|
| 59 |
+
height: 100%;
|
| 60 |
+
background-color: var(--bg-card);
|
| 61 |
+
transform: translateX(-100%);
|
| 62 |
+
transition: transform 0.3s ease-in-out;
|
| 63 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 64 |
+
z-index: 100;
|
| 65 |
+
}
|
| 66 |
+
#sidebar.open {
|
| 67 |
+
transform: translateX(0);
|
| 68 |
+
}
|
| 69 |
+
#overlay {
|
| 70 |
+
position: fixed;
|
| 71 |
+
top: 0;
|
| 72 |
+
left: 0;
|
| 73 |
+
width: 100%;
|
| 74 |
+
height: 100%;
|
| 75 |
+
background: rgba(0, 0, 0, 0.5);
|
| 76 |
+
z-index: 90;
|
| 77 |
+
display: none;
|
| 78 |
+
}
|
| 79 |
+
#overlay.open {
|
| 80 |
+
display: block;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
/* PR List Card Style */
|
| 84 |
+
.pr-card {
|
| 85 |
+
display: flex;
|
| 86 |
+
align-items: center;
|
| 87 |
+
padding: 1rem;
|
| 88 |
+
border: 1px solid var(--border-color);
|
| 89 |
+
background-color: var(--bg-card);
|
| 90 |
+
cursor: pointer;
|
| 91 |
+
transition: background-color 0.15s;
|
| 92 |
+
}
|
| 93 |
+
.pr-card:hover {
|
| 94 |
+
background-color: var(--bg-active);
|
| 95 |
+
}
|
| 96 |
+
.pr-card + .pr-card {
|
| 97 |
+
border-top: none; /* Merge borders */
|
| 98 |
+
}
|
| 99 |
+
.pr-card:first-child {
|
| 100 |
+
border-top-left-radius: 0.5rem;
|
| 101 |
+
border-top-right-radius: 0.5rem;
|
| 102 |
+
}
|
| 103 |
+
.pr-card:last-of-type {
|
| 104 |
+
border-bottom-left-radius: 0.5rem;
|
| 105 |
+
border-bottom-right-radius: 0.5rem;
|
| 106 |
+
}
|
| 107 |
+
.pr-card.open-details {
|
| 108 |
+
background-color: var(--bg-active);
|
| 109 |
+
border-bottom: none;
|
| 110 |
+
border-bottom-left-radius: 0;
|
| 111 |
+
border-bottom-right-radius: 0;
|
| 112 |
+
}
|
| 113 |
+
.pr-details-table {
|
| 114 |
+
border: 1px solid var(--border-color);
|
| 115 |
+
border-top: none;
|
| 116 |
+
border-bottom-left-radius: 0.5rem;
|
| 117 |
+
border-bottom-right-radius: 0.5rem;
|
| 118 |
+
margin-bottom: 1rem;
|
| 119 |
+
background-color: var(--bg-card);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
/* Spinner Style (New) */
|
| 123 |
+
.spinner {
|
| 124 |
+
border: 4px solid rgba(0, 0, 0, 0.1);
|
| 125 |
+
border-left-color: var(--text-link);
|
| 126 |
+
border-radius: 50%;
|
| 127 |
+
width: 30px;
|
| 128 |
+
height: 30px;
|
| 129 |
+
animation: spin 1s linear infinite;
|
| 130 |
+
}
|
| 131 |
+
@keyframes spin {
|
| 132 |
+
to { transform: rotate(360deg); }
|
| 133 |
+
}
|
| 134 |
+
</style>
|
| 135 |
+
</head>
|
| 136 |
+
|
| 137 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 138 |
+
|
| 139 |
+
<div id="overlay"></div>
|
| 140 |
+
|
| 141 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 142 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 143 |
+
<span class="material-symbols-rounded text-3xl">data_object</span>
|
| 144 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 145 |
+
<span class="material-symbols-rounded text-2xl">close</span>
|
| 146 |
+
</button>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<nav class="space-y-1">
|
| 150 |
+
<a href="/mindus/nexus/dashboard" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 151 |
+
<span class="material-symbols-rounded mr-3 text-lg">home</span> Home
|
| 152 |
+
</a>
|
| 153 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 154 |
+
<span class="material-symbols-rounded mr-3 text-lg">bug_report</span> Issues
|
| 155 |
+
</a>
|
| 156 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg bg-active-var transition-colors-theme font-semibold text-link-var">
|
| 157 |
+
<span class="material-symbols-rounded mr-3 text-lg">merge</span> Pull requests
|
| 158 |
+
</a>
|
| 159 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 160 |
+
<span class="material-symbols-rounded mr-3 text-lg">box</span> Projects
|
| 161 |
+
</a>
|
| 162 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 163 |
+
<span class="material-symbols-rounded mr-3 text-lg">chat</span> Discussions
|
| 164 |
+
</a>
|
| 165 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 166 |
+
<span class="material-symbols-rounded mr-3 text-lg">developer_mode</span> Codespaces
|
| 167 |
+
</a>
|
| 168 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 169 |
+
<span class="material-symbols-rounded mr-3 text-lg">smart_toy</span> Copilot
|
| 170 |
+
</a>
|
| 171 |
+
</nav>
|
| 172 |
+
|
| 173 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 174 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 175 |
+
<span class="material-symbols-rounded mr-3 text-lg">explore</span> Explore
|
| 176 |
+
</a>
|
| 177 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 178 |
+
<span class="material-symbols-rounded mr-3 text-lg">storefront</span> Marketplace
|
| 179 |
+
</a>
|
| 180 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 181 |
+
<span class="material-symbols-rounded mr-3 text-lg">link</span> MCP registry
|
| 182 |
+
</a>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme sticky top-0 z-50">
|
| 188 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 189 |
+
<div class="flex justify-between items-center h-16">
|
| 190 |
+
|
| 191 |
+
<div class="flex items-center space-x-4">
|
| 192 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 193 |
+
<span class="material-symbols-rounded text-2xl">menu</span>
|
| 194 |
+
</button>
|
| 195 |
+
|
| 196 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 197 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 198 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 199 |
+
<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>
|
| 200 |
+
<span class="material-symbols-rounded text-base ml-2 text-secondary-var">lock</span>
|
| 201 |
+
</a>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div class="flex items-center space-x-3">
|
| 205 |
+
<div class="hidden sm:block">
|
| 206 |
+
<input type="text" placeholder="Type / to search"
|
| 207 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 208 |
+
</div>
|
| 209 |
+
<a href="/mindus/nexus/notentification" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 210 |
+
<span class="material-symbols-rounded">notifications</span>
|
| 211 |
+
</a>
|
| 212 |
+
<a href="mindus/nexus/nouveau_project" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 213 |
+
<span class="material-symbols-rounded">add</span>
|
| 214 |
+
</a>
|
| 215 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 216 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 217 |
+
</a>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 223 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 224 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 225 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 226 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 227 |
+
</a>
|
| 228 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 229 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues
|
| 230 |
+
</a>
|
| 231 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 232 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests <span id="pr-count" class="ml-1 px-1 bg-active-var rounded-full text-xs font-normal">...</span>
|
| 233 |
+
</a>
|
| 234 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 235 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 236 |
+
</a>
|
| 237 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 238 |
+
<span class="material-symbols-rounded text-base mr-1">box</span> Projects
|
| 239 |
+
</a>
|
| 240 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 241 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 242 |
+
</a>
|
| 243 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 244 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 245 |
+
</a>
|
| 246 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 247 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 248 |
+
</a>
|
| 249 |
+
</nav>
|
| 250 |
+
</div>
|
| 251 |
+
</div>
|
| 252 |
+
</header>
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme relative">
|
| 256 |
+
|
| 257 |
+
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6 space-y-3 md:space-y-0">
|
| 258 |
+
<div class="flex items-center space-x-2 w-full md:w-auto">
|
| 259 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 260 |
+
Filters <span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 261 |
+
</button>
|
| 262 |
+
<input type="text" placeholder="is:pr is:open"
|
| 263 |
+
class="w-full md:w-96 p-1.5 text-sm rounded-lg border border-color-var bg-card-var focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 264 |
+
</div>
|
| 265 |
+
|
| 266 |
+
<div class="flex items-center space-x-3 w-full md:w-auto justify-end">
|
| 267 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 268 |
+
Labels <span class="ml-1 font-semibold">0</span>
|
| 269 |
+
</button>
|
| 270 |
+
<button class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 271 |
+
Milestones <span class="ml-1 font-semibold">0</span>
|
| 272 |
+
</button>
|
| 273 |
+
<a href="/mindus/nexus/new_pull_requests?repo_slug={{ repo_slug }}" class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 274 |
+
New pull request
|
| 275 |
+
</a>
|
| 276 |
+
</div>
|
| 277 |
+
</div>
|
| 278 |
+
|
| 279 |
+
<div id="pr-list-container">
|
| 280 |
+
<div id="pr-list-loading" class="flex justify-center items-center py-10">
|
| 281 |
+
<div class="spinner"></div>
|
| 282 |
+
</div>
|
| 283 |
+
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
</main>
|
| 287 |
+
|
| 288 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 289 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 290 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 291 |
+
<span class="material-symbols-rounded text-xl">data_object</span>
|
| 292 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 293 |
+
</div>
|
| 294 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 295 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 296 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Privacy</a>
|
| 297 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Security</a>
|
| 298 |
+
<a href="/mindus/nexus/satut" class="hover:text-link-var">Status</a>
|
| 299 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 300 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 301 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 302 |
+
</nav>
|
| 303 |
+
</div>
|
| 304 |
+
</footer>
|
| 305 |
+
|
| 306 |
+
<script>
|
| 307 |
+
// Variables de contexte (Jinja2)
|
| 308 |
+
const REPO_SLUG = "{{ repo_slug if repo_slug else 'mindus0/mindus' }}"; // Variable par défaut si non fournie
|
| 309 |
+
const API_BASE_URL = ""; // Assumer que les routes sont relatives (ex: /api/pr/list)
|
| 310 |
+
|
| 311 |
+
// Initialiser Lucide Icons
|
| 312 |
+
// Note: This must be called after DOMContentLoaded or after elements are added
|
| 313 |
+
|
| 314 |
+
// SIDEBAR LOGIC (inchangée)
|
| 315 |
+
const sidebar = document.getElementById('sidebar');
|
| 316 |
+
const overlay = document.getElementById('overlay');
|
| 317 |
+
const openButton = document.getElementById('open-sidebar');
|
| 318 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 319 |
+
|
| 320 |
+
const toggleSidebar = () => {
|
| 321 |
+
sidebar.classList.toggle('open');
|
| 322 |
+
overlay.classList.toggle('open');
|
| 323 |
+
};
|
| 324 |
+
|
| 325 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 326 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 327 |
+
overlay.addEventListener('click', toggleSidebar); // Close when clicking overlay
|
| 328 |
+
|
| 329 |
+
// Prevent scrolling when sidebar is open (for better mobile UX)
|
| 330 |
+
const body = document.body;
|
| 331 |
+
const observer = new MutationObserver(() => {
|
| 332 |
+
if (sidebar.classList.contains('open')) {
|
| 333 |
+
body.style.overflow = 'hidden';
|
| 334 |
+
} else {
|
| 335 |
+
body.style.overflow = '';
|
| 336 |
+
}
|
| 337 |
+
});
|
| 338 |
+
|
| 339 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 340 |
+
|
| 341 |
+
// ----------------------------------------------------------------------
|
| 342 |
+
// LOGIQUE DE CHARGEMENT ET D'AFFICHAGE DES PULL REQUESTS
|
| 343 |
+
// ----------------------------------------------------------------------
|
| 344 |
+
|
| 345 |
+
const prListContainer = document.getElementById('pr-list-container');
|
| 346 |
+
const prListLoading = document.getElementById('pr-list-loading');
|
| 347 |
+
const prCountSpan = document.getElementById('pr-count');
|
| 348 |
+
|
| 349 |
+
/**
|
| 350 |
+
* Simule la récupération de la liste des Pull Requests via l'API.
|
| 351 |
+
* @returns {Promise<Object[]>}
|
| 352 |
+
*/
|
| 353 |
+
const fetchPullRequests = async () => {
|
| 354 |
+
try {
|
| 355 |
+
// REMPLACER PAR VOTRE APPEL API RÉEL VERS LE BACKEND
|
| 356 |
+
// const response = await fetch(`${API_BASE_URL}/api/pr/list?repo_slug=${REPO_SLUG}`);
|
| 357 |
+
// if (!response.ok) throw new Error('Failed to fetch pull requests');
|
| 358 |
+
// const data = await response.json();
|
| 359 |
+
// return data.pull_requests || [];
|
| 360 |
+
|
| 361 |
+
// Données simulées pour la démo
|
| 362 |
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
| 363 |
+
return [
|
| 364 |
+
{ id: 101, title: 'Feature: Implement new authentication flow', number: 1, state: 'open', user: 'mindus0', base: 'main', head: 'feature/auth-v2', created_at: '2 days ago', comments: 3, commits: 5, files: 12, additions: 55, deletions: 12 },
|
| 365 |
+
{ id: 102, title: 'Bugfix: Fix critical security vulnerability', number: 2, state: 'open', user: 'dev_user', base: 'main', head: 'bugfix/sec-patch', created_at: '4 hours ago', comments: 0, commits: 1, files: 2, additions: 15, deletions: 0 },
|
| 366 |
+
{ id: 103, title: 'Docs: Update README with setup instructions', number: 3, state: 'closed', user: 'docs_bot', base: 'main', head: 'docs/readme-update', created_at: '1 week ago', comments: 1, commits: 2, files: 1, additions: 8, deletions: 1 },
|
| 367 |
+
];
|
| 368 |
+
} catch (error) {
|
| 369 |
+
console.error("Erreur lors du chargement des Pull Requests:", error);
|
| 370 |
+
return [];
|
| 371 |
+
}
|
| 372 |
+
};
|
| 373 |
+
|
| 374 |
+
/**
|
| 375 |
+
* Rend la liste des Pull Requests dans le DOM.
|
| 376 |
+
* @param {Object[]} prs - La liste des Pull Requests.
|
| 377 |
+
*/
|
| 378 |
+
const renderPullRequests = (prs) => {
|
| 379 |
+
prListLoading.classList.add('hidden');
|
| 380 |
+
prCountSpan.textContent = prs.length;
|
| 381 |
+
|
| 382 |
+
if (prs.length === 0) {
|
| 383 |
+
prListContainer.innerHTML += `
|
| 384 |
+
<div class="p-8 text-center border border-color-var rounded-lg bg-card-var text-secondary-var">
|
| 385 |
+
<i data-lucide="git-pull-request" class="w-8 h-8 mx-auto mb-2"></i>
|
| 386 |
+
<p class="font-semibold text-lg text-color-var">No pull requests found.</p>
|
| 387 |
+
<p>There are no open or closed pull requests that match your current filter.</p>
|
| 388 |
+
</div>
|
| 389 |
+
`;
|
| 390 |
+
lucide.createIcons();
|
| 391 |
+
return;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
const prListHtml = prs.map(pr => {
|
| 395 |
+
const stateColor = pr.state === 'open' ? 'text-green-500' : 'text-red-500';
|
| 396 |
+
const stateIcon = pr.state === 'open' ? 'git-pull-request' : 'git-merge';
|
| 397 |
+
|
| 398 |
+
return `
|
| 399 |
+
<div id="pr-card-${pr.id}" class="pr-card transition-colors-theme" data-pr-id="${pr.id}" onclick="window.togglePrDetails(this, ${pr.id})">
|
| 400 |
+
<i data-lucide="${stateIcon}" class="w-5 h-5 mr-4 ${stateColor}"></i>
|
| 401 |
+
<div class="flex-grow">
|
| 402 |
+
<a href="#" class="text-lg font-semibold text-link-var hover:underline">${pr.title}</a>
|
| 403 |
+
<div class="text-sm text-secondary-var mt-1">
|
| 404 |
+
#${pr.number} ${pr.state} by ${pr.user} ${pr.created_at} - <span class="font-mono">${pr.head}</span> → <span class="font-mono">${pr.base}</span>
|
| 405 |
+
</div>
|
| 406 |
+
</div>
|
| 407 |
+
<div class="flex items-center space-x-3 text-secondary-var text-sm">
|
| 408 |
+
${pr.comments > 0 ? `<div class="flex items-center"><i data-lucide="message-square" class="w-4 h-4 mr-1"></i> ${pr.comments}</div>` : ''}
|
| 409 |
+
</div>
|
| 410 |
+
</div>
|
| 411 |
+
<div id="pr-details-${pr.id}" class="pr-details-table hidden bg-card-var text-color-var">
|
| 412 |
+
</div>
|
| 413 |
+
`;
|
| 414 |
+
}).join('');
|
| 415 |
+
|
| 416 |
+
// Utiliser innerHTML pour remplacer le contenu et ensuite cacher le spinner
|
| 417 |
+
prListContainer.innerHTML = `<div class="rounded-lg shadow-sm">${prListHtml}</div>`;
|
| 418 |
+
lucide.createIcons(); // Rendre les icônes après l'ajout au DOM
|
| 419 |
+
};
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
/**
|
| 423 |
+
* Simule la récupération des détails pour une PR (ex: changements de fichiers).
|
| 424 |
+
* @param {number} prId - L'ID de la Pull Request.
|
| 425 |
+
* @param {HTMLElement} detailsElement - L'élément DIV où injecter les détails.
|
| 426 |
+
*/
|
| 427 |
+
const fetchAndRenderPRDetails = async (prId, detailsElement) => {
|
| 428 |
+
try {
|
| 429 |
+
detailsElement.innerHTML = `<div class="flex justify-center items-center py-4"><div class="spinner"></div></div>`;
|
| 430 |
+
|
| 431 |
+
// Simuler un appel API pour les détails de la PR
|
| 432 |
+
// const response = await fetch(`${API_BASE_URL}/api/pr/details?repo_slug=${REPO_SLUG}&pr_id=${prId}`);
|
| 433 |
+
// const data = await response.json();
|
| 434 |
+
|
| 435 |
+
// Données simulées
|
| 436 |
+
await new Promise(resolve => setTimeout(resolve, 500));
|
| 437 |
+
const data = {
|
| 438 |
+
success: true,
|
| 439 |
+
commits: Math.floor(Math.random() * 10) + 1,
|
| 440 |
+
files: [
|
| 441 |
+
{ path: 'src/components/Button.jsx', status: 'modified', additions: 15, deletions: 5 },
|
| 442 |
+
{ path: 'src/utils/auth.js', status: 'added', additions: 40, deletions: 0 },
|
| 443 |
+
{ path: 'test/Button.test.js', status: 'modified', additions: 0, deletions: 7 },
|
| 444 |
+
]
|
| 445 |
+
};
|
| 446 |
+
|
| 447 |
+
if (data.success) {
|
| 448 |
+
const fileListHtml = data.files.map(file => `
|
| 449 |
+
<tr class="border-t border-color-var">
|
| 450 |
+
<td class="px-4 py-2 text-left w-6">
|
| 451 |
+
<span class="text-xs font-semibold px-2 py-0.5 rounded-full ${file.status === 'modified' ? 'bg-yellow-200 text-yellow-800' : file.status === 'added' ? 'bg-green-200 text-green-800' : 'bg-red-200 text-red-800'}">
|
| 452 |
+
${file.status.substring(0, 1).toUpperCase()}
|
| 453 |
+
</span>
|
| 454 |
+
</td>
|
| 455 |
+
<td class="px-4 py-2 text-left font-mono text-sm break-all">${file.path}</td>
|
| 456 |
+
<td class="px-4 py-2 text-right text-green-600 font-semibold text-sm">+${file.additions}</td>
|
| 457 |
+
<td class="px-4 py-2 text-right text-red-600 font-semibold text-sm">-${file.deletions}</td>
|
| 458 |
+
<td class="px-4 py-2 text-right w-10">
|
| 459 |
+
<button class="text-secondary-var hover:text-link-var" onclick="window.copyFilePath(event, '${file.path}')">
|
| 460 |
+
<i data-lucide="copy" class="w-4 h-4"></i>
|
| 461 |
+
</button>
|
| 462 |
+
</td>
|
| 463 |
+
</tr>
|
| 464 |
+
`).join('');
|
| 465 |
+
|
| 466 |
+
detailsElement.innerHTML = `
|
| 467 |
+
<div class="p-4">
|
| 468 |
+
<div class="flex justify-between items-center mb-4">
|
| 469 |
+
<h4 class="font-semibold text-md text-color-var">Files changed (${data.files.length}) - Commits: ${data.commits}</h4>
|
| 470 |
+
<button class="text-link-var text-sm hover:underline">View all changes</button>
|
| 471 |
+
</div>
|
| 472 |
+
<div class="overflow-x-auto">
|
| 473 |
+
<table class="min-w-full divide-y divide-color-var">
|
| 474 |
+
<tbody>
|
| 475 |
+
${fileListHtml}
|
| 476 |
+
</tbody>
|
| 477 |
+
</table>
|
| 478 |
+
</div>
|
| 479 |
+
</div>
|
| 480 |
+
`;
|
| 481 |
+
} else {
|
| 482 |
+
detailsElement.innerHTML = `<p class="p-4 text-center text-red-500">Failed to load PR details: ${data.message || 'Unknown error.'}</p>`;
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
} catch (error) {
|
| 486 |
+
console.error("Error fetching PR details:", error);
|
| 487 |
+
detailsElement.innerHTML = `<p class="p-4 text-center text-red-500">Network error loading PR details.</p>`;
|
| 488 |
+
} finally {
|
| 489 |
+
lucide.createIcons(); // Rendre les icônes ajoutées au tableau
|
| 490 |
+
}
|
| 491 |
+
};
|
| 492 |
+
|
| 493 |
+
/**
|
| 494 |
+
* Gère l'ouverture et la fermeture des détails de la PR.
|
| 495 |
+
* @param {HTMLElement} prCard - L'élément carte PR cliqué.
|
| 496 |
+
* @param {number} prId - L'ID de la Pull Request.
|
| 497 |
+
*/
|
| 498 |
+
const togglePrDetails = (prCard, prId) => {
|
| 499 |
+
const detailsElement = document.getElementById(`pr-details-${prId}`);
|
| 500 |
+
const isCurrentlyOpen = detailsElement.classList.contains('open');
|
| 501 |
+
|
| 502 |
+
// Fermer toutes les autres PRs
|
| 503 |
+
document.querySelectorAll('.pr-details-table.open').forEach(el => {
|
| 504 |
+
el.classList.remove('open', 'block');
|
| 505 |
+
el.classList.add('hidden');
|
| 506 |
+
});
|
| 507 |
+
document.querySelectorAll('.pr-card.open-details').forEach(el => {
|
| 508 |
+
el.classList.remove('open-details');
|
| 509 |
+
});
|
| 510 |
+
|
| 511 |
+
if (!isCurrentlyOpen) {
|
| 512 |
+
// Ouvrir la PR cliquée
|
| 513 |
+
prCard.classList.add('open-details');
|
| 514 |
+
detailsElement.classList.remove('hidden');
|
| 515 |
+
detailsElement.classList.add('open', 'block');
|
| 516 |
+
fetchAndRenderPRDetails(prId, detailsElement);
|
| 517 |
+
}
|
| 518 |
+
}
|
| 519 |
+
|
| 520 |
+
/**
|
| 521 |
+
* Copie le chemin du fichier dans le presse-papiers.
|
| 522 |
+
* @param {Event} event
|
| 523 |
+
* @param {string} filePath
|
| 524 |
+
*/
|
| 525 |
+
const copyFilePath = (event, filePath) => {
|
| 526 |
+
event.stopPropagation(); // Empêcher la propagation au parent (fermeture des détails)
|
| 527 |
+
navigator.clipboard.writeText(filePath).then(() => {
|
| 528 |
+
alert(`Copied file path: ${filePath}`);
|
| 529 |
+
}).catch(err => {
|
| 530 |
+
console.error('Could not copy text: ', err);
|
| 531 |
+
});
|
| 532 |
+
};
|
| 533 |
+
|
| 534 |
+
// Assigner les fonctions au contexte global pour l'onclick
|
| 535 |
+
window.copyFilePath = copyFilePath;
|
| 536 |
+
window.togglePrDetails = togglePrDetails;
|
| 537 |
+
|
| 538 |
+
/**
|
| 539 |
+
* Fonction principale pour charger et afficher les PRs.
|
| 540 |
+
*/
|
| 541 |
+
const fetchAndRenderPRs = async () => {
|
| 542 |
+
prListLoading.classList.remove('hidden');
|
| 543 |
+
prListLoading.classList.add('flex');
|
| 544 |
+
prListContainer.innerHTML = ''; // Nettoyer l'ancien contenu (sauf le loader)
|
| 545 |
+
|
| 546 |
+
const prs = await fetchPullRequests();
|
| 547 |
+
renderPullRequests(prs);
|
| 548 |
+
|
| 549 |
+
prListLoading.classList.remove('flex');
|
| 550 |
+
prListLoading.classList.add('hidden');
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
|
| 554 |
+
// --- Initialisation au chargement de la page ---
|
| 555 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 556 |
+
// Charger la liste des PRs au démarrage, comme demandé par l'utilisateur
|
| 557 |
+
fetchAndRenderPRs();
|
| 558 |
+
lucide.createIcons();
|
| 559 |
+
});
|
| 560 |
+
</script>
|
| 561 |
+
</body>
|
| 562 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/repo_files.html
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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ial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - My Project</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.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 |
+
<style>
|
| 12 |
+
/* Inter font configuration */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Theme Variables and Styles */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Light Mode (UNIQUE Theme) */
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA;
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E;
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
}
|
| 31 |
+
/* Utility classes for 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 |
+
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 39 |
+
|
| 40 |
+
/* Specific style for the navigation bar */
|
| 41 |
+
.repo-nav-link {
|
| 42 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 43 |
+
margin-right: 0.5rem; /* Spacing between links */
|
| 44 |
+
}
|
| 45 |
+
.repo-nav-link.active {
|
| 46 |
+
border-bottom-color: var(--text-link);
|
| 47 |
+
color: var(--text-color) !important;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
/* Styles for the loading spinner */
|
| 52 |
+
.spinner {
|
| 53 |
+
border: 4px solid var(--border-color);
|
| 54 |
+
border-top: 4px solid var(--text-link);
|
| 55 |
+
border-radius: 50%;
|
| 56 |
+
width: 40px;
|
| 57 |
+
height: 40px;
|
| 58 |
+
animation: spin 1s linear infinite;
|
| 59 |
+
}
|
| 60 |
+
/* Smaller spinner (KEPT IN CSS FOR REFERENCE) */
|
| 61 |
+
.small-spinner {
|
| 62 |
+
border: 2px solid var(--border-color);
|
| 63 |
+
border-top: 2px solid var(--text-link);
|
| 64 |
+
border-radius: 50%;
|
| 65 |
+
width: 20px;
|
| 66 |
+
height: 20px;
|
| 67 |
+
animation: spin 1s linear infinite;
|
| 68 |
+
}
|
| 69 |
+
@keyframes spin {
|
| 70 |
+
0% { transform: rotate(0deg); }
|
| 71 |
+
100% { transform: rotate(360deg); }
|
| 72 |
+
}
|
| 73 |
+
</style>
|
| 74 |
+
</head>
|
| 75 |
+
|
| 76 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 77 |
+
|
| 78 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 79 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 80 |
+
<div class="flex justify-between items-center h-16">
|
| 81 |
+
<div class="flex items-center space-x-4">
|
| 82 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6">
|
| 83 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme">GitForge</span>
|
| 84 |
+
<span class="text-secondary-var">/</span>
|
| 85 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme">
|
| 86 |
+
<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>
|
| 87 |
+
|
| 88 |
+
</a>
|
| 89 |
+
<span id="repo-visibility" class="px-2 py-0.5 text-xs font-medium rounded-full border border-color-var text-secondary-var">
|
| 90 |
+
Private
|
| 91 |
+
</span>
|
| 92 |
+
</div>
|
| 93 |
+
|
| 94 |
+
<div class="flex items-center space-x-3">
|
| 95 |
+
<div class="hidden sm:block">
|
| 96 |
+
<input type="text" placeholder="Type / to search"
|
| 97 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 98 |
+
</div>
|
| 99 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-color-var hover:text-link-var transition-colors-theme">
|
| 100 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 101 |
+
</a>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
|
| 106 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 107 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 108 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 109 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var active transition-colors-theme flex items-center">
|
| 110 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 111 |
+
</a>
|
| 112 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 113 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues
|
| 114 |
+
</a>
|
| 115 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 116 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests
|
| 117 |
+
</a>
|
| 118 |
+
<a href="/mindus/nexus/editor?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 119 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 120 |
+
</a>
|
| 121 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 122 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 123 |
+
</a>
|
| 124 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 125 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 126 |
+
</a>
|
| 127 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 128 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 129 |
+
</a>
|
| 130 |
+
</nav>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
</header>
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
<div id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 transition-colors-theme">
|
| 137 |
+
|
| 138 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 space-y-4 sm:space-y-0">
|
| 139 |
+
<div class="flex items-center space-x-4">
|
| 140 |
+
|
| 141 |
+
<div class="relative inline-block text-left">
|
| 142 |
+
<button id="branch-toggle" class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 143 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span>
|
| 144 |
+
<span class="font-semibold">main</span>
|
| 145 |
+
<span class="material-symbols-rounded text-base ml-2">arrow_drop_down</span>
|
| 146 |
+
</button>
|
| 147 |
+
|
| 148 |
+
<div id="branch-menu" class="hidden absolute left-0 mt-2 w-72 rounded-md shadow-lg bg-card-var ring-1 ring-border-color-var focus:outline-none z-50 transition-colors-theme">
|
| 149 |
+
<div class="p-3">
|
| 150 |
+
<input type="text" placeholder="Find a branch..."
|
| 151 |
+
class="w-full p-2 text-sm border border-color-var rounded-lg focus:outline-none focus:ring-1 focus:ring-link-var mb-2 bg-page-var text-color-var transition-colors-theme">
|
| 152 |
+
|
| 153 |
+
<a href="/mindus/nexus/new_branch?repo_slug={{ repo_slug }}" class="block text-sm text-link-var hover:text-link-hover-var p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 154 |
+
<span class="material-symbols-rounded text-base mr-1 align-middle">visibility</span> View all branches
|
| 155 |
+
</a>
|
| 156 |
+
|
| 157 |
+
<div class="mt-2 max-h-40 overflow-y-auto">
|
| 158 |
+
<div class="text-xs text-secondary-var p-1">Current Branch</div>
|
| 159 |
+
<div class="flex items-center p-1.5 text-sm font-semibold text-color-var bg-active-var rounded-md">
|
| 160 |
+
<span class="material-symbols-rounded text-base mr-2">check</span> main
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
<span class="text-sm text-secondary-var">1 Branch</span>
|
| 167 |
+
<span class="text-sm text-secondary-var">0 Tags</span>
|
| 168 |
+
</div>
|
| 169 |
+
|
| 170 |
+
<div class="flex items-center space-x-3">
|
| 171 |
+
<button class="px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme hidden sm:inline-flex items-center">
|
| 172 |
+
Go to file
|
| 173 |
+
</button>
|
| 174 |
+
|
| 175 |
+
<div class="relative inline-block text-left">
|
| 176 |
+
<button id="add-file-toggle" class="inline-flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 177 |
+
<span class="material-symbols-rounded text-base mr-1">add</span> Add file
|
| 178 |
+
<span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 179 |
+
</button>
|
| 180 |
+
|
| 181 |
+
<div id="add-file-menu" class="hidden absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-card-var ring-1 ring-border-color-var focus:outline-none z-50 transition-colors-theme">
|
| 182 |
+
<div class="py-1" role="menu" aria-orientation="vertical" aria-labelledby="add-file-toggle">
|
| 183 |
+
<a href="/mindus/nexus/editor?repo_slug={{ repo_slug }}" class="flex items-center px-4 py-2 text-sm text-color-var hover:bg-active-var transition-colors-theme" role="menuitem">
|
| 184 |
+
<span class="material-symbols-rounded mr-3 text-base">create_new_folder</span> Create New File
|
| 185 |
+
</a>
|
| 186 |
+
<a href="/mindus/nexus/upload_file?repo_slug={{ repo_slug }}" class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100" role="menuitem">
|
| 187 |
+
<span class="material-symbols-rounded align-middle mr-2 text-lg">upload_file</span>
|
| 188 |
+
Upload files
|
| 189 |
+
</a>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
|
| 194 |
+
<a href="/mindus/nexus/dynamic_and_static?repo_slug={{ repo_slug }}" class="inline-flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 195 |
+
<span class="material-symbols-rounded text-base mr-1">rocket_launch</span> Deploy this Repository
|
| 196 |
+
</a>
|
| 197 |
+
|
| 198 |
+
<button class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 199 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 200 |
+
<span class="material-symbols-rounded text-base ml-2">arrow_drop_down</span>
|
| 201 |
+
</button>
|
| 202 |
+
</div>
|
| 203 |
+
</div>
|
| 204 |
+
|
| 205 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 206 |
+
|
| 207 |
+
<div class="lg:col-span-2 space-y-6">
|
| 208 |
+
|
| 209 |
+
<div id="file-list-container" class="bg-card-var rounded-lg border border-color-var transition-colors-theme min-h-[100px]">
|
| 210 |
+
|
| 211 |
+
<div class="flex items-center p-3 border-b border-color-var">
|
| 212 |
+
<span class="material-symbols-rounded text-lg text-secondary-var mr-3">account_circle</span>
|
| 213 |
+
|
| 214 |
+
<div class="flex flex-col sm:flex-row sm:items-center w-full justify-between">
|
| 215 |
+
<a href="#" class="text-sm font-semibold text-color-var hover:text-link-var">mindus0</a>
|
| 216 |
+
<span id="latest-commit-message" class="text-sm text-secondary-var truncate mr-2 ml-2">Loading...</span>
|
| 217 |
+
<a href="#" class="text-sm text-link-var hover:text-link-hover-var whitespace-nowrap ml-auto">
|
| 218 |
+
<span id="latest-commit-hash">N/A</span>
|
| 219 |
+
</a>
|
| 220 |
+
<span id="latest-commit-time" class="text-xs text-secondary-var ml-2 whitespace-nowrap hidden sm:inline">
|
| 221 |
+
N/A
|
| 222 |
+
</span>
|
| 223 |
+
<a href="#" class="text-sm text-link-var hover:text-link-hover-var whitespace-nowrap ml-4">
|
| 224 |
+
<span class="material-symbols-rounded text-base mr-1">history</span> <span id="commit-count">?</span> Commits
|
| 225 |
+
</a>
|
| 226 |
+
</div>
|
| 227 |
+
</div>
|
| 228 |
+
|
| 229 |
+
<div id="loading-spinner" class="flex justify-center items-center p-12">
|
| 230 |
+
<div class="spinner"></div>
|
| 231 |
+
</div>
|
| 232 |
+
|
| 233 |
+
<div id="empty-repo-message" class="hidden text-center p-8">
|
| 234 |
+
<span class="material-symbols-rounded text-6xl text-secondary-var mb-4">folder_off</span>
|
| 235 |
+
<h2 class="text-xl font-semibold mb-2 text-color-var">This repository is empty</h2>
|
| 236 |
+
<p class="text-secondary-var mb-6">Add your first file to start your project.</p>
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
<table id="file-table" class="min-w-full divide-y divide-color-var hidden">
|
| 240 |
+
<tbody id="file-table-body" class="divide-y divide-color-var/50 text-sm">
|
| 241 |
+
</tbody>
|
| 242 |
+
</table>
|
| 243 |
+
</div>
|
| 244 |
+
|
| 245 |
+
<div id="readme-container" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 246 |
+
<h3 class="text-lg font-semibold text-color-var mb-4 border-b pb-2 border-color-var/50">README.md</h3>
|
| 247 |
+
<div id="readme-content">
|
| 248 |
+
<p class="text-secondary-var leading-relaxed">
|
| 249 |
+
Loading README.md...
|
| 250 |
+
</p>
|
| 251 |
+
</div>
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
|
| 255 |
+
<div class="lg:col-span-1 space-y-6">
|
| 256 |
+
<div class="bg-card-var p-4 rounded-lg border border-color-var transition-colors-theme">
|
| 257 |
+
<h3 class="text-md font-semibold text-color-var mb-3">About</h3>
|
| 258 |
+
<p id="about-description" class="text-sm text-secondary-var mb-4">
|
| 259 |
+
Loading description...
|
| 260 |
+
</p>
|
| 261 |
+
<ul class="space-y-2 text-sm">
|
| 262 |
+
<li class="flex items-center text-secondary-var">
|
| 263 |
+
<span class="material-symbols-rounded text-base mr-2">book</span> Readme
|
| 264 |
+
</li>
|
| 265 |
+
<li id="about-license" class="flex items-center text-secondary-var">
|
| 266 |
+
<span class="material-symbols-rounded text-base mr-2">policy</span> Apache-2.0 license
|
| 267 |
+
</li>
|
| 268 |
+
<li class="flex items-center text-secondary-var">
|
| 269 |
+
<span class="material-symbols-rounded text-base mr-2">visibility</span> 0 watching
|
| 270 |
+
</li>
|
| 271 |
+
<li class="flex items-center text-secondary-var">
|
| 272 |
+
<span class="material-symbols-rounded text-base mr-2">star</span> 0 stars
|
| 273 |
+
</li>
|
| 274 |
+
<li class="flex items-center text-secondary-var">
|
| 275 |
+
<span class="material-symbols-rounded text-base mr-2">fork_right</span> 0 forks
|
| 276 |
+
</li>
|
| 277 |
+
</ul>
|
| 278 |
+
</div>
|
| 279 |
+
|
| 280 |
+
<div class="bg-card-var p-4 rounded-lg border border-color-var transition-colors-theme">
|
| 281 |
+
<h3 class="text-md font-semibold text-color-var mb-3">Releases</h3>
|
| 282 |
+
<p class="text-sm text-secondary-var">No releases published</p>
|
| 283 |
+
<a href="#" class="text-sm text-link-var hover:text-link-hover-var mt-2 block">
|
| 284 |
+
Create a new release
|
| 285 |
+
</a>
|
| 286 |
+
</div>
|
| 287 |
+
</div>
|
| 288 |
+
|
| 289 |
+
</div>
|
| 290 |
+
|
| 291 |
+
</div>
|
| 292 |
+
|
| 293 |
+
<script>
|
| 294 |
+
// REPOSITORY PAGE SPECIFIC LOGIC
|
| 295 |
+
const fileTableBody = document.getElementById('file-table-body');
|
| 296 |
+
const fileTable = document.getElementById('file-table');
|
| 297 |
+
const emptyRepoMessage = document.getElementById('empty-repo-message');
|
| 298 |
+
const loadingSpinner = document.getElementById('loading-spinner');
|
| 299 |
+
const repoTitleElement = document.getElementById('repo-name');
|
| 300 |
+
const aboutDescription = document.getElementById('about-description');
|
| 301 |
+
const aboutLicense = document.getElementById('about-license');
|
| 302 |
+
const repoVisibility = document.getElementById('repo-visibility');
|
| 303 |
+
const readmeContent = document.getElementById('readme-content');
|
| 304 |
+
|
| 305 |
+
/**
|
| 306 |
+
* Gère les icônes selon le type d'élément (Fichier ou Dossier)
|
| 307 |
+
*/
|
| 308 |
+
const getFileIcon = (type) => {
|
| 309 |
+
// Supporte 'directory' venant du backend
|
| 310 |
+
if (type === 'directory' || type === 'folder') {
|
| 311 |
+
return { icon: 'folder', color: 'text-blue-500' }; // Dossier en bleu
|
| 312 |
+
}
|
| 313 |
+
return { icon: 'draft', color: 'text-secondary-var' }; // Fichier en gris
|
| 314 |
+
};
|
| 315 |
+
|
| 316 |
+
/**
|
| 317 |
+
* Charge les données du dépôt depuis l'API
|
| 318 |
+
*/
|
| 319 |
+
const loadRepoData = async () => {
|
| 320 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 321 |
+
const repoSlug = urlParams.get('repo_slug');
|
| 322 |
+
|
| 323 |
+
if (!repoSlug) {
|
| 324 |
+
loadingSpinner.innerHTML = '<p class="text-red-500">Erreur: Slug du dépôt manquant.</p>';
|
| 325 |
+
return;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
repoTitleElement.textContent = repoSlug;
|
| 329 |
+
loadingSpinner.classList.remove('hidden');
|
| 330 |
+
fileTable.classList.add('hidden');
|
| 331 |
+
emptyRepoMessage.classList.add('hidden');
|
| 332 |
+
|
| 333 |
+
try {
|
| 334 |
+
const response = await fetch(`/api/repo_data/${repoSlug}`);
|
| 335 |
+
const result = await response.json();
|
| 336 |
+
|
| 337 |
+
if (!result.success) {
|
| 338 |
+
loadingSpinner.innerHTML = `<p class="text-red-500">Erreur: ${result.message}</p>`;
|
| 339 |
+
return;
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
const data = result.data;
|
| 343 |
+
|
| 344 |
+
// 1. Infos du dépôt (About)
|
| 345 |
+
const info = data.repo_info || {};
|
| 346 |
+
repoTitleElement.textContent = info.repo_name || repoSlug;
|
| 347 |
+
aboutDescription.textContent = info.description || 'Pas de description.';
|
| 348 |
+
aboutLicense.innerHTML = `<span class="material-symbols-rounded text-base mr-2">policy</span> ${info.license || 'Apache-2.0'}`;
|
| 349 |
+
repoVisibility.textContent = info.visibility || 'Private';
|
| 350 |
+
|
| 351 |
+
// 2. Contenu README
|
| 352 |
+
readmeContent.innerHTML = `<div class="prose prose-sm max-w-none text-color-var">${data.readme_content}</div>`;
|
| 353 |
+
|
| 354 |
+
// 3. Liste des fichiers et dossiers
|
| 355 |
+
const items = data.file_list || [];
|
| 356 |
+
fileTableBody.innerHTML = '';
|
| 357 |
+
|
| 358 |
+
if (items.length === 0) {
|
| 359 |
+
emptyRepoMessage.classList.remove('hidden');
|
| 360 |
+
} else {
|
| 361 |
+
fileTable.classList.remove('hidden');
|
| 362 |
+
|
| 363 |
+
// Mise à jour de l'en-tête du dernier commit (premier item)
|
| 364 |
+
const firstItem = items[0];
|
| 365 |
+
document.getElementById('latest-commit-message').textContent = firstItem.last_commit || "Mise à jour via GitForge";
|
| 366 |
+
document.getElementById('latest-commit-time').textContent = firstItem.time_ago;
|
| 367 |
+
document.getElementById('latest-commit-hash').textContent = "main";
|
| 368 |
+
|
| 369 |
+
items.forEach(item => {
|
| 370 |
+
const { icon, color } = getFileIcon(item.type);
|
| 371 |
+
const isFile = item.type === 'file';
|
| 372 |
+
|
| 373 |
+
// URL: On ne navigue vers l'éditeur que si c'est un fichier
|
| 374 |
+
const editorUrl = `/mindus/nexus/editor?repo_slug=${repoSlug}&file_path=${encodeURIComponent(item.path)}`;
|
| 375 |
+
|
| 376 |
+
const row = document.createElement('tr');
|
| 377 |
+
row.className = 'hover:bg-active-var transition-colors-theme cursor-pointer group';
|
| 378 |
+
row.innerHTML = `
|
| 379 |
+
<td class="px-3 py-2 sm:px-4 sm:py-3 whitespace-nowrap w-2/5">
|
| 380 |
+
<div class="flex items-center">
|
| 381 |
+
<span class="material-symbols-rounded text-lg mr-2 align-middle ${color}">${icon}</span>
|
| 382 |
+
<a href="${isFile ? editorUrl : '#'}" class="text-sm font-medium text-color-var group-hover:text-link-var">
|
| 383 |
+
${item.name}
|
| 384 |
+
</a>
|
| 385 |
+
</div>
|
| 386 |
+
</td>
|
| 387 |
+
<td class="px-3 py-2 sm:px-4 sm:py-3 whitespace-nowrap text-sm text-secondary-var w-2/5">
|
| 388 |
+
<span class="truncate block max-w-xs">${item.last_commit || "Mise à jour via GitForge"}</span>
|
| 389 |
+
</td>
|
| 390 |
+
<td class="px-3 py-2 sm:px-4 sm:py-3 whitespace-nowrap text-sm text-secondary-var text-right w-1/5">
|
| 391 |
+
${item.time_ago}
|
| 392 |
+
</td>
|
| 393 |
+
`;
|
| 394 |
+
|
| 395 |
+
// Comportement au clic sur la ligne
|
| 396 |
+
row.addEventListener('click', (e) => {
|
| 397 |
+
if (e.target.tagName !== 'A' && isFile) {
|
| 398 |
+
window.location.href = editorUrl;
|
| 399 |
+
} else if (!isFile) {
|
| 400 |
+
console.log("Navigation dossier non implémentée pour :", item.name);
|
| 401 |
+
}
|
| 402 |
+
});
|
| 403 |
+
fileTableBody.appendChild(row);
|
| 404 |
+
});
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
} catch (error) {
|
| 408 |
+
console.error(error);
|
| 409 |
+
loadingSpinner.innerHTML = `<p class="text-red-500">Erreur fatale de connexion.</p>`;
|
| 410 |
+
} finally {
|
| 411 |
+
loadingSpinner.classList.add('hidden');
|
| 412 |
+
}
|
| 413 |
+
};
|
| 414 |
+
|
| 415 |
+
// --- LOGIQUE DES MENUS (BRANCHES & AJOUT) ---
|
| 416 |
+
const setupMenu = (toggleId, menuId) => {
|
| 417 |
+
const toggle = document.getElementById(toggleId);
|
| 418 |
+
const menu = document.getElementById(menuId);
|
| 419 |
+
if(!toggle || !menu) return;
|
| 420 |
+
|
| 421 |
+
toggle.addEventListener('click', (e) => {
|
| 422 |
+
e.stopPropagation();
|
| 423 |
+
menu.classList.toggle('hidden');
|
| 424 |
+
// Ferme l'autre menu s'il est ouvert
|
| 425 |
+
const otherMenuId = menuId === 'branch-menu' ? 'add-file-menu' : 'branch-menu';
|
| 426 |
+
const otherMenu = document.getElementById(otherMenuId);
|
| 427 |
+
if(otherMenu) otherMenu.classList.add('hidden');
|
| 428 |
+
});
|
| 429 |
+
};
|
| 430 |
+
|
| 431 |
+
setupMenu('branch-toggle', 'branch-menu');
|
| 432 |
+
setupMenu('add-file-toggle', 'add-file-menu');
|
| 433 |
+
|
| 434 |
+
// Fermer les menus lors d'un clic extérieur
|
| 435 |
+
document.addEventListener('click', () => {
|
| 436 |
+
const bMenu = document.getElementById('branch-menu');
|
| 437 |
+
const aMenu = document.getElementById('add-file-menu');
|
| 438 |
+
if(bMenu) bMenu.classList.add('hidden');
|
| 439 |
+
if(aMenu) aMenu.classList.add('hidden');
|
| 440 |
+
});
|
| 441 |
+
|
| 442 |
+
// Lancement au chargement
|
| 443 |
+
loadRepoData();
|
| 444 |
+
</script>
|
| 445 |
+
</body>
|
| 446 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/repo_files_branch.html
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - My Project</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.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 |
+
<style>
|
| 12 |
+
/* Inter font configuration */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Theme Variables and Styles */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Light Mode (UNIQUE Theme) */
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA;
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E;
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
}
|
| 31 |
+
/* Utility classes for 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 |
+
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color); }
|
| 39 |
+
|
| 40 |
+
/* Specific style for the navigation bar */
|
| 41 |
+
.repo-nav-link {
|
| 42 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 43 |
+
margin-right: 0.5rem; /* Spacing between links */
|
| 44 |
+
}
|
| 45 |
+
.repo-nav-link.active {
|
| 46 |
+
border-bottom-color: var(--text-link);
|
| 47 |
+
color: var(--text-color) !important;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
/* Styles for the loading spinner */
|
| 52 |
+
.spinner {
|
| 53 |
+
border: 4px solid var(--border-color);
|
| 54 |
+
border-top: 4px solid var(--text-link);
|
| 55 |
+
border-radius: 50%;
|
| 56 |
+
width: 40px;
|
| 57 |
+
height: 40px;
|
| 58 |
+
animation: spin 1s linear infinite;
|
| 59 |
+
}
|
| 60 |
+
/* Smaller spinner (KEPT IN CSS FOR REFERENCE) */
|
| 61 |
+
.small-spinner {
|
| 62 |
+
border: 2px solid var(--border-color);
|
| 63 |
+
border-top: 2px solid var(--text-link);
|
| 64 |
+
border-radius: 50%;
|
| 65 |
+
width: 20px;
|
| 66 |
+
height: 20px;
|
| 67 |
+
animation: spin 1s linear infinite;
|
| 68 |
+
}
|
| 69 |
+
@keyframes spin {
|
| 70 |
+
0% { transform: rotate(0deg); }
|
| 71 |
+
100% { transform: rotate(360deg); }
|
| 72 |
+
}
|
| 73 |
+
</style>
|
| 74 |
+
</head>
|
| 75 |
+
|
| 76 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 77 |
+
|
| 78 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 79 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 80 |
+
<div class="flex justify-between items-center h-16">
|
| 81 |
+
<div class="flex items-center space-x-4">
|
| 82 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6">
|
| 83 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme">GitForge</span>
|
| 84 |
+
<span class="text-secondary-var">/</span>
|
| 85 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme">
|
| 86 |
+
<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>
|
| 87 |
+
</a>
|
| 88 |
+
<span id="repo-visibility" class="px-2 py-0.5 text-xs font-medium rounded-full border border-color-var text-secondary-var">
|
| 89 |
+
Private
|
| 90 |
+
</span>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<div class="flex items-center space-x-3">
|
| 94 |
+
<div class="hidden sm:block">
|
| 95 |
+
<input type="text" placeholder="Type / to search"
|
| 96 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 97 |
+
</div>
|
| 98 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-color-var hover:text-link-var transition-colors-theme">
|
| 99 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 100 |
+
</a>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 106 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 107 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 108 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var active transition-colors-theme flex items-center">
|
| 109 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 110 |
+
</a>
|
| 111 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 112 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues
|
| 113 |
+
</a>
|
| 114 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 115 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests
|
| 116 |
+
</a>
|
| 117 |
+
<a href="/mindus/nexus/editor?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 118 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 119 |
+
</a>
|
| 120 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 121 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 122 |
+
</a>
|
| 123 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 124 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 125 |
+
</a>
|
| 126 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 127 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 128 |
+
</a>
|
| 129 |
+
</nav>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
</header>
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
<div id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 transition-colors-theme">
|
| 136 |
+
|
| 137 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center mb-6 space-y-4 sm:space-y-0">
|
| 138 |
+
<div class="flex items-center space-x-4">
|
| 139 |
+
|
| 140 |
+
<div class="relative inline-block text-left">
|
| 141 |
+
<button id="branch-toggle" class="flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 142 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span>
|
| 143 |
+
<span class="font-semibold" id="current-branch-name">main</span>
|
| 144 |
+
<span class="material-symbols-rounded text-base ml-2">arrow_drop_down</span>
|
| 145 |
+
</button>
|
| 146 |
+
|
| 147 |
+
<div id="branch-menu" class="hidden absolute left-0 mt-2 w-72 rounded-md shadow-lg bg-card-var ring-1 ring-border-color-var focus:outline-none z-50 transition-colors-theme">
|
| 148 |
+
<div class="p-3">
|
| 149 |
+
<input type="text" id="branch-filter" placeholder="Find a branch..."
|
| 150 |
+
class="w-full p-2 text-sm border border-color-var rounded-lg focus:outline-none focus:ring-1 focus:ring-link-var mb-2 bg-page-var text-color-var transition-colors-theme">
|
| 151 |
+
|
| 152 |
+
<a href="/mindus/nexus/new_branch?repo_slug={{ repo_slug }}" class="block text-sm text-link-var hover:text-link-hover-var p-1 rounded-md hover:bg-active-var transition-colors-theme">
|
| 153 |
+
<span class="material-symbols-rounded text-base mr-1 align-middle">visibility</span> View all branches
|
| 154 |
+
</a>
|
| 155 |
+
|
| 156 |
+
<div class="mt-2 max-h-40 overflow-y-auto" id="branch-list-container">
|
| 157 |
+
<div class="text-xs text-secondary-var p-1">Loading Branches...</div>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
<span class="text-sm text-secondary-var" id="branch-count">1 Branch</span>
|
| 163 |
+
<span class="text-sm text-secondary-var">0 Tags</span>
|
| 164 |
+
</div>
|
| 165 |
+
|
| 166 |
+
<div class="flex items-center space-x-3">
|
| 167 |
+
|
| 168 |
+
<div class="relative inline-block text-left">
|
| 169 |
+
<button id="add-file-toggle" class="inline-flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 170 |
+
<span class="material-symbols-rounded text-base mr-1">add</span> Add file
|
| 171 |
+
<span class="material-symbols-rounded text-base ml-1">arrow_drop_down</span>
|
| 172 |
+
</button>
|
| 173 |
+
|
| 174 |
+
<div id="add-file-menu" class="hidden absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-card-var ring-1 ring-border-color-var focus:outline-none z-50 transition-colors-theme">
|
| 175 |
+
<div class="py-1" role="menu" aria-orientation="vertical" aria-labelledby="add-file-toggle">
|
| 176 |
+
<a href="/mindus/nexus/editor?repo_slug={{ repo_slug }}" class="flex items-center px-4 py-2 text-sm text-color-var hover:bg-active-var transition-colors-theme" role="menuitem">
|
| 177 |
+
<span class="material-symbols-rounded mr-3 text-base">create_new_folder</span> Create New File
|
| 178 |
+
</a>
|
| 179 |
+
<a href="/mindus/nexus/upload_file?repo_slug={{ repo_slug }}" class="text-gray-700 block px-4 py-2 text-sm hover:bg-gray-100" role="menuitem">
|
| 180 |
+
<span class="material-symbols-rounded align-middle mr-2 text-lg">upload_file</span>
|
| 181 |
+
Upload files
|
| 182 |
+
</a>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
</div>
|
| 186 |
+
|
| 187 |
+
<button class="inline-flex items-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 188 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 189 |
+
<span class="material-symbols-rounded text-base ml-2">arrow_drop_down</span>
|
| 190 |
+
</button>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
|
| 194 |
+
<div class="space-y-6">
|
| 195 |
+
|
| 196 |
+
<div id="file-list-container" class="bg-card-var rounded-lg border border-color-var transition-colors-theme min-h-[100px]">
|
| 197 |
+
|
| 198 |
+
<div class="flex items-center p-3 border-b border-color-var">
|
| 199 |
+
<span class="material-symbols-rounded text-lg text-secondary-var mr-3">account_circle</span>
|
| 200 |
+
|
| 201 |
+
<div class="flex flex-col sm:flex-row sm:items-center w-full justify-between">
|
| 202 |
+
<a href="#" class="text-sm font-semibold text-color-var hover:text-link-var">mindus0</a>
|
| 203 |
+
<span id="latest-commit-message" class="text-sm text-secondary-var truncate mr-2 ml-2">Loading latest commit message...</span>
|
| 204 |
+
<a href="#" class="text-sm text-link-var hover:text-link-hover-var whitespace-nowrap ml-auto">
|
| 205 |
+
<span id="latest-commit-hash">N/A</span>
|
| 206 |
+
</a>
|
| 207 |
+
<span id="latest-commit-time" class="text-xs text-secondary-var ml-2 whitespace-nowrap hidden sm:inline">
|
| 208 |
+
N/A
|
| 209 |
+
</span>
|
| 210 |
+
<a href="#" class="text-sm text-link-var hover:text-link-hover-var whitespace-nowrap ml-4">
|
| 211 |
+
<span class="material-symbols-rounded text-base mr-1">history</span> <span id="commit-count">?</span> Commits
|
| 212 |
+
</a>
|
| 213 |
+
</div>
|
| 214 |
+
</div>
|
| 215 |
+
|
| 216 |
+
<div id="path-breadcrumb" class="p-3 text-sm text-secondary-var border-b border-color-var hidden">
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
<div id="loading-spinner" class="flex justify-center items-center p-12">
|
| 220 |
+
<div class="spinner"></div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<div id="empty-repo-message" class="hidden text-center p-8">
|
| 224 |
+
<span class="material-symbols-rounded text-6xl text-secondary-var mb-4">folder_off</span>
|
| 225 |
+
<h2 class="text-xl font-semibold mb-2 text-color-var">This repository is empty</h2>
|
| 226 |
+
<p class="text-secondary-var mb-6">Add your first file to start your project.</p>
|
| 227 |
+
</div>
|
| 228 |
+
|
| 229 |
+
<table id="file-table" class="min-w-full divide-y divide-color-var hidden">
|
| 230 |
+
<tbody id="file-table-body" class="divide-y divide-color-var/50 text-sm">
|
| 231 |
+
</tbody>
|
| 232 |
+
</table>
|
| 233 |
+
</div>
|
| 234 |
+
|
| 235 |
+
</div>
|
| 236 |
+
|
| 237 |
+
</div>
|
| 238 |
+
|
| 239 |
+
<script>
|
| 240 |
+
// REPOSITORY PAGE SPECIFIC LOGIC
|
| 241 |
+
|
| 242 |
+
const fileTableBody = document.getElementById('file-table-body');
|
| 243 |
+
const fileTable = document.getElementById('file-table');
|
| 244 |
+
const emptyRepoMessage = document.getElementById('empty-repo-message');
|
| 245 |
+
const loadingSpinner = document.getElementById('loading-spinner');
|
| 246 |
+
const repoTitleElement = document.getElementById('repo-name');
|
| 247 |
+
// About, License, Visibility and Readme elements are kept in JS for simplicity but are not used in the HTML
|
| 248 |
+
const aboutDescription = document.getElementById('about-description');
|
| 249 |
+
const aboutLicense = document.getElementById('about-license');
|
| 250 |
+
const repoVisibility = document.getElementById('repo-visibility');
|
| 251 |
+
const readmeContent = document.getElementById('readme-content');
|
| 252 |
+
const branchToggle = document.getElementById('branch-toggle');
|
| 253 |
+
const branchMenu = document.getElementById('branch-menu');
|
| 254 |
+
const branchListContainer = document.getElementById('branch-list-container');
|
| 255 |
+
const currentBranchNameDisplay = document.getElementById('current-branch-name');
|
| 256 |
+
const branchCountDisplay = document.getElementById('branch-count');
|
| 257 |
+
const pathBreadcrumb = document.getElementById('path-breadcrumb');
|
| 258 |
+
|
| 259 |
+
// Global Variables
|
| 260 |
+
let repoSlug = '{{ repo_slug }}'; // Should be rendered by Jinja, e.g., 'my-project'
|
| 261 |
+
|
| 262 |
+
// Get branch and path from URL or use defaults
|
| 263 |
+
const urlParams = new URLSearchParams(window.location.search);
|
| 264 |
+
const urlRepoSlug = urlParams.get('repo_slug'); // Always check URL parameters
|
| 265 |
+
|
| 266 |
+
// Logic de secours : Si Jinja n'a pas rendu la variable (elle vaut toujours '{{ repo_slug }}'),
|
| 267 |
+
// on essaie de la récupérer depuis les paramètres de l'URL.
|
| 268 |
+
if (repoSlug === '{{ repo_slug }}' && urlRepoSlug) {
|
| 269 |
+
repoSlug = urlRepoSlug;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
let currentBranch = urlParams.get('branch') || 'main';
|
| 273 |
+
let currentPath = urlParams.get('path') || ''; // Current folder path
|
| 274 |
+
|
| 275 |
+
// Function: Get File/Folder Icon based on type
|
| 276 |
+
const getFileIcon = (type) => {
|
| 277 |
+
// IMPORTANT: The backend should return 'folder' for directories
|
| 278 |
+
if (type === 'folder') {
|
| 279 |
+
return { icon: 'folder', color: 'text-link-var' }; // Blue for folders
|
| 280 |
+
}
|
| 281 |
+
// Default for files
|
| 282 |
+
return { icon: 'draft', color: 'text-secondary-var' }; // Gray for files
|
| 283 |
+
};
|
| 284 |
+
|
| 285 |
+
// Function: Get current date and time string (Placeholder for real 'time ago')
|
| 286 |
+
const getCurrentDateTimeString = () => {
|
| 287 |
+
const now = new Date();
|
| 288 |
+
const dateOptions = { year: 'numeric', month: 'short', day: 'numeric' };
|
| 289 |
+
const timeOptions = { hour: '2-digit', minute: '2-digit' };
|
| 290 |
+
|
| 291 |
+
const datePart = now.toLocaleDateString('en-US', dateOptions); // e.g., "Dec 14, 2025"
|
| 292 |
+
const timePart = now.toLocaleTimeString('en-US', timeOptions); // e.g., "3:30 PM"
|
| 293 |
+
|
| 294 |
+
return `${datePart} at ${timePart}`;
|
| 295 |
+
};
|
| 296 |
+
|
| 297 |
+
/**
|
| 298 |
+
* Updates the 'About' information and README content.
|
| 299 |
+
* NOTE: This function is largely kept for structure but its outputs are not displayed in the simplified HTML
|
| 300 |
+
*/
|
| 301 |
+
const loadRepoInfo = async () => {
|
| 302 |
+
try {
|
| 303 |
+
// NOTE: Simulate loading of static repo info (independent of branch)
|
| 304 |
+
const response = await fetch(`/api/repo_info/${repoSlug}`);
|
| 305 |
+
|
| 306 |
+
if (response.status === 404) {
|
| 307 |
+
// If repo not found or private/unauthorized
|
| 308 |
+
repoTitleElement.textContent = "Repository Not Found";
|
| 309 |
+
return;
|
| 310 |
+
}
|
| 311 |
+
|
| 312 |
+
const result = await response.json();
|
| 313 |
+
|
| 314 |
+
if (!result.success) {
|
| 315 |
+
console.error(`Loading error: ${result.message}`);
|
| 316 |
+
return;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
const info = result.data.repo_info || {};
|
| 320 |
+
|
| 321 |
+
repoTitleElement.textContent = info.repo_name || repoSlug;
|
| 322 |
+
// The following lines are now redundant but kept in JS
|
| 323 |
+
if (aboutDescription) aboutDescription.textContent = info.description || 'No description provided.';
|
| 324 |
+
if (aboutLicense) aboutLicense.innerHTML = `<span class="material-symbols-rounded text-base mr-2">policy</span> ${info.license || 'No license'}`;
|
| 325 |
+
if (repoVisibility) repoVisibility.textContent = info.visibility || 'Private';
|
| 326 |
+
if (readmeContent) readmeContent.innerHTML = result.data.readme_content || `<p class="text-secondary-var leading-relaxed">No README.md file found.</p>`;
|
| 327 |
+
|
| 328 |
+
} catch (error) {
|
| 329 |
+
console.error('Error loading repository info:', error);
|
| 330 |
+
repoTitleElement.textContent = `Fatal Error`;
|
| 331 |
+
}
|
| 332 |
+
};
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
/**
|
| 336 |
+
* Loads the list of branches and populates the selection menu. (Kept as is)
|
| 337 |
+
*/
|
| 338 |
+
const loadBranches = async () => {
|
| 339 |
+
branchListContainer.innerHTML = '<div class="text-xs text-secondary-var p-1">Loading Branches...</div>';
|
| 340 |
+
currentBranchNameDisplay.textContent = currentBranch;
|
| 341 |
+
|
| 342 |
+
try {
|
| 343 |
+
// NOTE: Using a placeholder API route for branches
|
| 344 |
+
const response = await fetch(`/api/repo/${repoSlug}/branches`);
|
| 345 |
+
const result = await response.json();
|
| 346 |
+
|
| 347 |
+
if (!result.success || !result.data || result.data.length === 0) {
|
| 348 |
+
// FALLBACK: If API fails, assume 'main' is the only branch
|
| 349 |
+
const branches = ['main', 'dev']; // Simulated branches
|
| 350 |
+
if (branches.length === 0) {
|
| 351 |
+
branchListContainer.innerHTML = `<div class="text-xs text-secondary-var p-1">No branches found.</div>`;
|
| 352 |
+
branchCountDisplay.textContent = '0 Branches';
|
| 353 |
+
return;
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
branchListContainer.innerHTML = '';
|
| 357 |
+
branchCountDisplay.textContent = `${branches.length} Branch${branches.length > 1 ? 'es' : ''}`;
|
| 358 |
+
|
| 359 |
+
const currentBranchTitle = document.createElement('div');
|
| 360 |
+
currentBranchTitle.className = 'text-xs text-secondary-var p-1';
|
| 361 |
+
currentBranchTitle.textContent = 'Branches (Simulated)';
|
| 362 |
+
branchListContainer.appendChild(currentBranchTitle);
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
branches.forEach(branch => {
|
| 366 |
+
const isActive = branch === currentBranch;
|
| 367 |
+
const branchItem = document.createElement('div');
|
| 368 |
+
branchItem.className = `flex items-center p-1.5 text-sm font-semibold text-color-var rounded-md cursor-pointer branch-item ${isActive ? 'bg-active-var' : 'hover:bg-active-var'}`;
|
| 369 |
+
branchItem.setAttribute('data-branch-name', branch);
|
| 370 |
+
|
| 371 |
+
branchItem.innerHTML = `
|
| 372 |
+
${isActive ? '<span class="material-symbols-rounded text-base mr-2">check</span>' : '<span class="material-symbols-rounded text-base mr-2 opacity-0">check</span>'}
|
| 373 |
+
${branch}
|
| 374 |
+
`;
|
| 375 |
+
|
| 376 |
+
branchItem.addEventListener('click', (e) => {
|
| 377 |
+
e.preventDefault();
|
| 378 |
+
if (branch !== currentBranch) {
|
| 379 |
+
selectBranch(branch);
|
| 380 |
+
}
|
| 381 |
+
toggleBranchMenu(e); // Close menu after selection
|
| 382 |
+
});
|
| 383 |
+
|
| 384 |
+
branchListContainer.appendChild(branchItem);
|
| 385 |
+
});
|
| 386 |
+
return;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
// Real API logic below (if successful)
|
| 390 |
+
const branches = result.data;
|
| 391 |
+
// ... (Rest of loadBranches remains the same)
|
| 392 |
+
|
| 393 |
+
} catch (error) {
|
| 394 |
+
// If the fetch fails completely, proceed with a fallback or error message
|
| 395 |
+
console.error('Error loading branches:', error);
|
| 396 |
+
// Fallback: If fetch fails, we'll try to keep the existing currentBranch logic
|
| 397 |
+
if (branchListContainer) branchListContainer.innerHTML = `<div class="text-xs text-red-500 p-1">Failed to load branches.</div>`;
|
| 398 |
+
}
|
| 399 |
+
};
|
| 400 |
+
|
| 401 |
+
/**
|
| 402 |
+
* Updates the selected branch, URL, and reloads files. (Kept as is)
|
| 403 |
+
* @param {string} branchName
|
| 404 |
+
*/
|
| 405 |
+
const selectBranch = (branchName) => {
|
| 406 |
+
if (branchName === currentBranch) return; // Do nothing if it's the same branch
|
| 407 |
+
|
| 408 |
+
currentBranch = branchName;
|
| 409 |
+
currentBranchNameDisplay.textContent = currentBranch;
|
| 410 |
+
currentPath = ''; // Reset path when changing branch
|
| 411 |
+
|
| 412 |
+
// Update URL to persist state
|
| 413 |
+
updateUrl(currentBranch, currentPath);
|
| 414 |
+
|
| 415 |
+
// Update branch menu display
|
| 416 |
+
const branchItems = document.querySelectorAll('.branch-item');
|
| 417 |
+
branchItems.forEach(item => {
|
| 418 |
+
const name = item.getAttribute('data-branch-name');
|
| 419 |
+
const checkIcon = item.querySelector('.material-symbols-rounded');
|
| 420 |
+
|
| 421 |
+
if (name === branchName) {
|
| 422 |
+
item.classList.add('bg-active-var');
|
| 423 |
+
item.classList.remove('hover:bg-active-var');
|
| 424 |
+
if (checkIcon) checkIcon.style.opacity = '1';
|
| 425 |
+
} else {
|
| 426 |
+
item.classList.remove('bg-active-var');
|
| 427 |
+
item.classList.add('hover:bg-active-var');
|
| 428 |
+
if (checkIcon) checkIcon.style.opacity = '0';
|
| 429 |
+
}
|
| 430 |
+
});
|
| 431 |
+
|
| 432 |
+
// Reload files for the new branch (at root path)
|
| 433 |
+
loadFileTree(currentBranch, currentPath);
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
/**
|
| 437 |
+
* Updates the browser URL with the current branch and path. (Kept as is)
|
| 438 |
+
* @param {string} branch
|
| 439 |
+
* @param {string} path
|
| 440 |
+
*/
|
| 441 |
+
const updateUrl = (branch, path) => {
|
| 442 |
+
const newUrl = new URL(window.location.href);
|
| 443 |
+
// Ensure repo_slug is in the URL
|
| 444 |
+
if (repoSlug && repoSlug !== '{{ repo_slug }}') {
|
| 445 |
+
newUrl.searchParams.set('repo_slug', repoSlug);
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
newUrl.searchParams.set('branch', branch);
|
| 449 |
+
if (path) {
|
| 450 |
+
newUrl.searchParams.set('path', path);
|
| 451 |
+
} else {
|
| 452 |
+
newUrl.searchParams.delete('path');
|
| 453 |
+
}
|
| 454 |
+
window.history.pushState({ path: newUrl.href, branch: branch, currentPath: path }, '', newUrl.href);
|
| 455 |
+
};
|
| 456 |
+
|
| 457 |
+
/**
|
| 458 |
+
* Generates and displays the current path breadcrumb. (Kept as is)
|
| 459 |
+
*/
|
| 460 |
+
const renderBreadcrumb = () => {
|
| 461 |
+
pathBreadcrumb.innerHTML = '';
|
| 462 |
+
if (!currentPath) {
|
| 463 |
+
pathBreadcrumb.classList.add('hidden');
|
| 464 |
+
return;
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
pathBreadcrumb.classList.remove('hidden');
|
| 468 |
+
|
| 469 |
+
// Create Go Up button
|
| 470 |
+
const upButton = document.createElement('a');
|
| 471 |
+
upButton.href = '#';
|
| 472 |
+
upButton.className = 'text-link-var hover:text-link-hover-var mr-2 inline-flex items-center';
|
| 473 |
+
upButton.innerHTML = `<span class="material-symbols-rounded text-lg">subdirectory_arrow_left</span> Up`;
|
| 474 |
+
upButton.addEventListener('click', (e) => {
|
| 475 |
+
e.preventDefault();
|
| 476 |
+
const parts = currentPath.split('/');
|
| 477 |
+
parts.pop();
|
| 478 |
+
navigateToPath(parts.join('/'));
|
| 479 |
+
});
|
| 480 |
+
pathBreadcrumb.appendChild(upButton);
|
| 481 |
+
|
| 482 |
+
|
| 483 |
+
const parts = currentPath.split('/');
|
| 484 |
+
let pathAccumulator = '';
|
| 485 |
+
|
| 486 |
+
parts.forEach((part, index) => {
|
| 487 |
+
if (!part) return; // Skip empty parts from initial or trailing slashes
|
| 488 |
+
|
| 489 |
+
pathAccumulator = pathAccumulator ? `${pathAccumulator}/${part}` : part;
|
| 490 |
+
const isLast = index === parts.length - 1;
|
| 491 |
+
|
| 492 |
+
const partElement = document.createElement('span');
|
| 493 |
+
partElement.className = 'inline-flex items-center';
|
| 494 |
+
partElement.innerHTML = `<span class="mx-1">/</span>`;
|
| 495 |
+
|
| 496 |
+
const linkElement = document.createElement('a');
|
| 497 |
+
linkElement.href = '#';
|
| 498 |
+
linkElement.textContent = part;
|
| 499 |
+
|
| 500 |
+
if (isLast) {
|
| 501 |
+
linkElement.className = 'font-semibold text-color-var'; // Last part is just text/strong
|
| 502 |
+
} else {
|
| 503 |
+
linkElement.className = 'text-link-var hover:text-link-hover-var';
|
| 504 |
+
const pathToNavigate = pathAccumulator;
|
| 505 |
+
linkElement.addEventListener('click', (e) => {
|
| 506 |
+
e.preventDefault();
|
| 507 |
+
navigateToPath(pathToNavigate);
|
| 508 |
+
});
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
pathAccumulator = pathAccumulator; // Ensure accumulator is full path for next step
|
| 512 |
+
|
| 513 |
+
partElement.prepend(linkElement);
|
| 514 |
+
pathBreadcrumb.appendChild(partElement);
|
| 515 |
+
});
|
| 516 |
+
};
|
| 517 |
+
|
| 518 |
+
/**
|
| 519 |
+
* Changes the current path and reloads the file tree. (Kept as is)
|
| 520 |
+
* @param {string} newPath The new folder path to navigate to.
|
| 521 |
+
*/
|
| 522 |
+
const navigateToPath = (newPath) => {
|
| 523 |
+
currentPath = newPath;
|
| 524 |
+
updateUrl(currentBranch, currentPath);
|
| 525 |
+
loadFileTree(currentBranch, currentPath);
|
| 526 |
+
};
|
| 527 |
+
|
| 528 |
+
|
| 529 |
+
/**
|
| 530 |
+
* Loads the list of files/folders for the given branch and path using the new API route.
|
| 531 |
+
* @param {string} branchName The branch to load.
|
| 532 |
+
* @param {string} path The folder path to load content from (can be empty for root).
|
| 533 |
+
*/
|
| 534 |
+
const loadFileTree = async (branchName, path) => {
|
| 535 |
+
loadingSpinner.classList.remove('hidden');
|
| 536 |
+
fileTable.classList.add('hidden');
|
| 537 |
+
emptyRepoMessage.classList.add('hidden');
|
| 538 |
+
fileTableBody.innerHTML = '';
|
| 539 |
+
renderBreadcrumb();
|
| 540 |
+
|
| 541 |
+
// Check if repoSlug is valid before making the API call
|
| 542 |
+
if (!repoSlug || repoSlug === '{{ repo_slug }}') {
|
| 543 |
+
loadingSpinner.classList.add('hidden');
|
| 544 |
+
loadingSpinner.innerHTML = '<p class="text-red-500">Error: Repository slug is missing or invalid.</p>';
|
| 545 |
+
return;
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
// Construct API endpoint: /api/repo/<repo_slug>/content?branch=main&path=src/components
|
| 549 |
+
// L'API est ajustée pour utiliser 'path'
|
| 550 |
+
const apiEndpoint = `/api/repo/${repoSlug}/content?branch=${encodeURIComponent(branchName)}&path=${encodeURIComponent(path)}`;
|
| 551 |
+
|
| 552 |
+
try {
|
| 553 |
+
const response = await fetch(apiEndpoint, {
|
| 554 |
+
method: 'GET',
|
| 555 |
+
headers: { 'Content-Type': 'application/json' },
|
| 556 |
+
});
|
| 557 |
+
|
| 558 |
+
if (!response.ok) {
|
| 559 |
+
// Si la route est 404, cela signifie que le dépôt est introuvable ou le chemin est incorrect
|
| 560 |
+
const errorText = await response.text();
|
| 561 |
+
loadingSpinner.innerHTML = `<p class="text-red-500">Erreur de chargement: ${response.statusText}. Dépôt ou chemin non trouvé. (Détails: ${errorText.substring(0, 100)})</p>`;
|
| 562 |
+
return;
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
const result = await response.json();
|
| 566 |
+
|
| 567 |
+
if (!result.success) {
|
| 568 |
+
loadingSpinner.innerHTML = `<p class="text-red-500">Loading error for path ${path} in branch ${branchName}: ${result.message}</p>`;
|
| 569 |
+
return;
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
const filesFromApi = result.content || [];
|
| 573 |
+
|
| 574 |
+
if (filesFromApi.length === 0) {
|
| 575 |
+
emptyRepoMessage.classList.remove('hidden');
|
| 576 |
+
} else {
|
| 577 |
+
fileTable.classList.remove('hidden');
|
| 578 |
+
|
| 579 |
+
// Mettre à jour les informations de commit
|
| 580 |
+
document.getElementById('latest-commit-message').textContent = filesFromApi[0]?.commit_message || "Commit data not available";
|
| 581 |
+
document.getElementById('latest-commit-hash').textContent = "N/A"; // L'API ne retourne pas le hash dans la structure actuelle
|
| 582 |
+
document.getElementById('latest-commit-time').textContent = filesFromApi[0]?.time_ago || "N/A"; // Utiliser le temps du premier fichier
|
| 583 |
+
document.getElementById('commit-count').textContent = result.data?.commit_count || "?"; // Assumes commit_count is available at result.data
|
| 584 |
+
|
| 585 |
+
// Sort: Folders first, then files, both alphabetically
|
| 586 |
+
filesFromApi.sort((a, b) => {
|
| 587 |
+
if (a.type === 'folder' && b.type !== 'folder') return -1;
|
| 588 |
+
if (a.type !== 'folder' && b.type === 'folder') return 1;
|
| 589 |
+
return a.name.localeCompare(b.name);
|
| 590 |
+
});
|
| 591 |
+
|
| 592 |
+
|
| 593 |
+
filesFromApi.forEach(item => {
|
| 594 |
+
const { icon, color } = getFileIcon(item.type);
|
| 595 |
+
|
| 596 |
+
// Determine time value. Use current time if item.time_ago is empty/null (simulated)
|
| 597 |
+
const timeDisplay = item.time_ago || getCurrentDateTimeString();
|
| 598 |
+
|
| 599 |
+
// Determine the full path for navigation/action
|
| 600 |
+
const itemPath = path ? `${path}/${item.name}` : item.name;
|
| 601 |
+
|
| 602 |
+
const row = document.createElement('tr');
|
| 603 |
+
row.className = 'hover:bg-active-var transition-colors-theme cursor-pointer';
|
| 604 |
+
|
| 605 |
+
// Determine the target URL for the item (editor for files, current page for folders)
|
| 606 |
+
let targetUrl;
|
| 607 |
+
if (item.type === 'file') {
|
| 608 |
+
// File: link to editor with full path
|
| 609 |
+
targetUrl = `/mindus/nexus/editor?repo_slug=${repoSlug}&file_path=${encodeURIComponent(itemPath)}&branch=${encodeURIComponent(branchName)}`;
|
| 610 |
+
} else {
|
| 611 |
+
// Folder: link to the current page but with the new path
|
| 612 |
+
targetUrl = `?repo_slug=${repoSlug}&branch=${encodeURIComponent(branchName)}&path=${encodeURIComponent(itemPath)}`;
|
| 613 |
+
}
|
| 614 |
+
|
| 615 |
+
row.innerHTML = `
|
| 616 |
+
<td class="px-3 py-2 sm:px-4 sm:py-3 whitespace-nowrap w-4/12">
|
| 617 |
+
<div class="flex items-center">
|
| 618 |
+
<span class="material-symbols-rounded text-lg mr-2 align-middle ${color}">${icon}</span>
|
| 619 |
+
<a href="${targetUrl}" class="text-sm font-medium text-color-var hover:text-link-var">
|
| 620 |
+
${item.name}
|
| 621 |
+
</a>
|
| 622 |
+
</div>
|
| 623 |
+
</td>
|
| 624 |
+
<td class="px-3 py-2 sm:px-4 sm:py-3 whitespace-nowrap text-sm text-secondary-var w-6/12">
|
| 625 |
+
<span class="truncate block max-w-full">${item.commit_message || 'N/A (No commit message provided)'}</span>
|
| 626 |
+
</td>
|
| 627 |
+
<td class="px-3 py-2 sm:px-4 sm:py-3 whitespace-nowrap text-sm text-secondary-var text-right w-2/12">
|
| 628 |
+
${timeDisplay} </td>
|
| 629 |
+
`;
|
| 630 |
+
// Make the whole row clickable
|
| 631 |
+
row.addEventListener('click', (e) => {
|
| 632 |
+
// Avoid double-click if the user clicks on the <a> link
|
| 633 |
+
if (e.target.tagName !== 'A' && e.target.closest('a') === null) {
|
| 634 |
+
if (item.type === 'folder') {
|
| 635 |
+
navigateToPath(itemPath);
|
| 636 |
+
} else {
|
| 637 |
+
// Navigate to the editor for the clicked file
|
| 638 |
+
window.location.href = targetUrl;
|
| 639 |
+
}
|
| 640 |
+
}
|
| 641 |
+
});
|
| 642 |
+
fileTableBody.appendChild(row);
|
| 643 |
+
});
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
} catch (error) {
|
| 647 |
+
loadingSpinner.innerHTML = `<p class="text-red-500">Erreur fatale: Échec du chargement de l'arborescence des fichiers pour le chemin ${path}. ${error.message}</p>`;
|
| 648 |
+
console.error('Error loading repository file tree:', error);
|
| 649 |
+
} finally {
|
| 650 |
+
loadingSpinner.classList.add('hidden');
|
| 651 |
+
}
|
| 652 |
+
};
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
/**
|
| 656 |
+
* Main initialization function on page load. (Kept as is)
|
| 657 |
+
*/
|
| 658 |
+
const initRepoPage = () => {
|
| 659 |
+
|
| 660 |
+
// 1. Validation du repoSlug (maintenant plus robuste)
|
| 661 |
+
if (!repoSlug || repoSlug === '{{ repo_slug }}') {
|
| 662 |
+
loadingSpinner.innerHTML = '<p class="text-red-500">Error: Repository slug is missing or invalid.</p>';
|
| 663 |
+
return;
|
| 664 |
+
}
|
| 665 |
+
|
| 666 |
+
// 2. Initialisation normale
|
| 667 |
+
currentBranchNameDisplay.textContent = currentBranch;
|
| 668 |
+
repoTitleElement.textContent = repoSlug;
|
| 669 |
+
|
| 670 |
+
// 3. Load branches
|
| 671 |
+
loadBranches();
|
| 672 |
+
|
| 673 |
+
// 4. Load static repo info (About, README) - Not visible in the simplified page but still good practice
|
| 674 |
+
loadRepoInfo();
|
| 675 |
+
|
| 676 |
+
// 5. Load file tree for the current branch and path
|
| 677 |
+
loadFileTree(currentBranch, currentPath);
|
| 678 |
+
|
| 679 |
+
// Update URL to ensure 'branch' and 'path' are correctly set in the URL bar
|
| 680 |
+
updateUrl(currentBranch, currentPath);
|
| 681 |
+
}
|
| 682 |
+
|
| 683 |
+
// --- "BRANCH" MENU LOGIC --- (Kept as is)
|
| 684 |
+
const toggleBranchMenu = (event) => {
|
| 685 |
+
event.stopPropagation();
|
| 686 |
+
branchMenu.classList.toggle('hidden');
|
| 687 |
+
// Ensure other menus are closed
|
| 688 |
+
addFileMenu.classList.add('hidden');
|
| 689 |
+
};
|
| 690 |
+
|
| 691 |
+
branchToggle.addEventListener('click', toggleBranchMenu);
|
| 692 |
+
|
| 693 |
+
// --- "ADD FILE" MENU LOGIC --- (Kept as is)
|
| 694 |
+
const addFileToggle = document.getElementById('add-file-toggle');
|
| 695 |
+
const addFileMenu = document.getElementById('add-file-menu');
|
| 696 |
+
|
| 697 |
+
const toggleAddFileMenu = (event) => {
|
| 698 |
+
event.stopPropagation();
|
| 699 |
+
addFileMenu.classList.toggle('hidden');
|
| 700 |
+
// Ensure other menus are closed
|
| 701 |
+
branchMenu.classList.add('hidden');
|
| 702 |
+
};
|
| 703 |
+
|
| 704 |
+
addFileToggle.addEventListener('click', toggleAddFileMenu);
|
| 705 |
+
|
| 706 |
+
|
| 707 |
+
// Event listener to close menus on outside click (Kept as is)
|
| 708 |
+
document.addEventListener('click', (event) => {
|
| 709 |
+
// Close "Add file" menu
|
| 710 |
+
if (!addFileMenu.contains(event.target) && !addFileToggle.contains(event.target)) {
|
| 711 |
+
addFileMenu.classList.add('hidden');
|
| 712 |
+
}
|
| 713 |
+
// Close "Branch" menu
|
| 714 |
+
if (!branchMenu.contains(event.target) && !branchToggle.contains(event.target)) {
|
| 715 |
+
branchMenu.classList.add('hidden');
|
| 716 |
+
}
|
| 717 |
+
});
|
| 718 |
+
|
| 719 |
+
// Listener for branch filtering (Kept as is)
|
| 720 |
+
document.getElementById('branch-filter').addEventListener('input', (e) => {
|
| 721 |
+
const filterText = e.target.value.toLowerCase();
|
| 722 |
+
const branchItems = document.querySelectorAll('.branch-item');
|
| 723 |
+
branchItems.forEach(item => {
|
| 724 |
+
const branchName = item.getAttribute('data-branch-name').toLowerCase();
|
| 725 |
+
item.style.display = branchName.includes(filterText) ? 'flex' : 'none';
|
| 726 |
+
});
|
| 727 |
+
});
|
| 728 |
+
|
| 729 |
+
// Handle back/forward navigation (Kept as is)
|
| 730 |
+
window.addEventListener('popstate', (e) => {
|
| 731 |
+
const state = e.state;
|
| 732 |
+
if (state && state.branch) {
|
| 733 |
+
currentBranch = state.branch;
|
| 734 |
+
currentPath = state.currentPath || '';
|
| 735 |
+
currentBranchNameDisplay.textContent = currentBranch;
|
| 736 |
+
loadFileTree(currentBranch, currentPath);
|
| 737 |
+
loadBranches(); // Refresh branch menu display if needed
|
| 738 |
+
} else {
|
| 739 |
+
// Reload with current URL params if no state is available
|
| 740 |
+
const popUrlParams = new URLSearchParams(window.location.search);
|
| 741 |
+
// Re-fetch slug from URL in case of navigation
|
| 742 |
+
repoSlug = popUrlParams.get('repo_slug') || '{{ repo_slug }}';
|
| 743 |
+
if (repoSlug === '{{ repo_slug }}') {
|
| 744 |
+
console.error("Popstate error: Could not retrieve repo slug from URL.");
|
| 745 |
+
return;
|
| 746 |
+
}
|
| 747 |
+
|
| 748 |
+
currentBranch = popUrlParams.get('branch') || 'main';
|
| 749 |
+
currentPath = popUrlParams.get('path') || '';
|
| 750 |
+
currentBranchNameDisplay.textContent = currentBranch;
|
| 751 |
+
loadFileTree(currentBranch, currentPath);
|
| 752 |
+
}
|
| 753 |
+
});
|
| 754 |
+
|
| 755 |
+
|
| 756 |
+
// Call function on page load
|
| 757 |
+
initRepoPage();
|
| 758 |
+
</script>
|
| 759 |
+
</body>
|
| 760 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/resources.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/script.js
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<script>
|
| 2 |
+
// --- 1. CONFIGURATION: Nouvelle structure pour Secrets/Variables et préservation des dépendances existantes ---
|
| 3 |
+
|
| 4 |
+
// Utilisation de la variable Jinja2 pour le slug (nouvelle méthode demandée)
|
| 5 |
+
const REPO_SLUG = '{{ repo_slug }}';
|
| 6 |
+
|
| 7 |
+
// Nouvelle URL de base pour les appels API des secrets/variables (demandée par l'utilisateur)
|
| 8 |
+
const BASE_API_URL = `/api/repo_data/${REPO_SLUG}`;
|
| 9 |
+
|
| 10 |
+
// Variables existantes et nécessaires pour les autres fonctionnalités
|
| 11 |
+
const USER_ID = document.getElementById('repo-user').textContent.trim();
|
| 12 |
+
const GENERAL_SETTINGS_API_URL = `/api/settings/${USER_ID}/repo/${REPO_SLUG}`; // Ancienne BASE_API_URL (pour General Settings)
|
| 13 |
+
const REPO_DELETE_API_URL = `/api/repos/${REPO_SLUG}`; // Route de suppression
|
| 14 |
+
|
| 15 |
+
// --- 2. FONCTIONS DE RENDU (Affichage de la liste) ---
|
| 16 |
+
function renderConfigItems(items, type) {
|
| 17 |
+
const container = document.getElementById(`${type}-list-container`);
|
| 18 |
+
container.innerHTML = '';
|
| 19 |
+
if (items.length === 0) {
|
| 20 |
+
container.innerHTML = `<p class="text-sm text-secondary-var italic">Aucun ${type.slice(0, -1)} n'a été trouvé.</p>`;
|
| 21 |
+
return;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
items.forEach(item => {
|
| 25 |
+
// Encode les valeurs pour les passer aux fonctions JS (important pour les guillemets simples/doubles)
|
| 26 |
+
const nameEncoded = encodeURIComponent(item.name);
|
| 27 |
+
const descriptionEncoded = encodeURIComponent(item.description || '');
|
| 28 |
+
// La valeur des secrets sera masquée côté backend, mais la valeur des variables est visible
|
| 29 |
+
const valueDisplay = (type === 'secrets') ? '***SECRET_VALUE_HIDDEN***' : item.value;
|
| 30 |
+
const valueEncoded = encodeURIComponent(valueDisplay);
|
| 31 |
+
|
| 32 |
+
const itemHtml = `
|
| 33 |
+
<div class="flex justify-between items-center p-3 bg-card-var border border-color-var/50 rounded-lg">
|
| 34 |
+
<div class="flex-1 min-w-0">
|
| 35 |
+
<div class="font-mono text-sm font-semibold text-color-var truncate">${item.name}</div>
|
| 36 |
+
<div class="text-xs text-secondary-var mt-0.5 truncate">${item.description || 'No description'}</div>
|
| 37 |
+
<div class="text-xs text-secondary-var mt-0.5 font-mono">${valueDisplay}</div>
|
| 38 |
+
</div>
|
| 39 |
+
<div class="flex space-x-2 ml-4">
|
| 40 |
+
<button onclick="editConfigItem('${type}', '${nameEncoded}', '${descriptionEncoded}', '${valueEncoded}')"
|
| 41 |
+
class="text-xs text-link-var hover:text-primary-color-var transition duration-150">
|
| 42 |
+
Edit
|
| 43 |
+
</button>
|
| 44 |
+
<button onclick="deleteConfigItem('${type}', '${nameEncoded}')"
|
| 45 |
+
class="text-xs text-red-500 hover:text-red-700 transition duration-150">
|
| 46 |
+
Delete
|
| 47 |
+
</button>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
`;
|
| 51 |
+
container.insertAdjacentHTML('beforeend', itemHtml);
|
| 52 |
+
});
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
// --- 3. FONCTION DE LECTURE (FETCH) ---
|
| 56 |
+
async function fetchConfigItems(type) {
|
| 57 |
+
const container = document.getElementById(`${type}-list-container`);
|
| 58 |
+
container.innerHTML = `<p class="text-sm text-secondary-var italic">Chargement des ${type}...</p>`;
|
| 59 |
+
|
| 60 |
+
try {
|
| 61 |
+
// item_type est au singulier ('secret' ou 'variable')
|
| 62 |
+
const item_type = type.slice(0, -1);
|
| 63 |
+
const response = await fetch(`${BASE_API_URL}/items?item_type=${item_type}`);
|
| 64 |
+
const data = await response.json();
|
| 65 |
+
|
| 66 |
+
if (response.ok && data.success) {
|
| 67 |
+
renderConfigItems(data.items, type);
|
| 68 |
+
} else {
|
| 69 |
+
container.innerHTML = `<p class="text-sm text-red-500">Erreur de chargement: ${data.message || 'Erreur inconnue'}</p>`;
|
| 70 |
+
}
|
| 71 |
+
} catch (error) {
|
| 72 |
+
container.innerHTML = `<p class="text-sm text-red-500">Erreur réseau lors du chargement des ${type}.</p>`;
|
| 73 |
+
console.error(`Erreur lors du chargement des ${type}:`, error);
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
// --- 5. FONCTION CRUD : CREATE/UPDATE (Sauvegarde) ---
|
| 79 |
+
async function handleConfigOperation(event, type) {
|
| 80 |
+
event.preventDefault();
|
| 81 |
+
const form = event.target;
|
| 82 |
+
const item_type = type.slice(0, -1); // 'secrets' -> 'secret', 'variables' -> 'variable'
|
| 83 |
+
|
| 84 |
+
const payload = {
|
| 85 |
+
name: form.elements['name'].value,
|
| 86 |
+
description: form.elements['description'].value,
|
| 87 |
+
value: form.elements['value'].value,
|
| 88 |
+
item_type: item_type // Requis par le backend
|
| 89 |
+
};
|
| 90 |
+
|
| 91 |
+
// Désactiver le bouton pendant le traitement
|
| 92 |
+
const submitButton = form.querySelector('button[type="submit"]');
|
| 93 |
+
submitButton.disabled = true;
|
| 94 |
+
submitButton.textContent = 'Saving...';
|
| 95 |
+
|
| 96 |
+
try {
|
| 97 |
+
const response = await fetch(`${BASE_API_URL}/update_item`, {
|
| 98 |
+
method: 'POST', // Utilise la route POST pour la mise à jour (Upsert)
|
| 99 |
+
headers: { 'Content-Type': 'application/json' },
|
| 100 |
+
body: JSON.stringify(payload)
|
| 101 |
+
});
|
| 102 |
+
|
| 103 |
+
const data = await response.json();
|
| 104 |
+
|
| 105 |
+
if (response.ok && data.success) {
|
| 106 |
+
alert(data.message);
|
| 107 |
+
// Masquer le formulaire et mettre à jour la liste
|
| 108 |
+
document.getElementById(`add-${item_type}-form`).classList.add('hidden');
|
| 109 |
+
document.getElementById(`add-${item_type}-button`).classList.remove('hidden');
|
| 110 |
+
fetchConfigItems(type); // Recharger les données
|
| 111 |
+
} else {
|
| 112 |
+
alert(`Erreur de sauvegarde: ${data.message || 'Erreur interne.'}`);
|
| 113 |
+
}
|
| 114 |
+
} catch (error) {
|
| 115 |
+
alert(`Erreur réseau lors de la sauvegarde du ${item_type}.`);
|
| 116 |
+
console.error(`Erreur de sauvegarde du ${item_type}:`, error);
|
| 117 |
+
} finally {
|
| 118 |
+
submitButton.disabled = false;
|
| 119 |
+
submitButton.textContent = item_type.charAt(0).toUpperCase() + item_type.slice(1);
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
// --- 6. FONCTION POUR AFFICHER LE FORMULAIRE DE CRÉATION/ÉDITION ---
|
| 124 |
+
function showConfigForm(type) {
|
| 125 |
+
const item_type = type.slice(0, -1);
|
| 126 |
+
const formContainer = document.getElementById(`add-${item_type}-form`);
|
| 127 |
+
const addButton = document.getElementById(`add-${item_type}-button`);
|
| 128 |
+
|
| 129 |
+
// Cacher l'autre formulaire si visible
|
| 130 |
+
const otherType = (type === 'secrets') ? 'variables' : 'secrets';
|
| 131 |
+
const otherItemType = otherType.slice(0, -1);
|
| 132 |
+
document.getElementById(`add-${otherItemType}-form`).classList.add('hidden');
|
| 133 |
+
document.getElementById(`add-${otherItemType}-button`).classList.remove('hidden');
|
| 134 |
+
|
| 135 |
+
// Reset le formulaire et le configurer pour une 'création'
|
| 136 |
+
const form = formContainer.querySelector('form');
|
| 137 |
+
form.reset();
|
| 138 |
+
formContainer.querySelector('h4').textContent = `Add new ${item_type}`;
|
| 139 |
+
form.querySelector('button[type="submit"]').textContent = `Save ${item_type}`;
|
| 140 |
+
form.querySelector('[name="value"]').type = (type === 'secrets') ? 'password' : 'text';
|
| 141 |
+
form.elements['name'].readOnly = false; // Réactiver l'édition du nom
|
| 142 |
+
|
| 143 |
+
formContainer.classList.remove('hidden');
|
| 144 |
+
addButton.classList.add('hidden');
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
// --- 7. FONCTION POUR POPULER LE FORMULAIRE POUR L'ÉDITION ---
|
| 148 |
+
function editConfigItem(type, nameEncoded, descriptionEncoded, valueEncoded) {
|
| 149 |
+
const item_type = type.slice(0, -1);
|
| 150 |
+
|
| 151 |
+
// Afficher le formulaire d'abord
|
| 152 |
+
showConfigForm(type);
|
| 153 |
+
|
| 154 |
+
const form = document.getElementById(`add-${item_type}-form`).querySelector('form');
|
| 155 |
+
|
| 156 |
+
// Décoder et peupler les champs
|
| 157 |
+
const name = decodeURIComponent(nameEncoded);
|
| 158 |
+
const description = decodeURIComponent(descriptionEncoded);
|
| 159 |
+
|
| 160 |
+
form.elements['name'].value = name;
|
| 161 |
+
form.elements['name'].readOnly = true; // Empêcher l'édition du nom lors de l'Update
|
| 162 |
+
form.elements['description'].value = description;
|
| 163 |
+
|
| 164 |
+
// IMPORTANT: La valeur des secrets est masquée par le backend.
|
| 165 |
+
if (item_type === 'secret') {
|
| 166 |
+
form.elements['value'].value = '';
|
| 167 |
+
form.elements['value'].placeholder = 'Enter new value (required to update secret)';
|
| 168 |
+
alert("Veuillez entrer la nouvelle valeur du secret lors de la modification. La valeur existante n'est pas affichée pour des raisons de sécurité.");
|
| 169 |
+
} else {
|
| 170 |
+
form.elements['value'].value = decodeURIComponent(valueEncoded);
|
| 171 |
+
form.elements['value'].placeholder = 'The configuration value';
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
// Mettre à jour le texte du titre et du bouton de soumission
|
| 175 |
+
document.getElementById(`add-${item_type}-form`).querySelector('h4').textContent = `Update ${item_type}: ${name}`;
|
| 176 |
+
form.querySelector('button[type="submit"]').textContent = `Update ${item_type}`;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
// --- 8. FONCTION CRUD : DELETE (Suppression) ---
|
| 180 |
+
async function deleteConfigItem(type, nameEncoded) {
|
| 181 |
+
const item_type = type.slice(0, -1);
|
| 182 |
+
const name = decodeURIComponent(nameEncoded);
|
| 183 |
+
|
| 184 |
+
if (!confirm(`Êtes-vous sûr de vouloir supprimer le ${item_type} nommé '${name}'? Cette action est irréversible.`)) {
|
| 185 |
+
return;
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
try {
|
| 189 |
+
// URL pour l'appel de suppression (le backend doit traiter le DELETE avec ces paramètres)
|
| 190 |
+
const deleteUrl = `${BASE_API_URL}/items?item_type=${item_type}&name=${name}`;
|
| 191 |
+
|
| 192 |
+
const response = await fetch(deleteUrl, {
|
| 193 |
+
method: 'DELETE',
|
| 194 |
+
});
|
| 195 |
+
|
| 196 |
+
const data = await response.json();
|
| 197 |
+
|
| 198 |
+
if (response.ok && data.success) {
|
| 199 |
+
alert(data.message);
|
| 200 |
+
fetchConfigItems(type); // Recharger les données
|
| 201 |
+
} else {
|
| 202 |
+
alert(`Erreur de suppression: ${data.message || 'Vérifiez si la route DELETE est correctement implémentée sur le backend.'}`);
|
| 203 |
+
}
|
| 204 |
+
} catch (error) {
|
| 205 |
+
alert(`Erreur réseau lors de la suppression.`);
|
| 206 |
+
console.error(`Erreur de suppression:`, error);
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
// Chargement de la page et logique de navigation (ORIGINAL)
|
| 211 |
+
const navLinks = document.querySelectorAll('.settings-nav-link');
|
| 212 |
+
window.setActiveLink = (clickedLink) => {
|
| 213 |
+
navLinks.forEach(link => link.classList.remove('active'));
|
| 214 |
+
clickedLink.classList.add('active');
|
| 215 |
+
};
|
| 216 |
+
|
| 217 |
+
const observerOptions = {
|
| 218 |
+
root: null, // viewport
|
| 219 |
+
rootMargin: '0px 0px -70% 0px', // Trigger point at 30% from top
|
| 220 |
+
threshold: 0 // As soon as one pixel est visible
|
| 221 |
+
};
|
| 222 |
+
|
| 223 |
+
const sections = document.querySelectorAll('section[id]');
|
| 224 |
+
|
| 225 |
+
const observer = new IntersectionObserver((entries) => {
|
| 226 |
+
entries.forEach(entry => {
|
| 227 |
+
if (entry.isIntersecting) {
|
| 228 |
+
const id = entry.target.getAttribute('id');
|
| 229 |
+
const correspondingLink = document.querySelector(`.settings-nav-link[href="#${id}"]`);
|
| 230 |
+
|
| 231 |
+
if (correspondingLink) {
|
| 232 |
+
navLinks.forEach(link => link.classList.remove('active'));
|
| 233 |
+
correspondingLink.classList.add('active');
|
| 234 |
+
}
|
| 235 |
+
}
|
| 236 |
+
});
|
| 237 |
+
}, observerOptions);
|
| 238 |
+
|
| 239 |
+
sections.forEach(section => {
|
| 240 |
+
observer.observe(section);
|
| 241 |
+
});
|
| 242 |
+
|
| 243 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 244 |
+
if (!document.querySelector('.settings-nav-link.active')) {
|
| 245 |
+
document.querySelector('.settings-nav-link').classList.add('active');
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
// Lancer le chargement des secrets et variables au démarrage (LOGIQUE MISE À JOUR)
|
| 249 |
+
if (REPO_SLUG && REPO_SLUG !== 'None') {
|
| 250 |
+
fetchConfigItems('secrets');
|
| 251 |
+
fetchConfigItems('variables');
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
// ***************************************************************
|
| 256 |
+
// BLOC JS : LOGIQUE DE SUPPRESSION DE DÉPÔT (ORIGINAL)
|
| 257 |
+
// ***************************************************************
|
| 258 |
+
const deleteButton = document.getElementById('delete-repo-button');
|
| 259 |
+
|
| 260 |
+
if (deleteButton) {
|
| 261 |
+
deleteButton.addEventListener('click', async () => {
|
| 262 |
+
const repoSlug = REPO_SLUG; // Utilisation de la variable REPO_SLUG déjà définie
|
| 263 |
+
|
| 264 |
+
if (!repoSlug) {
|
| 265 |
+
alert("Erreur: Le slug du dépôt est introuvable. Impossible de supprimer.");
|
| 266 |
+
return;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
// 1. Double confirmation pour une action destructive
|
| 270 |
+
const confirmation = window.confirm(`Êtes-vous SÛR de vouloir supprimer définitivement le dépôt '${repoSlug}'? Cette action est irréversible et supprime TOUTES les données.`);
|
| 271 |
+
if (!confirmation) {
|
| 272 |
+
return;
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
// 2. Appel de la route DELETE
|
| 276 |
+
const url = REPO_DELETE_API_URL; // Utilisation de la variable REPO_DELETE_API_URL
|
| 277 |
+
|
| 278 |
+
try {
|
| 279 |
+
// Désactiver le bouton pendant le traitement
|
| 280 |
+
deleteButton.disabled = true;
|
| 281 |
+
deleteButton.textContent = 'Suppression en cours...';
|
| 282 |
+
|
| 283 |
+
const response = await fetch(url, {
|
| 284 |
+
method: 'DELETE',
|
| 285 |
+
headers: {
|
| 286 |
+
'Content-Type': 'application/json'
|
| 287 |
+
},
|
| 288 |
+
});
|
| 289 |
+
|
| 290 |
+
// Tente de lire la réponse JSON, même si elle est vide/erreur
|
| 291 |
+
let data = {};
|
| 292 |
+
try {
|
| 293 |
+
data = await response.json();
|
| 294 |
+
} catch (e) {
|
| 295 |
+
// Ignorer si la réponse n'est pas JSON (par exemple, 204 No Content)
|
| 296 |
+
if (response.status !== 204) {
|
| 297 |
+
console.warn("La réponse n'est pas au format JSON, mais le statut est OK. Continuer.");
|
| 298 |
+
}
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
if (!response.ok) {
|
| 302 |
+
// 404, 500 ou autre erreur du backend
|
| 303 |
+
throw new Error(data.message || `Erreur lors de la suppression: Statut ${response.status}`);
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
alert('Dépôt supprimé avec succès. Redirection vers le tableau de bord.');
|
| 307 |
+
// 3. Redirection après succès
|
| 308 |
+
window.location.href = '/mindus/nexus/dashboard';
|
| 309 |
+
|
| 310 |
+
} catch (error) {
|
| 311 |
+
console.error("Erreur lors de la suppression du dépôt:", error);
|
| 312 |
+
alert(`Échec de la suppression du dépôt. Détails: ${error.message}`);
|
| 313 |
+
} finally {
|
| 314 |
+
// Réactiver et restaurer l'état du bouton en cas d'erreur
|
| 315 |
+
deleteButton.disabled = false;
|
| 316 |
+
deleteButton.textContent = 'Delete Repository';
|
| 317 |
+
}
|
| 318 |
+
});
|
| 319 |
+
}
|
| 320 |
+
// ***************************************************************
|
| 321 |
+
});
|
| 322 |
+
|
| 323 |
+
/**
|
| 324 |
+
* Gère la mise à jour des paramètres généraux (General Settings).
|
| 325 |
+
*/
|
| 326 |
+
document.getElementById('general-settings-form').addEventListener('submit', async function(e) {
|
| 327 |
+
e.preventDefault();
|
| 328 |
+
if (!REPO_SLUG) return; // Sécurité
|
| 329 |
+
|
| 330 |
+
const repoName = document.getElementById('repo-name-input').value;
|
| 331 |
+
const repoDescription = document.getElementById('repo-description').value;
|
| 332 |
+
const visibility = document.querySelector('#repo-visibility-radios input[name="visibility"]:checked').value;
|
| 333 |
+
|
| 334 |
+
// Utilisation de la variable GENERAL_SETTINGS_API_URL pour l'ancienne route
|
| 335 |
+
const url = GENERAL_SETTINGS_API_URL;
|
| 336 |
+
const payload = {
|
| 337 |
+
name: repoName,
|
| 338 |
+
description: repoDescription,
|
| 339 |
+
visibility: visibility
|
| 340 |
+
};
|
| 341 |
+
|
| 342 |
+
const submitButton = e.target.querySelector('button[type="submit"]');
|
| 343 |
+
submitButton.disabled = true;
|
| 344 |
+
submitButton.textContent = 'Saving...';
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
try {
|
| 348 |
+
const response = await fetch(url, {
|
| 349 |
+
method: 'PUT',
|
| 350 |
+
headers: { 'Content-Type': 'application/json' },
|
| 351 |
+
body: JSON.stringify(payload)
|
| 352 |
+
});
|
| 353 |
+
|
| 354 |
+
if (!response.ok) {
|
| 355 |
+
const errorData = await response.json();
|
| 356 |
+
throw new Error(`Erreur API: ${errorData.message || response.statusText}`);
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
alert('Paramètres généraux sauvegardés avec succès!');
|
| 360 |
+
// Mise à jour de l'affichage du nom et de la visibilité si besoin
|
| 361 |
+
document.getElementById('repo-name').textContent = repoName;
|
| 362 |
+
document.getElementById('repo-visibility').textContent = visibility.charAt(0).toUpperCase() + visibility.slice(1);
|
| 363 |
+
|
| 364 |
+
} catch (error) {
|
| 365 |
+
console.error("Erreur lors de la mise à jour des paramètres généraux:", error);
|
| 366 |
+
alert(`Échec de la mise à jour des paramètres. Détails: ${error.message}`);
|
| 367 |
+
} finally {
|
| 368 |
+
submitButton.disabled = false;
|
| 369 |
+
submitButton.textContent = 'Save General Changes';
|
| 370 |
+
}
|
| 371 |
+
});
|
| 372 |
+
|
| 373 |
+
</script>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/security.html
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository - Security</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 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 |
+
/* Inter Font Configuration */
|
| 14 |
+
body { font-family: 'Inter', sans-serif; }
|
| 15 |
+
|
| 16 |
+
/* Theme Variables and Transitions (Light Mode) */
|
| 17 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 18 |
+
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA; /* Matches the light gray header */
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #0969DA;
|
| 29 |
+
--primary-hover: #075ECF;
|
| 30 |
+
--bg-warning: #FFF8C5;
|
| 31 |
+
--border-warning: #E2B200;
|
| 32 |
+
--bg-suggestion: #E6F0FF;
|
| 33 |
+
--border-suggestion: #8096D2;
|
| 34 |
+
--text-suggestion: #24292F;
|
| 35 |
+
--key-text-color: #016200;
|
| 36 |
+
--key-bg-color: #F6FFF6;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* Utility classes for theme variables */
|
| 40 |
+
.bg-page-var { background-color: var(--bg-page); } .bg-card-var { background-color: var(--bg-card); }
|
| 41 |
+
.bg-header-var { background-color: var(--bg-header); } .border-color-var { border-color: var(--border-color); }
|
| 42 |
+
.text-color-var { color: var(--text-color); } .text-secondary-var { color: var(--text-secondary); }
|
| 43 |
+
.text-link-var { color: var(--text-link); }
|
| 44 |
+
.bg-primary-color-var { background-color: var(--primary-color); } .hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover); }
|
| 45 |
+
.bg-active-var { background-color: var(--bg-active); } .hover\:bg-active-var:hover { background-color: var(--bg-active); }
|
| 46 |
+
.focus\:ring-link-var:focus { --tw-ring-color: var(--text-link); }
|
| 47 |
+
|
| 48 |
+
/* Repository Navigation Link Styles */
|
| 49 |
+
.repo-nav-link {
|
| 50 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 51 |
+
margin-right: 0.5rem;
|
| 52 |
+
white-space: nowrap;
|
| 53 |
+
}
|
| 54 |
+
/* La page Security est active */
|
| 55 |
+
.repo-nav-link.active {
|
| 56 |
+
border-bottom-color: #F78166; /* Vibrant orange/red for active tab */
|
| 57 |
+
color: var(--text-color) !important;
|
| 58 |
+
font-weight: 600;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
/* Sidebar Styles (Security-specific sidebar) */
|
| 62 |
+
.security-nav-link {
|
| 63 |
+
display: flex;
|
| 64 |
+
align-items: center;
|
| 65 |
+
padding: 0.5rem 1rem; /* Padding pour correspondre à l'image */
|
| 66 |
+
border-radius: 0; /* Pas de border-radius pour correspondre à l'image */
|
| 67 |
+
color: var(--text-color);
|
| 68 |
+
transition: background-color 0.15s;
|
| 69 |
+
font-weight: 500;
|
| 70 |
+
border-left: 3px solid transparent; /* Pour l'indicateur actif */
|
| 71 |
+
}
|
| 72 |
+
.security-nav-link:hover {
|
| 73 |
+
background-color: var(--bg-active);
|
| 74 |
+
}
|
| 75 |
+
.security-nav-link.active {
|
| 76 |
+
background-color: var(--bg-active);
|
| 77 |
+
border-left-color: var(--text-link); /* Barre bleue pour l'élément actif */
|
| 78 |
+
font-weight: 600;
|
| 79 |
+
}
|
| 80 |
+
/* Style pour les sous-sections de la barre latérale */
|
| 81 |
+
.security-nav-group {
|
| 82 |
+
padding: 0.5rem 1rem;
|
| 83 |
+
color: var(--text-color);
|
| 84 |
+
font-size: 0.875rem; /* text-sm */
|
| 85 |
+
font-weight: 600; /* semi-bold */
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
/* Responsive Sidebar Logic (Identical to api_create_key.html) */
|
| 90 |
+
#sidebar {
|
| 91 |
+
position: fixed;
|
| 92 |
+
top: 0;
|
| 93 |
+
left: 0;
|
| 94 |
+
width: 300px;
|
| 95 |
+
height: 100%;
|
| 96 |
+
background-color: var(--bg-card);
|
| 97 |
+
transform: translateX(-100%);
|
| 98 |
+
transition: transform 0.3s ease-in-out;
|
| 99 |
+
box-shadow: 2px 0 5px rgba(0,0,0,0.1);
|
| 100 |
+
z-index: 100;
|
| 101 |
+
}
|
| 102 |
+
#sidebar.open {
|
| 103 |
+
transform: translateX(0);
|
| 104 |
+
}
|
| 105 |
+
#overlay {
|
| 106 |
+
position: fixed;
|
| 107 |
+
top: 0;
|
| 108 |
+
left: 0;
|
| 109 |
+
width: 100%;
|
| 110 |
+
height: 100%;
|
| 111 |
+
background: rgba(0, 0, 0, 0.5);
|
| 112 |
+
z-index: 90;
|
| 113 |
+
display: none;
|
| 114 |
+
}
|
| 115 |
+
#overlay.open {
|
| 116 |
+
display: block;
|
| 117 |
+
}
|
| 118 |
+
</style>
|
| 119 |
+
</head>
|
| 120 |
+
|
| 121 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 122 |
+
|
| 123 |
+
<div id="overlay"></div>
|
| 124 |
+
|
| 125 |
+
<div id="sidebar" class="p-4 border-r border-color-var text-color-var transition-colors-theme">
|
| 126 |
+
<div class="flex justify-between items-center pb-4 border-b border-color-var/50 mb-4">
|
| 127 |
+
<i data-lucide="git-fork" class="text-3xl text-link-var"></i>
|
| 128 |
+
<button id="close-sidebar" class="text-secondary-var hover:text-color-var">
|
| 129 |
+
<i data-lucide="x" class="text-2xl"></i>
|
| 130 |
+
</button>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<nav class="space-y-1">
|
| 134 |
+
<a href="/mindus/nexus/dashboard?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 135 |
+
<i data-lucide="home" class="w-5 h-5 mr-3"></i> Home
|
| 136 |
+
</a>
|
| 137 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 138 |
+
<i data-lucide="alert-circle" class="w-5 h-5 mr-3"></i> Issues
|
| 139 |
+
</a>
|
| 140 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 141 |
+
<i data-lucide="git-pull-request" class="w-5 h-5 mr-3"></i> Pull requests
|
| 142 |
+
</a>
|
| 143 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 144 |
+
<i data-lucide="layout-grid" class="w-5 h-5 mr-3"></i> Projects
|
| 145 |
+
</a>
|
| 146 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 147 |
+
<i data-lucide="message-square" class="w-5 h-5 mr-3"></i> Discussions
|
| 148 |
+
</a>
|
| 149 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 150 |
+
<i data-lucide="code" class="w-5 h-5 mr-3"></i> Codespaces
|
| 151 |
+
</a>
|
| 152 |
+
<a href="/mindus/nexus/gitforge_copilot" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 153 |
+
<i data-lucide="cpu" class="w-5 h-5 mr-3"></i> Copilot
|
| 154 |
+
</a>
|
| 155 |
+
</nav>
|
| 156 |
+
|
| 157 |
+
<div class="border-t border-color-var/50 my-4 pt-4 space-y-1">
|
| 158 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 159 |
+
<i data-lucide="compass" class="w-5 h-5 mr-3"></i> Explore
|
| 160 |
+
</a>
|
| 161 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 162 |
+
<i data-lucide="store" class="w-5 h-5 mr-3"></i> Marketplace
|
| 163 |
+
</a>
|
| 164 |
+
<a href="#" class="flex items-center p-2 rounded-lg hover:bg-active-var transition-colors-theme">
|
| 165 |
+
<i data-lucide="link" class="w-5 h-5 mr-3"></i> MCP registry
|
| 166 |
+
</a>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 170 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 171 |
+
<div class="flex justify-between items-center h-16">
|
| 172 |
+
|
| 173 |
+
<div class="flex items-center space-x-4">
|
| 174 |
+
<button id="open-sidebar" class="p-2 rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 175 |
+
<i data-lucide="menu" class="w-6 h-6"></i>
|
| 176 |
+
</button>
|
| 177 |
+
|
| 178 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme hidden md:block">GitForge</span>
|
| 179 |
+
<span class="text-secondary-var hidden md:block">/</span>
|
| 180 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme flex items-center">
|
| 181 |
+
<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>
|
| 182 |
+
<i data-lucide="lock" class="w-4 h-4 ml-2 text-secondary-var"></i>
|
| 183 |
+
</a>
|
| 184 |
+
</div>
|
| 185 |
+
|
| 186 |
+
<div class="flex items-center space-x-3">
|
| 187 |
+
<div class="hidden sm:block">
|
| 188 |
+
<input type="text" placeholder="Type / to search"
|
| 189 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-40 md:w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 190 |
+
</div>
|
| 191 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 192 |
+
<i data-lucide="bell" class="w-5 h-5"></i>
|
| 193 |
+
</a>
|
| 194 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 195 |
+
<i data-lucide="plus" class="w-5 h-5"></i>
|
| 196 |
+
</a>
|
| 197 |
+
<a href="#" class="p-2 rounded-full text-secondary-var hover:text-link-var transition-colors-theme">
|
| 198 |
+
<i data-lucide="user-circle" class="w-5 h-5"></i>
|
| 199 |
+
</a>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 205 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 206 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 207 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 208 |
+
<i data-lucide="code" class="w-4 h-4 mr-1"></i> Code
|
| 209 |
+
</a>
|
| 210 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 211 |
+
<i data-lucide="alert-circle" class="w-4 h-4 mr-1"></i> Issues
|
| 212 |
+
</a>
|
| 213 |
+
<a href="/mindus/nexus/pull_request?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 214 |
+
<i data-lucide="git-pull-request" class="w-4 h-4 mr-1"></i> Pull requests
|
| 215 |
+
</a>
|
| 216 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 217 |
+
<i data-lucide="check-square" class="w-4 h-4 mr-1"></i> Actions
|
| 218 |
+
</a>
|
| 219 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 220 |
+
<i data-lucide="box" class="w-4 h-4 mr-1"></i> Projects
|
| 221 |
+
</a>
|
| 222 |
+
<a href="/mindus/nexus/security?repo_slug={{ repo_slug }}" class="repo-nav-link text-color-var active transition-colors-theme flex items-center">
|
| 223 |
+
<i data-lucide="shield" class="w-4 h-4 mr-1"></i> Security
|
| 224 |
+
</a>
|
| 225 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 226 |
+
<i data-lucide="trending-up" class="w-4 h-4 mr-1"></i> Insights
|
| 227 |
+
</a>
|
| 228 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 229 |
+
<i data-lucide="settings" class="w-4 h-4 mr-1"></i> Settings
|
| 230 |
+
</a>
|
| 231 |
+
</nav>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
</header>
|
| 235 |
+
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 transition-colors-theme">
|
| 236 |
+
|
| 237 |
+
<div class="flex">
|
| 238 |
+
|
| 239 |
+
<aside class="w-64 flex-shrink-0 border-r border-color-var/50 hidden lg:block mr-8">
|
| 240 |
+
<nav class="space-y-1">
|
| 241 |
+
<a href="#" class="security-nav-link active">
|
| 242 |
+
Overview
|
| 243 |
+
</a>
|
| 244 |
+
|
| 245 |
+
<div class="security-nav-group pt-2">
|
| 246 |
+
Reporting
|
| 247 |
+
</div>
|
| 248 |
+
<a href="#" class="security-nav-link">
|
| 249 |
+
Policy
|
| 250 |
+
</a>
|
| 251 |
+
|
| 252 |
+
<div class="security-nav-group pt-2">
|
| 253 |
+
Vulnerability alerts
|
| 254 |
+
</div>
|
| 255 |
+
<a href="#" class="security-nav-link">
|
| 256 |
+
Dependabot
|
| 257 |
+
</a>
|
| 258 |
+
</nav>
|
| 259 |
+
</aside>
|
| 260 |
+
|
| 261 |
+
<div class="flex-grow min-w-0">
|
| 262 |
+
<h1 class="text-2xl font-semibold text-color-var mb-6">Security overview</h1>
|
| 263 |
+
|
| 264 |
+
<div class="space-y-4">
|
| 265 |
+
|
| 266 |
+
<div class="border border-color-var rounded-lg p-4 bg-card-var shadow-sm flex flex-col md:flex-row justify-between items-start md:items-center">
|
| 267 |
+
<div class="flex-1 min-w-0">
|
| 268 |
+
<h2 class="text-lg font-medium text-color-var">Security policy <span class="text-secondary-var font-normal">(Disabled)</span></h2>
|
| 269 |
+
<p class="text-sm text-secondary-var mt-1">
|
| 270 |
+
Define how users should report security vulnerabilities for this repository.
|
| 271 |
+
</p>
|
| 272 |
+
</div>
|
| 273 |
+
<button class="mt-3 md:mt-0 inline-flex items-center justify-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 274 |
+
Set up a security policy
|
| 275 |
+
</button>
|
| 276 |
+
</div>
|
| 277 |
+
|
| 278 |
+
<div class="border border-color-var rounded-lg p-4 bg-card-var shadow-sm flex flex-col md:flex-row justify-between items-start md:items-center">
|
| 279 |
+
<div class="flex-1 min-w-0">
|
| 280 |
+
<h2 class="text-lg font-medium text-color-var">Dependabot alerts <span class="text-secondary-var font-normal">(Disabled)</span></h2>
|
| 281 |
+
<p class="text-sm text-secondary-var mt-1">
|
| 282 |
+
Get notified when one of your dependencies has a vulnerability
|
| 283 |
+
</p>
|
| 284 |
+
</div>
|
| 285 |
+
<button class="mt-3 md:mt-0 inline-flex items-center justify-center px-3 py-1.5 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150 whitespace-nowrap">
|
| 286 |
+
Enable Dependabot alerts
|
| 287 |
+
</button>
|
| 288 |
+
</div>
|
| 289 |
+
|
| 290 |
+
<div class="border border-color-var rounded-lg p-4 bg-card-var shadow-sm flex flex-col md:flex-row justify-between items-start md:items-center">
|
| 291 |
+
<div class="flex-1 min-w-0">
|
| 292 |
+
<h2 class="text-lg font-medium text-color-var">Code scanning alerts <span class="text-secondary-var font-normal">(Disabled)</span></h2>
|
| 293 |
+
<p class="text-sm text-secondary-var mt-1">
|
| 294 |
+
Advanced Security is only available for Organizations
|
| 295 |
+
</p>
|
| 296 |
+
</div>
|
| 297 |
+
<button class="mt-3 md:mt-0 inline-flex items-center justify-center px-3 py-1.5 text-sm bg-active-var text-color-var font-semibold rounded-lg hover:bg-gray-200 transition duration-150 whitespace-nowrap border border-color-var">
|
| 298 |
+
Find out more
|
| 299 |
+
</button>
|
| 300 |
+
</div>
|
| 301 |
+
|
| 302 |
+
</div>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
</main>
|
| 306 |
+
|
| 307 |
+
<footer class="w-full border-t border-color-var mt-12 py-8 text-sm text-secondary-var">
|
| 308 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center">
|
| 309 |
+
<div class="flex items-center space-x-4 mb-4 md:mb-0">
|
| 310 |
+
<i data-lucide="git-fork" class="w-5 h-5"></i>
|
| 311 |
+
<span>© 2025 GitForge, Inc.</span>
|
| 312 |
+
</div>
|
| 313 |
+
<nav class="flex flex-wrap justify-center space-x-4">
|
| 314 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-link-var">Terms</a>
|
| 315 |
+
<a href="/mindus/nexus/politique_confidentialite" class="hover:text-link-var">Privacy</a>
|
| 316 |
+
<a href="/mindus/nexus/mentions_legales" class="hover:text-link-var">Security</a>
|
| 317 |
+
<a href="/mindus/nexus/statut" class="hover:text-link-var">Status</a>
|
| 318 |
+
<a href="#" class="hover:text-link-var">Community</a>
|
| 319 |
+
<a href="/mindus/nexus/documentation" class="hover:text-link-var">Docs</a>
|
| 320 |
+
<a href="/mindus/nexus/contact" class="hover:text-link-var">Contact</a>
|
| 321 |
+
</nav>
|
| 322 |
+
</div>
|
| 323 |
+
</footer>
|
| 324 |
+
|
| 325 |
+
<script>
|
| 326 |
+
// Initialiser Lucide Icons
|
| 327 |
+
lucide.createIcons();
|
| 328 |
+
|
| 329 |
+
// ----------------------------------------------------------------------
|
| 330 |
+
// SIDEBAR LOGIC (Copied from api_create_key.html for consistency)
|
| 331 |
+
// ----------------------------------------------------------------------
|
| 332 |
+
const sidebar = document.getElementById('sidebar');
|
| 333 |
+
const overlay = document.getElementById('overlay');
|
| 334 |
+
const openButton = document.getElementById('open-sidebar');
|
| 335 |
+
const closeButton = document.getElementById('close-sidebar');
|
| 336 |
+
|
| 337 |
+
const toggleSidebar = () => {
|
| 338 |
+
sidebar.classList.toggle('open');
|
| 339 |
+
overlay.classList.toggle('open');
|
| 340 |
+
};
|
| 341 |
+
|
| 342 |
+
openButton.addEventListener('click', toggleSidebar);
|
| 343 |
+
closeButton.addEventListener('click', toggleSidebar);
|
| 344 |
+
overlay.addEventListener('click', toggleSidebar);
|
| 345 |
+
|
| 346 |
+
const body = document.body;
|
| 347 |
+
const observer = new MutationObserver(() => {
|
| 348 |
+
if (sidebar.classList.contains('open')) {
|
| 349 |
+
body.style.overflow = 'hidden';
|
| 350 |
+
} else {
|
| 351 |
+
body.style.overflow = '';
|
| 352 |
+
}
|
| 353 |
+
});
|
| 354 |
+
observer.observe(sidebar, { attributes: true, attributeFilter: ['class'] });
|
| 355 |
+
|
| 356 |
+
</script>
|
| 357 |
+
</body>
|
| 358 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/settings.html
ADDED
|
@@ -0,0 +1,1105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="light">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Repository Settings</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.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 |
+
<style>
|
| 12 |
+
/* Inter font configuration */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Theme Variables and Styles */
|
| 16 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 17 |
+
|
| 18 |
+
/* Light Mode (UNIQUE Theme) */
|
| 19 |
+
.light {
|
| 20 |
+
--bg-page: #FFFFFF;
|
| 21 |
+
--bg-header: #F6F8FA;
|
| 22 |
+
--bg-card: #FFFFFF;
|
| 23 |
+
--bg-active: #F3F4F6;
|
| 24 |
+
--border-color: #D0D7DE;
|
| 25 |
+
--text-color: #24292F;
|
| 26 |
+
--text-secondary: #57606A;
|
| 27 |
+
--text-link: #0969DA;
|
| 28 |
+
--primary-color: #2DA44E;
|
| 29 |
+
--primary-hover: #2C974B;
|
| 30 |
+
--danger-color: #CF222E;
|
| 31 |
+
--danger-hover: #A40E26;
|
| 32 |
+
}
|
| 33 |
+
/* Utility classes for 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 |
+
.bg-danger-color-var { background-color: var(--danger-color); } .hover\:bg-danger-hover-var:hover { background-color: var(--danger-hover); }
|
| 42 |
+
|
| 43 |
+
/* Specific style for the repository navigation bar */
|
| 44 |
+
.repo-nav-link {
|
| 45 |
+
padding: 0.5rem 1rem; border-bottom: 2px solid transparent;
|
| 46 |
+
margin-right: 0.5rem;
|
| 47 |
+
}
|
| 48 |
+
.repo-nav-link.active {
|
| 49 |
+
border-bottom-color: var(--text-link);
|
| 50 |
+
color: var(--text-color) !important;
|
| 51 |
+
font-weight: 600;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
/* Sidebar navigation style */
|
| 55 |
+
.settings-nav-link {
|
| 56 |
+
display: block;
|
| 57 |
+
padding: 0.5rem 1rem;
|
| 58 |
+
border-radius: 0.375rem; /* rounded-md */
|
| 59 |
+
color: var(--text-secondary);
|
| 60 |
+
transition: background-color 0.15s, color 0.15s;
|
| 61 |
+
}
|
| 62 |
+
.settings-nav-link:hover {
|
| 63 |
+
background-color: var(--bg-active);
|
| 64 |
+
color: var(--text-color);
|
| 65 |
+
}
|
| 66 |
+
.settings-nav-link.active {
|
| 67 |
+
font-weight: 600;
|
| 68 |
+
background-color: var(--bg-active);
|
| 69 |
+
color: var(--text-color);
|
| 70 |
+
border-left: 3px solid var(--text-link); /* Active indicator */
|
| 71 |
+
padding-left: calc(1rem - 3px);
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
/* Input/Form styling */
|
| 75 |
+
.form-input-var {
|
| 76 |
+
background-color: var(--bg-card);
|
| 77 |
+
border: 1px solid var(--border-color);
|
| 78 |
+
color: var(--text-color);
|
| 79 |
+
padding: 0.5rem 0.75rem;
|
| 80 |
+
border-radius: 0.375rem;
|
| 81 |
+
width: 100%;
|
| 82 |
+
transition: border-color 0.15s, box-shadow 0.15s;
|
| 83 |
+
}
|
| 84 |
+
.form-input-var:focus {
|
| 85 |
+
outline: none;
|
| 86 |
+
border-color: var(--text-link);
|
| 87 |
+
box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.2); /* ring-link-var equivalent */
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
/* Pro-style Sidebar */
|
| 91 |
+
#repo-sidebar-nav .settings-nav-link {
|
| 92 |
+
border-left: 0 !important; /* Remove L-border for pro-style */
|
| 93 |
+
padding-left: 1rem;
|
| 94 |
+
border-radius: 0.375rem;
|
| 95 |
+
}
|
| 96 |
+
#repo-sidebar-nav .settings-nav-link.active {
|
| 97 |
+
font-weight: 600;
|
| 98 |
+
background-color: var(--text-link); /* Blue background for active link */
|
| 99 |
+
color: white;
|
| 100 |
+
}
|
| 101 |
+
#repo-sidebar-nav .settings-nav-link.active:hover {
|
| 102 |
+
background-color: var(--text-link);
|
| 103 |
+
color: white;
|
| 104 |
+
}
|
| 105 |
+
#repo-sidebar-nav .settings-nav-link:hover:not(.active) {
|
| 106 |
+
background-color: var(--bg-active);
|
| 107 |
+
color: var(--text-color);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
/* General Card Pro Style */
|
| 111 |
+
.pro-card {
|
| 112 |
+
background-color: var(--bg-card);
|
| 113 |
+
padding: 1rem;
|
| 114 |
+
border: 1px solid var(--border-color);
|
| 115 |
+
border-radius: 0.375rem;
|
| 116 |
+
}
|
| 117 |
+
</style>
|
| 118 |
+
</head>
|
| 119 |
+
|
| 120 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 121 |
+
|
| 122 |
+
<header class="w-full bg-header-var border-b border-color-var transition-colors-theme">
|
| 123 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 124 |
+
<div class="flex justify-between items-center h-16">
|
| 125 |
+
<div class="flex items-center space-x-4">
|
| 126 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png " alt="GitForge Logo" class="h-6">
|
| 127 |
+
<span class="text-xl font-bold text-color-var transition-colors-theme">GitForge</span>
|
| 128 |
+
<span class="text-secondary-var">/</span>
|
| 129 |
+
<a href="#" class="text-color-var hover:text-link-var text-lg font-semibold transition-colors-theme">
|
| 130 |
+
<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>
|
| 131 |
+
</a>
|
| 132 |
+
<span id="repo-visibility" class="px-2 py-0.5 text-xs font-medium rounded-full border border-color-var text-secondary-var">
|
| 133 |
+
Private
|
| 134 |
+
</span>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<div class="flex items-center space-x-3">
|
| 138 |
+
<div class="hidden sm:block">
|
| 139 |
+
<input type="text" placeholder="Type / to search"
|
| 140 |
+
class="bg-page-var border border-color-var text-color-var rounded-lg p-1.5 text-sm w-48 transition-colors-theme focus:outline-none focus:border-link-var focus:ring-1 focus:ring-link-var">
|
| 141 |
+
</div>
|
| 142 |
+
<a href="mindus/nexus/profile" class="p-2 rounded-full text-color-var hover:text-link-var transition-colors-theme">
|
| 143 |
+
<span class="material-symbols-rounded">account_circle</span>
|
| 144 |
+
</a>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
</header>
|
| 149 |
+
|
| 150 |
+
<div class="w-full border-b border-color-var bg-page-var transition-colors-theme">
|
| 151 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 152 |
+
<nav class="flex space-x-1 overflow-x-auto text-sm font-medium">
|
| 153 |
+
<a href="/mindus/nexus/repo_files?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 154 |
+
<span class="material-symbols-rounded text-base mr-1">code</span> Code
|
| 155 |
+
</a>
|
| 156 |
+
<a href="/mindus/nexus/new_issue?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 157 |
+
<span class="material-symbols-rounded text-base mr-1">bug_report</span> Issues
|
| 158 |
+
</a>
|
| 159 |
+
<a href="/mindus/nexus/pull_requests?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 160 |
+
<span class="material-symbols-rounded text-base mr-1">merge</span> Pull requests
|
| 161 |
+
</a>
|
| 162 |
+
<a href="/mindus/nexus/editor?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 163 |
+
<span class="material-symbols-rounded text-base mr-1">checklist</span> Actions
|
| 164 |
+
</a>
|
| 165 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 166 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Security
|
| 167 |
+
</a>
|
| 168 |
+
<a href="#" class="repo-nav-link text-secondary-var hover:text-color-var transition-colors-theme flex items-center">
|
| 169 |
+
<span class="material-symbols-rounded text-base mr-1">insights</span> Insights
|
| 170 |
+
</a>
|
| 171 |
+
<a href="/mindus/nexus/settings?repo_slug={{ repo_slug }}" class="repo-nav-link text-secondary-var hover:text-color-var active transition-colors-theme flex items-center">
|
| 172 |
+
<span class="material-symbols-rounded text-base mr-1">settings</span> Settings
|
| 173 |
+
</a>
|
| 174 |
+
</nav>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<div id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 transition-colors-theme">
|
| 179 |
+
|
| 180 |
+
<h1 class="text-2xl font-bold mb-6 text-color-var">Repository Settings for <span class="text-link-var">{{ user.username if user.username else 'current_user' }}/{{ repo_name if repo_name else repo_slug }}</span></h1>
|
| 181 |
+
|
| 182 |
+
<div class="lg:grid lg:grid-cols-12 lg:gap-8">
|
| 183 |
+
|
| 184 |
+
<div class="lg:col-span-2 mb-8 lg:mb-0">
|
| 185 |
+
<nav id="repo-sidebar-nav" class="p-2 sticky top-20">
|
| 186 |
+
<a href="#general" class="settings-nav-link active" onclick="setActiveLink(this)">
|
| 187 |
+
<div class="flex items-center space-x-2">
|
| 188 |
+
<span class="material-symbols-rounded text-lg">settings</span>
|
| 189 |
+
<span>General</span>
|
| 190 |
+
</div>
|
| 191 |
+
</a>
|
| 192 |
+
<a href="/mindus/nexus/api_create_key?repo_slug={{ repo_slug }}" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 193 |
+
<div class="flex items-center space-x-2">
|
| 194 |
+
<span class="material-symbols-rounded text-lg">person</span>
|
| 195 |
+
<span>Access</span>
|
| 196 |
+
</div>
|
| 197 |
+
</a>
|
| 198 |
+
<a href="#collaborators" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 199 |
+
<div class="flex items-center space-x-2">
|
| 200 |
+
<span class="material-symbols-rounded text-lg">group</span>
|
| 201 |
+
<span>Collaborators</span>
|
| 202 |
+
</div>
|
| 203 |
+
</a>
|
| 204 |
+
<a href="/mindus/nexus/new_branch?repo_slug={{ repo_slug }}" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 205 |
+
<div class="flex items-center space-x-2">
|
| 206 |
+
<span class="material-symbols-rounded text-lg">fork_right</span>
|
| 207 |
+
<span>Branches</span>
|
| 208 |
+
</div>
|
| 209 |
+
</a>
|
| 210 |
+
<a href="/mindus/nexus/new_pull_requests?repo_slug={{ repo_slug }}" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 211 |
+
<div class="flex items-center space-x-2">
|
| 212 |
+
<span class="material-symbols-rounded text-lg">merge</span>
|
| 213 |
+
<span>Pull Requests</span>
|
| 214 |
+
</div>
|
| 215 |
+
</a>
|
| 216 |
+
<a href="#webhooks" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 217 |
+
<div class="flex items-center space-x-2">
|
| 218 |
+
<span class="material-symbols-rounded text-lg">webhook</span>
|
| 219 |
+
<span>Webhooks</span>
|
| 220 |
+
</div>
|
| 221 |
+
</a>
|
| 222 |
+
<a href="#secrets" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 223 |
+
<div class="flex items-center space-x-2">
|
| 224 |
+
<span class="material-symbols-rounded text-lg">lock</span>
|
| 225 |
+
<span>Secrets</span>
|
| 226 |
+
</div>
|
| 227 |
+
</a>
|
| 228 |
+
<a href="/mindus/nexus/tarifs" class="settings-nav-link" onclick="setActiveLink(this)">
|
| 229 |
+
<div class="flex items-center space-x-2">
|
| 230 |
+
<span class="material-symbols-rounded text-lg">tune</span>
|
| 231 |
+
<span>Features</span>
|
| 232 |
+
</div>
|
| 233 |
+
</a>
|
| 234 |
+
<div class="mt-4 pt-4 border-t border-color-var/50">
|
| 235 |
+
<a href="#danger-zone" class="settings-nav-link text-danger-color-var font-semibold" onclick="setActiveLink(this)">
|
| 236 |
+
<div class="flex items-center space-x-2">
|
| 237 |
+
<span class="material-symbols-rounded text-lg">warning</span>
|
| 238 |
+
<span>Danger Zone</span>
|
| 239 |
+
</div>
|
| 240 |
+
</a>
|
| 241 |
+
</div>
|
| 242 |
+
</nav>
|
| 243 |
+
</div>
|
| 244 |
+
|
| 245 |
+
<div class="lg:col-span-10 space-y-6">
|
| 246 |
+
|
| 247 |
+
<section id="general" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 248 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">General</h2>
|
| 249 |
+
|
| 250 |
+
<form id="general-settings-form" class="space-y-6">
|
| 251 |
+
<div class="pro-card flex justify-between items-center">
|
| 252 |
+
<div class="flex-1 min-w-0 mr-4">
|
| 253 |
+
<label for="repo-name-input" class="block text-sm font-medium text-color-var mb-1">Repository name</label>
|
| 254 |
+
<div class="flex items-center space-x-3">
|
| 255 |
+
<input type="text" id="repo-name-input" value="{{ repo_name if repo_name else repo_slug }}" class="form-input-var w-64" placeholder="Enter new repository name">
|
| 256 |
+
<button type="button" id="rename-button" class="inline-flex items-center px-4 py-2 text-sm bg-active-var text-color-var font-semibold rounded-lg border border-color-var hover:bg-header-var transition duration-150">
|
| 257 |
+
Rename
|
| 258 |
+
</button>
|
| 259 |
+
</div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<div class="pro-card">
|
| 264 |
+
<h3 class="text-lg font-semibold text-color-var mb-2">Default branch</h3>
|
| 265 |
+
<p class="text-sm text-secondary-var mb-3">The default branch is considered the "base" branch in your repository, against which all pull requests and code commits are automatically made, unless you specify a different branch.</p>
|
| 266 |
+
<div class="flex items-center space-x-2">
|
| 267 |
+
<select id="default-branch" class="form-input-var w-48">
|
| 268 |
+
<option>main</option>
|
| 269 |
+
<option>master</option>
|
| 270 |
+
<option>develop</option>
|
| 271 |
+
</select>
|
| 272 |
+
<button type="button" class="p-2 rounded-md text-secondary-var hover:text-color-var">
|
| 273 |
+
<span class="material-symbols-rounded text-lg">edit</span>
|
| 274 |
+
</button>
|
| 275 |
+
<button type="button" class="p-2 rounded-md text-secondary-var hover:text-danger-color-var">
|
| 276 |
+
<span class="material-symbols-rounded text-lg">content_copy</span>
|
| 277 |
+
</button>
|
| 278 |
+
</div>
|
| 279 |
+
</div>
|
| 280 |
+
|
| 281 |
+
<div class="pro-card">
|
| 282 |
+
<label class="flex items-center text-sm font-medium text-color-var">
|
| 283 |
+
<input type="checkbox" class="mr-2 text-primary-color-var focus:ring-primary-color-var"> Template repository
|
| 284 |
+
</label>
|
| 285 |
+
<p class="text-xs text-secondary-var mt-1 ml-4">Template repositories let users generate new repositories with the same directory structure and files. <a href="#" class="text-link-var hover:underline">Learn more about template repositories.</a></p>
|
| 286 |
+
</div>
|
| 287 |
+
|
| 288 |
+
<div class="pro-card">
|
| 289 |
+
<label class="flex items-start text-sm font-medium text-color-var">
|
| 290 |
+
<input type="checkbox" class="mt-1 mr-2 text-primary-color-var focus:ring-primary-color-var"> Require contributors to sign off on web-based commits
|
| 291 |
+
</label>
|
| 292 |
+
<p class="text-xs text-secondary-var mt-1 ml-4">Enabling this setting will require contributors to sign off on commits made through GitForge's web interface. Signing off is a way for contributors to affirm that their commit complies with the repository's terms, commonly the <a href="#" class="text-link-var hover:underline">Developer Certificate of Origin (DCO)</a>. <a href="#" class="text-link-var hover:underline">Learn more about signing off on commits.</a></p>
|
| 293 |
+
</div>
|
| 294 |
+
|
| 295 |
+
<div class="pro-card">
|
| 296 |
+
<label class="block text-sm font-medium text-color-var mb-2">Repository Visibility</label>
|
| 297 |
+
<div id="repo-visibility-radios" class="flex items-center space-x-6">
|
| 298 |
+
<label class="flex items-center text-sm text-secondary-var">
|
| 299 |
+
<input type="radio" name="visibility" value="public" class="mr-2 text-link-var focus:ring-link-var"> Public
|
| 300 |
+
</label>
|
| 301 |
+
<label class="flex items-center text-sm text-secondary-var">
|
| 302 |
+
<input type="radio" name="visibility" value="private" checked class="mr-2 text-link-var focus:ring-link-var"> Private
|
| 303 |
+
</label>
|
| 304 |
+
<label class="flex items-center text-sm text-secondary-var">
|
| 305 |
+
<input type="radio" name="visibility" value="internal" class="mr-2 text-link-var focus:ring-link-var"> Internal (Organization only)
|
| 306 |
+
</label>
|
| 307 |
+
</div>
|
| 308 |
+
<button type="submit" class="mt-4 inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 309 |
+
Save General Changes
|
| 310 |
+
</button>
|
| 311 |
+
</div>
|
| 312 |
+
</form>
|
| 313 |
+
</section>
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
<section id="branches" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 317 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">Branches</h2>
|
| 318 |
+
|
| 319 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Branch Protection Rules</h3>
|
| 320 |
+
<p class="text-sm text-secondary-var mb-4">Configure rules for branches like 'main'.</p>
|
| 321 |
+
|
| 322 |
+
<div class="border border-color-var rounded-lg p-4 space-y-3">
|
| 323 |
+
<p class="font-semibold text-color-var text-sm">Rule for `main` branch</p>
|
| 324 |
+
<label class="flex items-start text-sm text-secondary-var">
|
| 325 |
+
<input type="checkbox" class="mt-1 mr-2 text-primary-color-var focus:ring-primary-color-var"> Require pull request reviews before merging
|
| 326 |
+
</label>
|
| 327 |
+
<label class="flex items-start text-sm text-secondary-var">
|
| 328 |
+
<input type="checkbox" checked class="mt-1 mr-2 text-primary-color-var focus:ring-primary-color-var"> Require status checks to pass before merging
|
| 329 |
+
</label>
|
| 330 |
+
<label class="flex items-start text-sm text-secondary-var">
|
| 331 |
+
<input type="checkbox" checked class="mt-1 mr-2 text-primary-color-var focus:ring-primary-color-var"> Prevent deletion of this branch
|
| 332 |
+
</label>
|
| 333 |
+
<label class="flex items-start text-sm text-secondary-var">
|
| 334 |
+
<input type="checkbox" class="mt-1 mr-2 text-primary-color-var focus:ring-primary-color-var"> Restrict direct pushes
|
| 335 |
+
</label>
|
| 336 |
+
<button class="mt-3 inline-flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 337 |
+
<span class="material-symbols-rounded text-base mr-1">add</span> Add new branch protection rule
|
| 338 |
+
</button>
|
| 339 |
+
</div>
|
| 340 |
+
</section>
|
| 341 |
+
|
| 342 |
+
<section id="pull-requests" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 343 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">Pull Requests</h2>
|
| 344 |
+
|
| 345 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Merging</h3>
|
| 346 |
+
<p class="text-sm text-secondary-var mb-4">When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. If you have linear history requirement enabled on any protected branch, you must enable squashing or rebasing.</p>
|
| 347 |
+
|
| 348 |
+
<div class="pro-card mb-4">
|
| 349 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 350 |
+
<div class="flex-1 min-w-0">
|
| 351 |
+
<h4 class="text-sm font-semibold text-color-var">Allow merge commits</h4>
|
| 352 |
+
<p class="text-xs text-secondary-var mt-0.5">Add all commits from the head branch to the base branch with a merge commit.</p>
|
| 353 |
+
</div>
|
| 354 |
+
<input type="checkbox" checked class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 355 |
+
</label>
|
| 356 |
+
</div>
|
| 357 |
+
<div class="pro-card mb-4">
|
| 358 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 359 |
+
<div class="flex-1 min-w-0">
|
| 360 |
+
<h4 class="text-sm font-semibold text-color-var">Allow squash merging</h4>
|
| 361 |
+
<p class="text-xs text-secondary-var mt-0.5">Combine all commits from the head branch into a single commit in the base branch.</p>
|
| 362 |
+
</div>
|
| 363 |
+
<input type="checkbox" class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 364 |
+
</label>
|
| 365 |
+
</div>
|
| 366 |
+
<div class="pro-card mb-4">
|
| 367 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 368 |
+
<div class="flex-1 min-w-0">
|
| 369 |
+
<h4 class="text-sm font-semibold text-color-var">Allow rebase merging</h4>
|
| 370 |
+
<p class="text-xs text-secondary-var mt-0.5">Add all commits from the head branch onto the base branch individually.</p>
|
| 371 |
+
</div>
|
| 372 |
+
<input type="checkbox" class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 373 |
+
</label>
|
| 374 |
+
</div>
|
| 375 |
+
|
| 376 |
+
<div class="mt-6 border-t border-color-var/50 pt-4">
|
| 377 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Branch Updates</h3>
|
| 378 |
+
<p class="text-sm text-secondary-var mb-4">Control how and when users are prompted to update their branches if there are new changes available in the base branch.</p>
|
| 379 |
+
|
| 380 |
+
<div class="pro-card mb-4">
|
| 381 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 382 |
+
<div class="flex-1 min-w-0">
|
| 383 |
+
<h4 class="text-sm font-semibold text-color-var">Always suggest updating pull request branches</h4>
|
| 384 |
+
<p class="text-xs text-secondary-var mt-0.5">Whenever there are new changes available in the base branch, present an “update branch” option in the pull request.</p>
|
| 385 |
+
</div>
|
| 386 |
+
<input type="checkbox" checked class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 387 |
+
</label>
|
| 388 |
+
</div>
|
| 389 |
+
</div>
|
| 390 |
+
|
| 391 |
+
<div class="mt-6 border-t border-color-var/50 pt-4">
|
| 392 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Auto-Merge</h3>
|
| 393 |
+
<div class="pro-card mb-4">
|
| 394 |
+
<label class="flex justify-between items-start">
|
| 395 |
+
<div class="flex-1 min-w-0">
|
| 396 |
+
<h4 class="text-sm font-semibold text-color-var">Allow auto-merge <span class="text-red-500 text-xs font-normal ml-2">(Disabled)</span></h4>
|
| 397 |
+
<p class="text-xs text-secondary-var mt-0.5">Waits for merge requirements to be met and then merges automatically. <a href="#" class="text-link-var hover:underline">Why is this option disabled?</a></p>
|
| 398 |
+
</div>
|
| 399 |
+
<input type="checkbox" disabled class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 400 |
+
</label>
|
| 401 |
+
</div>
|
| 402 |
+
</div>
|
| 403 |
+
|
| 404 |
+
<div class="mt-6 border-t border-color-var/50 pt-4">
|
| 405 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Head Branch Deletion</h3>
|
| 406 |
+
<div class="pro-card mb-4">
|
| 407 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 408 |
+
<div class="flex-1 min-w-0">
|
| 409 |
+
<h4 class="text-sm font-semibold text-color-var">Automatically delete head branches</h4>
|
| 410 |
+
<p class="text-xs text-secondary-var mt-0.5">Deleted branches will still be able to be restored.</p>
|
| 411 |
+
</div>
|
| 412 |
+
<input type="checkbox" checked class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 413 |
+
</label>
|
| 414 |
+
</div>
|
| 415 |
+
</div>
|
| 416 |
+
</section>
|
| 417 |
+
|
| 418 |
+
<section id="features" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 419 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">Features</h2>
|
| 420 |
+
|
| 421 |
+
<div class="pro-card mb-4">
|
| 422 |
+
<label class="flex justify-between items-start">
|
| 423 |
+
<div class="flex-1 min-w-0">
|
| 424 |
+
<h4 class="text-sm font-semibold text-color-var">Wikis <span class="text-red-500 text-xs font-normal ml-2">(Upgrade to enable)</span></h4>
|
| 425 |
+
<p class="text-xs text-secondary-var mt-0.5">Wikis host documentation for your repository. Upgrade or make this repository public to enable Wikis. GitForge Wikis is a simple way to let others contribute content.</p>
|
| 426 |
+
</div>
|
| 427 |
+
<input type="checkbox" disabled class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 428 |
+
</label>
|
| 429 |
+
<a href="#" class="text-xs text-link-var hover:underline mt-2 inline-block">Learn more about wikis</a>
|
| 430 |
+
</div>
|
| 431 |
+
|
| 432 |
+
<div class="pro-card mb-4">
|
| 433 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 434 |
+
<div class="flex-1 min-w-0">
|
| 435 |
+
<h4 class="text-sm font-semibold text-color-var">Issues</h4>
|
| 436 |
+
<p class="text-xs text-secondary-var mt-0.5">Issues integrate lightweight task tracking into your repository. Keep projects on track with issue labels and milestones, and reference them in commit messages.</p>
|
| 437 |
+
</div>
|
| 438 |
+
<input type="checkbox" checked class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 439 |
+
</label>
|
| 440 |
+
<a href="#" class="text-xs text-link-var hover:underline mt-2 inline-block">Get organized with issue templates</a>
|
| 441 |
+
</div>
|
| 442 |
+
|
| 443 |
+
<div class="pro-card mb-4">
|
| 444 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 445 |
+
<div class="flex-1 min-w-0">
|
| 446 |
+
<h4 class="text-sm font-semibold text-color-var">Discussions</h4>
|
| 447 |
+
<p class="text-xs text-secondary-var mt-0.5">Discussions is the space for your community to have conversations, ask questions and post answers without opening issues.</p>
|
| 448 |
+
</div>
|
| 449 |
+
<input type="checkbox" class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 450 |
+
</label>
|
| 451 |
+
<a href="#" class="text-xs text-link-var hover:underline mt-2 inline-block">Get started with Discussions</a>
|
| 452 |
+
</div>
|
| 453 |
+
|
| 454 |
+
<div class="pro-card mb-4">
|
| 455 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 456 |
+
<div class="flex-1 min-w-0">
|
| 457 |
+
<h4 class="text-sm font-semibold text-color-var">Projects</h4>
|
| 458 |
+
<p class="text-xs text-secondary-var mt-0.5">Projects on GitForge are created at the repository owner's level and can be linked to a repository's Projects tab. Projects are suitable for cross-repository development efforts.</p>
|
| 459 |
+
</div>
|
| 460 |
+
<input type="checkbox" checked class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 461 |
+
</label>
|
| 462 |
+
</div>
|
| 463 |
+
|
| 464 |
+
<div class="pro-card mb-4">
|
| 465 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 466 |
+
<div class="flex-1 min-w-0">
|
| 467 |
+
<h4 class="text-sm font-semibold text-color-var">Sponsorships</h4>
|
| 468 |
+
<p class="text-xs text-secondary-var mt-0.5">Sponsorships help your community know how to financially support this repository. Display a "Sponsor" button.</p>
|
| 469 |
+
</div>
|
| 470 |
+
<input type="checkbox" class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 471 |
+
</label>
|
| 472 |
+
</div>
|
| 473 |
+
|
| 474 |
+
<div class="pro-card mb-4">
|
| 475 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Archives</h3>
|
| 476 |
+
<label class="flex justify-between items-start cursor-pointer">
|
| 477 |
+
<div class="flex-1 min-w-0">
|
| 478 |
+
<h4 class="text-sm font-semibold text-color-var">Include Git LFS objects in archives</h4>
|
| 479 |
+
<p class="text-xs text-secondary-var mt-0.5">When creating source code archives, you can choose to include files stored using Git LFS in the archive. Git LFS usage in archives is billed at the same rate as usage with the client.</p>
|
| 480 |
+
</div>
|
| 481 |
+
<input type="checkbox" class="h-5 w-5 text-link-var border-color-var rounded focus:ring-link-var ml-4">
|
| 482 |
+
</label>
|
| 483 |
+
</div>
|
| 484 |
+
</section>
|
| 485 |
+
|
| 486 |
+
<section id="webhooks" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 487 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">Webhooks</h2>
|
| 488 |
+
|
| 489 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Webhook Management</h3>
|
| 490 |
+
<p class="text-sm text-secondary-var mb-3">Automate third-party services on specific events.</p>
|
| 491 |
+
|
| 492 |
+
<div class="border border-color-var rounded-lg p-4 space-y-3">
|
| 493 |
+
<p class="font-semibold text-color-var text-sm">Webhook to: https://ci.example.com/build</p>
|
| 494 |
+
<p class="text-sm text-secondary-var">Triggers: push, pull_request</p>
|
| 495 |
+
<button class="text-link-var hover:text-link-hover-var text-xs mr-3">Test Webhook</button>
|
| 496 |
+
<button class="text-danger-color-var hover:text-danger-hover-var text-xs">Delete</button>
|
| 497 |
+
</div>
|
| 498 |
+
|
| 499 |
+
<button class="mt-4 inline-flex items-center px-3 py-1.5 text-sm bg-card-var border border-color-var rounded-lg text-color-var hover:bg-active-var transition-colors-theme">
|
| 500 |
+
<span class="material-symbols-rounded text-base mr-1">webhook</span> Add new webhook
|
| 501 |
+
</button>
|
| 502 |
+
</section>
|
| 503 |
+
|
| 504 |
+
<section id="secrets" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 505 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">Secrets & Variables</h2>
|
| 506 |
+
|
| 507 |
+
<div class="mb-8">
|
| 508 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Repository Secrets (Sensitive Data)</h3>
|
| 509 |
+
<p class="text-sm text-secondary-var mb-3">Securely store API keys and tokens for CI/CD or application runtime.</p>
|
| 510 |
+
|
| 511 |
+
<div id="secrets-list-container" class="space-y-3">
|
| 512 |
+
<p class="text-sm text-secondary-var italic">Loading secrets...</p>
|
| 513 |
+
</div>
|
| 514 |
+
|
| 515 |
+
<div id="add-secret-form" class="mt-6 border border-link-var/50 p-4 rounded-lg hidden">
|
| 516 |
+
<h4 class="text-base font-semibold text-color-var mb-3">Add/Update Secret</h4>
|
| 517 |
+
<form onsubmit="handleConfigOperation(event, 'secrets'); return false;" data-operation="add">
|
| 518 |
+
<input type="hidden" name="original-name" value="">
|
| 519 |
+
<div class="space-y-3">
|
| 520 |
+
<div>
|
| 521 |
+
<label class="block text-sm font-medium text-color-var mb-1">Secret Name</label>
|
| 522 |
+
<input type="text" name="name" class="form-input-var w-64" required placeholder="e.g. API_KEY">
|
| 523 |
+
</div>
|
| 524 |
+
<div>
|
| 525 |
+
<label class="block text-sm font-medium text-color-var mb-1">Description (Optional)</label>
|
| 526 |
+
<input type="text" name="description" class="form-input-var" placeholder="A brief explanation of the secret's use.">
|
| 527 |
+
</div>
|
| 528 |
+
<div>
|
| 529 |
+
<label class="block text-sm font-medium text-color-var mb-1">Secret Value</label>
|
| 530 |
+
<input type="password" name="value" class="form-input-var" required placeholder="The sensitive value">
|
| 531 |
+
</div>
|
| 532 |
+
<button type="submit" class="mt-3 inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 533 |
+
Save Secret
|
| 534 |
+
</button>
|
| 535 |
+
<button type="button" onclick="document.getElementById('add-secret-form').classList.add('hidden'); document.getElementById('add-secret-button').classList.remove('hidden');" class="ml-2 text-sm text-secondary-var hover:text-color-var">Cancel</button>
|
| 536 |
+
</div>
|
| 537 |
+
</form>
|
| 538 |
+
</div>
|
| 539 |
+
<button id="add-secret-button" onclick="showConfigForm('secrets');" class="mt-4 inline-flex items-center px-3 py-1.5 text-sm bg-green-600 border border-green-700 rounded-lg text-white hover:bg-green-700 transition-colors-theme">
|
| 540 |
+
<span class="material-symbols-rounded text-base mr-1">lock</span> Add new Secret
|
| 541 |
+
</button>
|
| 542 |
+
</div>
|
| 543 |
+
|
| 544 |
+
<div>
|
| 545 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Shared Variables (Non-sensitive)</h3>
|
| 546 |
+
<p class="text-sm text-secondary-var mb-3">Configuration variables for global project use.</p>
|
| 547 |
+
|
| 548 |
+
<div id="variables-list-container" class="space-y-3">
|
| 549 |
+
<p class="text-sm text-secondary-var italic">Loading variables...</p>
|
| 550 |
+
</div>
|
| 551 |
+
|
| 552 |
+
<div id="add-variable-form" class="mt-6 border border-link-var/50 p-4 rounded-lg hidden">
|
| 553 |
+
<h4 class="text-base font-semibold text-color-var mb-3">Add/Update Variable</h4>
|
| 554 |
+
<form onsubmit="handleConfigOperation(event, 'variables'); return false;" data-operation="add">
|
| 555 |
+
<input type="hidden" name="original-name" value="">
|
| 556 |
+
<div class="space-y-3">
|
| 557 |
+
<div>
|
| 558 |
+
<label class="block text-sm font-medium text-color-var mb-1">Variable Name</label>
|
| 559 |
+
<input type="text" name="name" class="form-input-var w-64" required placeholder="e.g. DEFAULT_ENV">
|
| 560 |
+
</div>
|
| 561 |
+
<div>
|
| 562 |
+
<label class="block text-sm font-medium text-color-var mb-1">Description (Optional)</label>
|
| 563 |
+
<input type="text" name="description" class="form-input-var" placeholder="A brief explanation of the variable's use.">
|
| 564 |
+
</div>
|
| 565 |
+
<div>
|
| 566 |
+
<label class="block text-sm font-medium text-color-var mb-1">Variable Value</label>
|
| 567 |
+
<input type="text" name="value" class="form-input-var" required placeholder="The configuration value">
|
| 568 |
+
</div>
|
| 569 |
+
<button type="submit" class="mt-3 inline-flex items-center px-4 py-2 text-sm bg-primary-color-var text-white font-semibold rounded-lg hover:bg-primary-hover-var transition duration-150">
|
| 570 |
+
Save Variable
|
| 571 |
+
</button>
|
| 572 |
+
<button type="button" onclick="document.getElementById('add-variable-form').classList.add('hidden'); document.getElementById('add-variable-button').classList.remove('hidden');" class="ml-2 text-sm text-secondary-var hover:text-color-var">Cancel</button>
|
| 573 |
+
</div>
|
| 574 |
+
</form>
|
| 575 |
+
</div>
|
| 576 |
+
<button id="add-variable-button" onclick="showConfigForm('variables');" class="mt-3 inline-flex items-center px-3 py-1.5 text-sm bg-green-600 border border-green-700 rounded-lg text-white hover:bg-green-700 transition-colors-theme">
|
| 577 |
+
<span class="material-symbols-rounded text-base mr-1">data_object</span> Add new Variable
|
| 578 |
+
</button>
|
| 579 |
+
</div>
|
| 580 |
+
</section>
|
| 581 |
+
|
| 582 |
+
<section id="integrations" class="bg-card-var p-6 rounded-lg border border-color-var transition-colors-theme">
|
| 583 |
+
<h2 class="text-xl font-semibold text-color-var border-b border-color-var/50 pb-3 mb-4">Integrations</h2>
|
| 584 |
+
|
| 585 |
+
<h3 class="text-lg font-medium text-color-var mb-2">Installed Applications</h3>
|
| 586 |
+
<p class="text-sm text-secondary-var mb-3">List of third-party apps integrated with this repository.</p>
|
| 587 |
+
|
| 588 |
+
<div class="border border-color-var rounded-lg p-4 space-y-3">
|
| 589 |
+
<div class="flex justify-between items-center text-sm">
|
| 590 |
+
<p class="font-semibold text-color-var">External CI/CD Tool</p>
|
| 591 |
+
<button class="text-danger-color-var hover:text-danger-hover-var text-xs">Uninstall</button>
|
| 592 |
+
</div>
|
| 593 |
+
</div>
|
| 594 |
+
|
| 595 |
+
<a href="#" class="mt-4 block text-sm text-link-var hover:text-link-hover-var">
|
| 596 |
+
Explore the GitForge Marketplace
|
| 597 |
+
</a>
|
| 598 |
+
</section>
|
| 599 |
+
|
| 600 |
+
<section id="danger-zone" class="bg-card-var p-6 rounded-lg border border-danger-color-var transition-colors-theme border-4 border-danger-color-var/50">
|
| 601 |
+
<h2 class="text-xl font-semibold text-danger-color-var border-b border-danger-color-var/50 pb-3 mb-4 flex items-center">
|
| 602 |
+
<span class="material-symbols-rounded text-2xl mr-2">warning</span> Danger Zone
|
| 603 |
+
</h2>
|
| 604 |
+
|
| 605 |
+
<div class="pro-card flex justify-between items-center mb-4">
|
| 606 |
+
<div>
|
| 607 |
+
<h3 class="text-lg font-medium text-color-var">Transfer Repository</h3>
|
| 608 |
+
<p class="text-sm text-secondary-var">Transfer ownership to another user or organization. This is irreversible.</p>
|
| 609 |
+
</div>
|
| 610 |
+
<button class="inline-flex items-center px-4 py-2 text-sm bg-card-var border border-danger-color-var text-danger-color-var font-semibold rounded-lg hover:bg-danger-color-var hover:text-white transition duration-150">
|
| 611 |
+
Transfer
|
| 612 |
+
</button>
|
| 613 |
+
</div>
|
| 614 |
+
|
| 615 |
+
<div class="p-4 bg-card-var border border-color-var rounded-lg text-sm text-color-var mb-4">
|
| 616 |
+
<p class="font-semibold flex items-center text-link-var">
|
| 617 |
+
<span class="material-symbols-rounded text-base mr-2">info</span> Changing Visibility
|
| 618 |
+
</p>
|
| 619 |
+
<p class="mt-1 text-secondary-var">Making a Public repository Private will affect forks, packages, and linked services. Confirm the impact before proceeding.</p>
|
| 620 |
+
</div>
|
| 621 |
+
|
| 622 |
+
<div class="p-4 rounded-lg bg-card-var border border-danger-color-var transition-colors-theme">
|
| 623 |
+
<h3 class="text-lg font-medium text-danger-color-var">Permanently Delete this Repository</h3>
|
| 624 |
+
<p class="text-sm text-secondary-var mt-2">
|
| 625 |
+
Deleting this repository is a permanent action that **cannot be undone**. All files, Git history, and associated data will be permanently deleted.
|
| 626 |
+
</p>
|
| 627 |
+
<div class="mt-4 flex justify-end">
|
| 628 |
+
<button id="delete-repo-button"
|
| 629 |
+
type="button"
|
| 630 |
+
class="inline-flex items-center px-4 py-2 text-sm bg-danger-color-var text-white font-semibold rounded-lg hover:bg-danger-hover-var transition duration-150">
|
| 631 |
+
Delete Repository
|
| 632 |
+
</button>
|
| 633 |
+
</div>
|
| 634 |
+
</div>
|
| 635 |
+
</section>
|
| 636 |
+
</div>
|
| 637 |
+
</div>
|
| 638 |
+
</div>
|
| 639 |
+
|
| 640 |
+
<script>
|
| 641 |
+
// --- 1. CONFIGURATION: Nouvelle structure pour Secrets/Variables et préservation des dépendances existantes ---
|
| 642 |
+
|
| 643 |
+
// Utilisation de la variable Jinja2 pour le slug (nouvelle méthode demandée)
|
| 644 |
+
// IMPORTANT: Ces variables sont insérées par le moteur Jinja2 du backend
|
| 645 |
+
const REPO_SLUG = '{{ repo_slug }}';
|
| 646 |
+
|
| 647 |
+
// Nouvelle URL de base pour les appels API des secrets/variables (demandée par l'utilisateur)
|
| 648 |
+
const BASE_API_URL = `/api/repo_data/${REPO_SLUG}`;
|
| 649 |
+
|
| 650 |
+
// Variables existantes et nécessaires pour les autres fonctionnalités
|
| 651 |
+
const USER_ID = document.getElementById('repo-user').textContent.trim();
|
| 652 |
+
const GENERAL_SETTINGS_API_URL = `/api/settings/${USER_ID}/repo/${REPO_SLUG}`; // Ancienne BASE_API_URL (pour General Settings)
|
| 653 |
+
const REPO_DELETE_API_URL = `/api/repos/${REPO_SLUG}`; // Route de suppression
|
| 654 |
+
|
| 655 |
+
// --- 2. FONCTIONS DE RENDU (Affichage de la liste) ---
|
| 656 |
+
function renderConfigItems(items, type) {
|
| 657 |
+
const container = document.getElementById(`${type}-list-container`);
|
| 658 |
+
container.innerHTML = '';
|
| 659 |
+
if (items.length === 0) {
|
| 660 |
+
container.innerHTML = `<p class="text-sm text-secondary-var italic">No ${type.slice(0, -1)} found.</p>`;
|
| 661 |
+
return;
|
| 662 |
+
}
|
| 663 |
+
|
| 664 |
+
items.forEach(item => {
|
| 665 |
+
// Encode les valeurs pour les passer aux fonctions JS (important pour les guillemets simples/doubles)
|
| 666 |
+
const nameEncoded = encodeURIComponent(item.name);
|
| 667 |
+
const descriptionEncoded = encodeURIComponent(item.description || '');
|
| 668 |
+
// La valeur des secrets sera masquée côté backend, mais la valeur des variables est visible
|
| 669 |
+
const valueDisplay = (type === 'secrets') ? '***SECRET_VALUE_HIDDEN***' : item.value;
|
| 670 |
+
const valueEncoded = encodeURIComponent(valueDisplay);
|
| 671 |
+
|
| 672 |
+
const itemHtml = `
|
| 673 |
+
<div class="flex justify-between items-center p-3 bg-card-var border border-color-var/50 rounded-lg">
|
| 674 |
+
<div class="flex-1 min-w-0">
|
| 675 |
+
<div class="font-mono text-sm font-semibold text-color-var truncate">${item.name}</div>
|
| 676 |
+
<div class="text-xs text-secondary-var mt-0.5 truncate">${item.description || 'No description'}</div>
|
| 677 |
+
<div class="text-xs text-secondary-var mt-0.5 font-mono">${valueDisplay}</div>
|
| 678 |
+
</div>
|
| 679 |
+
<div class="flex space-x-2 ml-4">
|
| 680 |
+
<button onclick="editConfigItem('${type}', '${nameEncoded}', '${descriptionEncoded}', '${valueEncoded}')"
|
| 681 |
+
class="text-xs text-link-var hover:text-primary-color-var transition duration-150">
|
| 682 |
+
Edit
|
| 683 |
+
</button>
|
| 684 |
+
<button onclick="deleteConfigItem('${type}', '${nameEncoded}')"
|
| 685 |
+
class="text-xs text-red-500 hover:text-red-700 transition duration-150">
|
| 686 |
+
Delete
|
| 687 |
+
</button>
|
| 688 |
+
</div>
|
| 689 |
+
</div>
|
| 690 |
+
`;
|
| 691 |
+
container.insertAdjacentHTML('beforeend', itemHtml);
|
| 692 |
+
});
|
| 693 |
+
}
|
| 694 |
+
|
| 695 |
+
// --- 3. FONCTION DE LECTURE (FETCH) ---
|
| 696 |
+
async function fetchConfigItems(type) {
|
| 697 |
+
const container = document.getElementById(`${type}-list-container`);
|
| 698 |
+
container.innerHTML = `<p class="text-sm text-secondary-var italic">Loading ${type}...</p>`;
|
| 699 |
+
|
| 700 |
+
try {
|
| 701 |
+
// item_type est au singulier ('secret' ou 'variable')
|
| 702 |
+
const item_type = type.slice(0, -1);
|
| 703 |
+
const response = await fetch(`${BASE_API_URL}/items?item_type=${item_type}`);
|
| 704 |
+
const data = await response.json();
|
| 705 |
+
|
| 706 |
+
if (response.ok && data.success) {
|
| 707 |
+
renderConfigItems(data.items, type);
|
| 708 |
+
} else {
|
| 709 |
+
container.innerHTML = `<p class="text-sm text-red-500">Loading Error: ${data.message || 'Unknown error'}</p>`;
|
| 710 |
+
}
|
| 711 |
+
} catch (error) {
|
| 712 |
+
container.innerHTML = `<p class="text-sm text-red-500">Network error when loading ${type}.</p>`;
|
| 713 |
+
console.error(`Error loading ${type}:`, error);
|
| 714 |
+
}
|
| 715 |
+
}
|
| 716 |
+
|
| 717 |
+
|
| 718 |
+
// --- 5. FONCTION CRUD : CREATE/UPDATE (Sauvegarde) ---
|
| 719 |
+
async function handleConfigOperation(event, type) {
|
| 720 |
+
event.preventDefault();
|
| 721 |
+
const form = event.target;
|
| 722 |
+
const item_type = type.slice(0, -1); // 'secrets' -> 'secret', 'variables' -> 'variable'
|
| 723 |
+
|
| 724 |
+
const payload = {
|
| 725 |
+
name: form.elements['name'].value,
|
| 726 |
+
description: form.elements['description'].value,
|
| 727 |
+
value: form.elements['value'].value,
|
| 728 |
+
item_type: item_type // Requis par le backend
|
| 729 |
+
};
|
| 730 |
+
|
| 731 |
+
// Désactiver le bouton pendant le traitement
|
| 732 |
+
const submitButton = form.querySelector('button[type="submit"]');
|
| 733 |
+
submitButton.disabled = true;
|
| 734 |
+
submitButton.textContent = 'Saving...';
|
| 735 |
+
|
| 736 |
+
try {
|
| 737 |
+
const response = await fetch(`${BASE_API_URL}/update_item`, {
|
| 738 |
+
method: 'POST', // Utilise la route POST pour la mise à jour (Upsert)
|
| 739 |
+
headers: { 'Content-Type': 'application/json' },
|
| 740 |
+
body: JSON.stringify(payload)
|
| 741 |
+
});
|
| 742 |
+
|
| 743 |
+
let data;
|
| 744 |
+
try {
|
| 745 |
+
data = await response.json();
|
| 746 |
+
} catch (e) {
|
| 747 |
+
// Tente d'analyser la réponse même si elle n'est pas OK (pour récupérer un message d'erreur JSON)
|
| 748 |
+
if (!response.ok) throw new Error(`HTTP Error: Status ${response.status}`);
|
| 749 |
+
}
|
| 750 |
+
|
| 751 |
+
if (response.ok && data && data.success) {
|
| 752 |
+
alert(data.message);
|
| 753 |
+
// Masquer le formulaire et mettre à jour la liste
|
| 754 |
+
document.getElementById(`add-${item_type}-form`).classList.add('hidden');
|
| 755 |
+
document.getElementById(`add-${item_type}-button`).classList.remove('hidden');
|
| 756 |
+
fetchConfigItems(type); // Recharger les données
|
| 757 |
+
} else {
|
| 758 |
+
alert(`Save Error: ${data ? data.message : `Internal error or status ${response.status}.`}`);
|
| 759 |
+
}
|
| 760 |
+
} catch (error) {
|
| 761 |
+
alert(`Network error during save of ${item_type}. Details: ${error.message || 'Unknown error'}`);
|
| 762 |
+
console.error(`Save error for ${item_type}:`, error);
|
| 763 |
+
} finally {
|
| 764 |
+
submitButton.disabled = false;
|
| 765 |
+
submitButton.textContent = `Save ${item_type.charAt(0).toUpperCase() + item_type.slice(1)}`;
|
| 766 |
+
}
|
| 767 |
+
}
|
| 768 |
+
|
| 769 |
+
// --- 6. FONCTION POUR AFFICHER LE FORMULAIRE DE CRÉATION/ÉDITION ---
|
| 770 |
+
function showConfigForm(type) {
|
| 771 |
+
const item_type = type.slice(0, -1);
|
| 772 |
+
const formContainer = document.getElementById(`add-${item_type}-form`);
|
| 773 |
+
const addButton = document.getElementById(`add-${item_type}-button`);
|
| 774 |
+
|
| 775 |
+
// Cacher l'autre formulaire si visible
|
| 776 |
+
const otherType = (type === 'secrets') ? 'variables' : 'secrets';
|
| 777 |
+
const otherItemType = otherType.slice(0, -1);
|
| 778 |
+
document.getElementById(`add-${otherItemType}-form`).classList.add('hidden');
|
| 779 |
+
document.getElementById(`add-${otherItemType}-button`).classList.remove('hidden');
|
| 780 |
+
|
| 781 |
+
// Reset le formulaire et le configurer pour une 'création'
|
| 782 |
+
const form = formContainer.querySelector('form');
|
| 783 |
+
form.reset();
|
| 784 |
+
formContainer.querySelector('h4').textContent = `Add new ${item_type}`;
|
| 785 |
+
form.querySelector('button[type="submit"]').textContent = `Save ${item_type.charAt(0).toUpperCase() + item_type.slice(1)}`;
|
| 786 |
+
form.querySelector('[name="value"]').type = (type === 'secrets') ? 'password' : 'text';
|
| 787 |
+
form.elements['name'].readOnly = false; // Réactiver l'édition du nom
|
| 788 |
+
|
| 789 |
+
formContainer.classList.remove('hidden');
|
| 790 |
+
addButton.classList.add('hidden');
|
| 791 |
+
}
|
| 792 |
+
|
| 793 |
+
// --- 7. FONCTION POUR POPULER LE FORMULAIRE POUR L'ÉDITION ---
|
| 794 |
+
function editConfigItem(type, nameEncoded, descriptionEncoded, valueEncoded) {
|
| 795 |
+
const item_type = type.slice(0, -1);
|
| 796 |
+
|
| 797 |
+
// Afficher le formulaire d'abord
|
| 798 |
+
showConfigForm(type);
|
| 799 |
+
|
| 800 |
+
const form = document.getElementById(`add-${item_type}-form`).querySelector('form');
|
| 801 |
+
|
| 802 |
+
// Décoder et peupler les champs
|
| 803 |
+
const name = decodeURIComponent(nameEncoded);
|
| 804 |
+
const description = decodeURIComponent(descriptionEncoded);
|
| 805 |
+
|
| 806 |
+
form.elements['name'].value = name;
|
| 807 |
+
form.elements['name'].readOnly = true; // Empêcher l'édition du nom lors de l'Update
|
| 808 |
+
form.elements['description'].value = description;
|
| 809 |
+
|
| 810 |
+
// IMPORTANT: La valeur des secrets est masquée par le backend.
|
| 811 |
+
if (item_type === 'secret') {
|
| 812 |
+
form.elements['value'].value = '';
|
| 813 |
+
form.elements['value'].placeholder = 'Enter new value (required to update secret)';
|
| 814 |
+
alert("Please enter the new secret value when modifying. The existing value is not displayed for security reasons.");
|
| 815 |
+
} else {
|
| 816 |
+
form.elements['value'].value = decodeURIComponent(valueEncoded);
|
| 817 |
+
form.elements['value'].placeholder = 'The configuration value';
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
// Mettre à jour le texte du titre et du bouton de soumission
|
| 821 |
+
document.getElementById(`add-${item_type}-form`).querySelector('h4').textContent = `Update ${item_type}: ${name}`;
|
| 822 |
+
form.querySelector('button[type="submit"]').textContent = `Update ${item_type.charAt(0).toUpperCase() + item_type.slice(1)}`;
|
| 823 |
+
}
|
| 824 |
+
|
| 825 |
+
// --- 8. FONCTION CRUD : DELETE (Suppression) ---
|
| 826 |
+
async function deleteConfigItem(type, nameEncoded) {
|
| 827 |
+
const item_type = type.slice(0, -1);
|
| 828 |
+
const name = decodeURIComponent(nameEncoded);
|
| 829 |
+
|
| 830 |
+
if (!confirm(`Are you sure you want to delete the ${item_type} named '${name}'? This action is irreversible.`)) {
|
| 831 |
+
return;
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
try {
|
| 835 |
+
// URL pour l'appel de suppression (le backend doit traiter le DELETE avec ces paramètres)
|
| 836 |
+
const deleteUrl = `${BASE_API_URL}/items?item_type=${item_type}&name=${name}`;
|
| 837 |
+
|
| 838 |
+
const response = await fetch(deleteUrl, {
|
| 839 |
+
method: 'DELETE',
|
| 840 |
+
});
|
| 841 |
+
|
| 842 |
+
let data;
|
| 843 |
+
try {
|
| 844 |
+
data = await response.json();
|
| 845 |
+
} catch (e) {
|
| 846 |
+
// Tente d'analyser la réponse même si elle n'est pas OK
|
| 847 |
+
if (!response.ok) throw new Error(`HTTP Error: Status ${response.status}`);
|
| 848 |
+
}
|
| 849 |
+
|
| 850 |
+
// Si response.ok est VRAI et que le backend retourne un succès (data.success=true)
|
| 851 |
+
if (response.ok && data && data.success) {
|
| 852 |
+
alert(data.message);
|
| 853 |
+
fetchConfigItems(type); // Recharger les données
|
| 854 |
+
} else {
|
| 855 |
+
// Afficher le message d'erreur du backend ou un message par défaut
|
| 856 |
+
alert(`Deletion Error: ${data ? data.message : `Check if the DELETE route is correctly implemented on the backend. Status: ${response.status}`}`);
|
| 857 |
+
}
|
| 858 |
+
} catch (error) {
|
| 859 |
+
// Afficher le message d'erreur réseau ou l'erreur HTTP lancée ci-dessus
|
| 860 |
+
alert(`Network error during deletion. Details: ${error.message || 'Unknown error'}`);
|
| 861 |
+
console.error(`Deletion error:`, error);
|
| 862 |
+
}
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
// Chargement de la page et logique de navigation (ORIGINAL)
|
| 866 |
+
const navLinks = document.querySelectorAll('.settings-nav-link');
|
| 867 |
+
window.setActiveLink = (clickedLink) => {
|
| 868 |
+
navLinks.forEach(link => link.classList.remove('active'));
|
| 869 |
+
clickedLink.classList.add('active');
|
| 870 |
+
};
|
| 871 |
+
|
| 872 |
+
const observerOptions = {
|
| 873 |
+
root: null, // viewport
|
| 874 |
+
rootMargin: '0px 0px -70% 0px', // Trigger point at 30% from top
|
| 875 |
+
threshold: 0 // As soon as one pixel est visible
|
| 876 |
+
};
|
| 877 |
+
|
| 878 |
+
const sections = document.querySelectorAll('section[id]');
|
| 879 |
+
|
| 880 |
+
const observer = new IntersectionObserver((entries) => {
|
| 881 |
+
entries.forEach(entry => {
|
| 882 |
+
if (entry.isIntersecting) {
|
| 883 |
+
const id = entry.target.getAttribute('id');
|
| 884 |
+
const correspondingLink = document.querySelector(`.settings-nav-link[href="#${id}"]`);
|
| 885 |
+
|
| 886 |
+
if (correspondingLink) {
|
| 887 |
+
navLinks.forEach(link => link.classList.remove('active'));
|
| 888 |
+
correspondingLink.classList.add('active');
|
| 889 |
+
}
|
| 890 |
+
}
|
| 891 |
+
});
|
| 892 |
+
}, observerOptions);
|
| 893 |
+
|
| 894 |
+
sections.forEach(section => {
|
| 895 |
+
observer.observe(section);
|
| 896 |
+
});
|
| 897 |
+
|
| 898 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 899 |
+
if (!document.querySelector('.settings-nav-link.active')) {
|
| 900 |
+
document.querySelector('.settings-nav-link').classList.add('active');
|
| 901 |
+
}
|
| 902 |
+
|
| 903 |
+
// Lancer le chargement des secrets et variables au démarrage (LOGIQUE MISE À JOUR)
|
| 904 |
+
if (REPO_SLUG && REPO_SLUG !== 'None') {
|
| 905 |
+
fetchConfigItems('secrets');
|
| 906 |
+
fetchConfigItems('variables');
|
| 907 |
+
}
|
| 908 |
+
|
| 909 |
+
|
| 910 |
+
// ***************************************************************
|
| 911 |
+
// BLOC JS : LOGIQUE DE SUPPRESSION DE DÉPÔT (ORIGINAL)
|
| 912 |
+
// ***************************************************************
|
| 913 |
+
const deleteButton = document.getElementById('delete-repo-button');
|
| 914 |
+
|
| 915 |
+
if (deleteButton) {
|
| 916 |
+
deleteButton.addEventListener('click', async () => {
|
| 917 |
+
const repoSlug = REPO_SLUG; // Utilisation de la variable REPO_SLUG déjà définie
|
| 918 |
+
|
| 919 |
+
if (!repoSlug) {
|
| 920 |
+
alert("Error: Repository slug not found. Cannot delete.");
|
| 921 |
+
return;
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
// 1. Double confirmation pour une action destructive
|
| 925 |
+
const confirmation = window.confirm(`Are you SURE you want to permanently delete the repository '${repoSlug}'? This action is irreversible and deletes ALL data.`);
|
| 926 |
+
if (!confirmation) {
|
| 927 |
+
return;
|
| 928 |
+
}
|
| 929 |
+
|
| 930 |
+
// 2. Appel de la route DELETE
|
| 931 |
+
const url = REPO_DELETE_API_URL; // Utilisation de la variable REPO_DELETE_API_URL
|
| 932 |
+
|
| 933 |
+
try {
|
| 934 |
+
// Désactiver le bouton pendant le traitement
|
| 935 |
+
deleteButton.disabled = true;
|
| 936 |
+
deleteButton.textContent = 'Deletion in progress...';
|
| 937 |
+
|
| 938 |
+
const response = await fetch(url, {
|
| 939 |
+
method: 'DELETE',
|
| 940 |
+
headers: {
|
| 941 |
+
'Content-Type': 'application/json'
|
| 942 |
+
},
|
| 943 |
+
});
|
| 944 |
+
|
| 945 |
+
// Tente de lire la réponse JSON, même si elle est vide/erreur
|
| 946 |
+
let data = {};
|
| 947 |
+
try {
|
| 948 |
+
data = await response.json();
|
| 949 |
+
} catch (e) {
|
| 950 |
+
// Ignorer si la réponse n'est pas JSON (par exemple, 204 No Content)
|
| 951 |
+
if (response.status !== 204) {
|
| 952 |
+
console.warn("Response is not JSON, but status is OK. Continuing.");
|
| 953 |
+
}
|
| 954 |
+
}
|
| 955 |
+
|
| 956 |
+
if (!response.ok) {
|
| 957 |
+
// 404, 500 ou autre erreur du backend
|
| 958 |
+
throw new Error(data.message || `Error during deletion: Status ${response.status}`);
|
| 959 |
+
}
|
| 960 |
+
|
| 961 |
+
alert('Repository deleted successfully. Redirecting to dashboard.');
|
| 962 |
+
// 3. Redirection après succès
|
| 963 |
+
window.location.href = '/mindus/nexus/dashboard';
|
| 964 |
+
|
| 965 |
+
} catch (error) {
|
| 966 |
+
console.error("Error deleting repository:", error);
|
| 967 |
+
alert(`Failed to delete repository. Details: ${error.message}`);
|
| 968 |
+
} finally {
|
| 969 |
+
// Réactiver et restaurer l'état du bouton en cas d'erreur
|
| 970 |
+
deleteButton.disabled = false;
|
| 971 |
+
deleteButton.textContent = 'Delete Repository';
|
| 972 |
+
}
|
| 973 |
+
});
|
| 974 |
+
}
|
| 975 |
+
// ***************************************************************
|
| 976 |
+
});
|
| 977 |
+
|
| 978 |
+
/**
|
| 979 |
+
* Handles the update of general settings (General Settings).
|
| 980 |
+
*/
|
| 981 |
+
document.getElementById('general-settings-form').addEventListener('submit', async function(e) {
|
| 982 |
+
e.preventDefault();
|
| 983 |
+
// The rename logic is now decoupled from the form submission for better UX matching the image
|
| 984 |
+
// and is managed by the rename-button click handler, but for the sake of submitting
|
| 985 |
+
// visibility changes and other potential form elements, we keep the submit handler.
|
| 986 |
+
if (!REPO_SLUG) return; // Security
|
| 987 |
+
|
| 988 |
+
// Only submitting visibility and description for this simplified form.
|
| 989 |
+
// The repoName update is handled by the rename button for image parity,
|
| 990 |
+
// but we include it in the payload for completeness with the backend route.
|
| 991 |
+
const repoName = document.getElementById('repo-name-input').value;
|
| 992 |
+
const repoDescription = ''; // Description field was removed from the General section.
|
| 993 |
+
const visibility = document.querySelector('#repo-visibility-radios input[name="visibility"]:checked').value;
|
| 994 |
+
|
| 995 |
+
// Using the GENERAL_SETTINGS_API_URL variable for the original route
|
| 996 |
+
const url = GENERAL_SETTINGS_API_URL;
|
| 997 |
+
const payload = {
|
| 998 |
+
name: repoName,
|
| 999 |
+
description: repoDescription,
|
| 1000 |
+
visibility: visibility
|
| 1001 |
+
};
|
| 1002 |
+
|
| 1003 |
+
const submitButton = e.target.querySelector('button[type="submit"]');
|
| 1004 |
+
submitButton.disabled = true;
|
| 1005 |
+
submitButton.textContent = 'Saving...';
|
| 1006 |
+
|
| 1007 |
+
|
| 1008 |
+
try {
|
| 1009 |
+
const response = await fetch(url, {
|
| 1010 |
+
method: 'PUT',
|
| 1011 |
+
headers: { 'Content-Type': 'application/json' },
|
| 1012 |
+
body: JSON.stringify(payload)
|
| 1013 |
+
});
|
| 1014 |
+
|
| 1015 |
+
if (!response.ok) {
|
| 1016 |
+
const errorData = await response.json();
|
| 1017 |
+
throw new Error(`API Error: ${errorData.message || response.statusText}`);
|
| 1018 |
+
}
|
| 1019 |
+
|
| 1020 |
+
alert('General settings saved successfully!');
|
| 1021 |
+
// Update display of name and visibility if needed
|
| 1022 |
+
document.getElementById('repo-name').textContent = repoName;
|
| 1023 |
+
document.getElementById('repo-visibility').textContent = visibility.charAt(0).toUpperCase() + visibility.slice(1);
|
| 1024 |
+
|
| 1025 |
+
} catch (error) {
|
| 1026 |
+
console.error("Error updating general settings:", error);
|
| 1027 |
+
alert(`Failed to update settings. Details: ${error.message}`);
|
| 1028 |
+
} finally {
|
| 1029 |
+
submitButton.disabled = false;
|
| 1030 |
+
submitButton.textContent = 'Save General Changes';
|
| 1031 |
+
}
|
| 1032 |
+
});
|
| 1033 |
+
|
| 1034 |
+
/**
|
| 1035 |
+
* Logic for the Rename button (to match the image).
|
| 1036 |
+
*/
|
| 1037 |
+
document.getElementById('rename-button').addEventListener('click', async function() {
|
| 1038 |
+
if (!REPO_SLUG) return;
|
| 1039 |
+
|
| 1040 |
+
const repoNameInput = document.getElementById('repo-name-input');
|
| 1041 |
+
const newRepoName = repoNameInput.value.trim();
|
| 1042 |
+
const currentRepoName = document.getElementById('repo-name').textContent.trim();
|
| 1043 |
+
|
| 1044 |
+
if (newRepoName === currentRepoName) {
|
| 1045 |
+
alert('The new name is the same as the current name.');
|
| 1046 |
+
return;
|
| 1047 |
+
}
|
| 1048 |
+
|
| 1049 |
+
if (newRepoName === '') {
|
| 1050 |
+
alert('Repository name cannot be empty.');
|
| 1051 |
+
return;
|
| 1052 |
+
}
|
| 1053 |
+
|
| 1054 |
+
if (!confirm(`Are you sure you want to rename the repository from '${currentRepoName}' to '${newRepoName}'?`)) {
|
| 1055 |
+
return;
|
| 1056 |
+
}
|
| 1057 |
+
|
| 1058 |
+
const button = this;
|
| 1059 |
+
button.disabled = true;
|
| 1060 |
+
button.textContent = 'Renaming...';
|
| 1061 |
+
|
| 1062 |
+
// This relies on the GENERAL_SETTINGS_API_URL and the backend's ability to handle
|
| 1063 |
+
// just a name change via PUT, which is assumed from the existing submit handler logic.
|
| 1064 |
+
const url = GENERAL_SETTINGS_API_URL;
|
| 1065 |
+
const payload = {
|
| 1066 |
+
name: newRepoName,
|
| 1067 |
+
// Assuming visibility and description are also sent for a complete update,
|
| 1068 |
+
// though only the name is changing here for this button.
|
| 1069 |
+
description: '', // Description removed
|
| 1070 |
+
visibility: document.querySelector('#repo-visibility-radios input[name="visibility"]:checked').value
|
| 1071 |
+
};
|
| 1072 |
+
|
| 1073 |
+
try {
|
| 1074 |
+
const response = await fetch(url, {
|
| 1075 |
+
method: 'PUT',
|
| 1076 |
+
headers: { 'Content-Type': 'application/json' },
|
| 1077 |
+
body: JSON.stringify(payload)
|
| 1078 |
+
});
|
| 1079 |
+
|
| 1080 |
+
if (!response.ok) {
|
| 1081 |
+
const errorData = await response.json();
|
| 1082 |
+
throw new Error(`API Error: ${errorData.message || response.statusText}`);
|
| 1083 |
+
}
|
| 1084 |
+
|
| 1085 |
+
alert(`Repository successfully renamed to '${newRepoName}'!`);
|
| 1086 |
+
|
| 1087 |
+
// Update all display elements
|
| 1088 |
+
document.getElementById('repo-name').textContent = newRepoName;
|
| 1089 |
+
|
| 1090 |
+
// If the URL changes on the backend, a redirect might be needed, but for now
|
| 1091 |
+
// we assume the page content updates are enough.
|
| 1092 |
+
|
| 1093 |
+
} catch (error) {
|
| 1094 |
+
console.error("Error renaming repository:", error);
|
| 1095 |
+
alert(`Failed to rename repository. Details: ${error.message}`);
|
| 1096 |
+
repoNameInput.value = currentRepoName; // Restore old name on failure
|
| 1097 |
+
} finally {
|
| 1098 |
+
button.disabled = false;
|
| 1099 |
+
button.textContent = 'Rename';
|
| 1100 |
+
}
|
| 1101 |
+
});
|
| 1102 |
+
|
| 1103 |
+
</script>
|
| 1104 |
+
</body>
|
| 1105 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/statut.html
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr" class="dark">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Nexus | Statut de l'API</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 |
+
<style>
|
| 12 |
+
/* Configuration de la police Inter */
|
| 13 |
+
body { font-family: 'Inter', sans-serif; }
|
| 14 |
+
|
| 15 |
+
/* Définition des variables de thème (Ajoutées pour le style) */
|
| 16 |
+
:root {
|
| 17 |
+
/* Couleurs de base (exemple - ajustez si nécessaire) */
|
| 18 |
+
--page-var: #f8fafc; /* light - slate-50 */
|
| 19 |
+
--color-var: #0f172a; /* light - slate-900 */
|
| 20 |
+
--secondary-var: #64748b; /* light - slate-500 */
|
| 21 |
+
--card-var: #ffffff; /* light - white */
|
| 22 |
+
--sidebar-var: #e2e8f0; /* light - slate-200 */
|
| 23 |
+
--sidebar-active-var: #cbd5e1; /* light - slate-300 */
|
| 24 |
+
--input-var: #f1f5f9; /* light - slate-100 */
|
| 25 |
+
--primary-color-var: #4f46e5; /* indigo-600 */
|
| 26 |
+
--primary-hover-var: #4338ca; /* indigo-700 */
|
| 27 |
+
--error-var: #fef2f2; /* red-50 */
|
| 28 |
+
--success-var: #f0fdf4; /* green-50 */
|
| 29 |
+
--warning-var: #fcd34d; /* amber-400 */
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.dark {
|
| 33 |
+
--page-var: #18181b; /* dark - zinc-900 (Gris très foncé pour l'arrière-plan de la page) */
|
| 34 |
+
--color-var: #f4f4f5; /* dark - zinc-100 (Texte clair) */
|
| 35 |
+
--secondary-var: #a1a1aa; /* dark - zinc-400 (Texte secondaire) */
|
| 36 |
+
--card-var: #27272a; /* dark - zinc-800 (Gris foncé pour les cartes et la sidebar) */
|
| 37 |
+
--sidebar-var: #27272a; /* dark - zinc-800 */
|
| 38 |
+
--sidebar-active-var: #3f3f46; /* dark - zinc-700 (Gris un peu plus clair pour l'actif) */
|
| 39 |
+
--input-var: #18181b; /* dark - zinc-900 (Fond de champ de saisie) */
|
| 40 |
+
--primary-color-var: #6366f1; /* indigo-500 (Couleur primaire inchangée) */
|
| 41 |
+
--primary-hover-var: #4f46e5; /* indigo-600 */
|
| 42 |
+
--error-var: #450a0a; /* red-950 */
|
| 43 |
+
--success-var: #052e16; /* green-950 */
|
| 44 |
+
--warning-var: #b45309; /* amber-800 */
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
/* Transition pour un effet doux des couleurs */
|
| 48 |
+
.transition-colors-theme { transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
|
| 49 |
+
|
| 50 |
+
/* Style et positionnement du bouton de Thème */
|
| 51 |
+
.theme-switch {
|
| 52 |
+
background: none;
|
| 53 |
+
border: none;
|
| 54 |
+
cursor: pointer;
|
| 55 |
+
font-size: 24px;
|
| 56 |
+
transition: color 0.2s;
|
| 57 |
+
position: fixed; /* Reste fixe même si le reste défile */
|
| 58 |
+
top: 1rem;
|
| 59 |
+
right: 1rem;
|
| 60 |
+
z-index: 50; /* Doit être au-dessus du reste */
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
/* Style pour la sidebar responsive */
|
| 64 |
+
.sidebar {
|
| 65 |
+
position: fixed;
|
| 66 |
+
top: 0;
|
| 67 |
+
left: 0;
|
| 68 |
+
height: 100vh;
|
| 69 |
+
z-index: 40;
|
| 70 |
+
transform: translateX(-100%);
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/* Styles pour le mode desktop/large screen */
|
| 74 |
+
@media (min-width: 1024px) {
|
| 75 |
+
.sidebar {
|
| 76 |
+
transform: translateX(0);
|
| 77 |
+
}
|
| 78 |
+
.main-content {
|
| 79 |
+
margin-left: 16rem; /* 64px width */
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
/* Styles pour le mode mobile/tablet */
|
| 84 |
+
@media (max-width: 1023px) {
|
| 85 |
+
.sidebar {
|
| 86 |
+
transition: transform 0.3s ease-in-out;
|
| 87 |
+
}
|
| 88 |
+
.sidebar.open {
|
| 89 |
+
transform: translateX(0);
|
| 90 |
+
}
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
/* Ajout des styles pour les variables CSS dans Tailwind */
|
| 94 |
+
.bg-page-var { background-color: var(--page-var); }
|
| 95 |
+
.text-color-var { color: var(--color-var); }
|
| 96 |
+
.text-secondary-var { color: var(--secondary-var); }
|
| 97 |
+
.bg-card-var { background-color: var(--card-var); }
|
| 98 |
+
.bg-sidebar-var { background-color: var(--sidebar-var); }
|
| 99 |
+
.border-sidebar-var { border-color: var(--sidebar-var); }
|
| 100 |
+
.bg-sidebar-active-var { background-color: var(--sidebar-active-var); }
|
| 101 |
+
.bg-input-var { background-color: var(--input-var); }
|
| 102 |
+
.border-input-var { border-color: var(--input-var); }
|
| 103 |
+
.text-primary-color-var { color: var(--primary-color-var); }
|
| 104 |
+
.focus\:ring-primary-color-var:focus { --tw-ring-color: var(--primary-color-var); }
|
| 105 |
+
.focus\:border-primary-color-var:focus { border-color: var(--primary-color-var); }
|
| 106 |
+
.bg-primary-color-var { background-color: var(--primary-color-var); }
|
| 107 |
+
.hover\:bg-primary-hover-var:hover { background-color: var(--primary-hover-var); }
|
| 108 |
+
.hover\:bg-sidebar-active-var:hover { background-color: var(--sidebar-active-var); }
|
| 109 |
+
.hover\:bg-sidebar-active-var\/80:hover { background-color: color-mix(in srgb, var(--sidebar-active-var) 80%, transparent); }
|
| 110 |
+
|
| 111 |
+
/* Correction pour les messages flash pour utiliser les variables */
|
| 112 |
+
.bg-red-900\/20 { background-color: color-mix(in srgb, var(--error-var) 20%, transparent); } /* Approximation des couleurs spécifiques */
|
| 113 |
+
.text-red-500 { color: #ef4444; } /* Laissez le rouge spécifique pour les erreurs */
|
| 114 |
+
.border-red-900 { border-color: #7f1d1d; } /* Laissez le rouge spécifique pour les erreurs */
|
| 115 |
+
.bg-green-900\/20 { background-color: color-mix(in srgb, var(--success-var) 20%, transparent); } /* Approximation des couleurs spécifiques */
|
| 116 |
+
.text-green-500 { color: #22c55e; } /* Laissez le vert spécifique pour le succès */
|
| 117 |
+
.border-green-900 { border-color: #064e3b; } /* Laissez le vert spécifique pour le succès */
|
| 118 |
+
.hover\:text-link-hover-var:hover { color: var(--secondary-var); } /* Ajout d'une pseudo-variable pour le hover de l'icône de thème (simple fallback) */
|
| 119 |
+
|
| 120 |
+
/* Nouveaux styles pour le statut de l'API */
|
| 121 |
+
.status-bar {
|
| 122 |
+
height: 1.5rem; /* 6px */
|
| 123 |
+
border-radius: 0.375rem; /* rounded-md */
|
| 124 |
+
transition: width 0.5s ease-out; /* Animation douce pour le changement de statut */
|
| 125 |
+
display: flex;
|
| 126 |
+
align-items: center;
|
| 127 |
+
padding-left: 0.75rem;
|
| 128 |
+
font-weight: 600;
|
| 129 |
+
color: white; /* Texte blanc par défaut pour la barre de statut */
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
/* Couleurs spécifiques pour le statut */
|
| 133 |
+
.status-green { background-color: #22c55e; } /* green-500 */
|
| 134 |
+
.status-yellow { background-color: #f59e0b; } /* amber-500 */
|
| 135 |
+
.status-red { background-color: #ef4444; } /* red-500 */
|
| 136 |
+
|
| 137 |
+
</style>
|
| 138 |
+
</head>
|
| 139 |
+
|
| 140 |
+
<body class="bg-page-var text-color-var min-h-screen transition-colors-theme">
|
| 141 |
+
|
| 142 |
+
<button id="theme-switch" class="theme-switch text-color-var hover:text-link-hover-var transition-colors-theme">
|
| 143 |
+
<span class="material-symbols-rounded">dark_mode</span>
|
| 144 |
+
</button>
|
| 145 |
+
|
| 146 |
+
<aside id="sidebar" class="sidebar w-64 bg-sidebar-var border-r border-sidebar-var p-6 flex flex-col lg:block transition-colors-theme">
|
| 147 |
+
|
| 148 |
+
<div class="flex items-center mb-6 shrink-0">
|
| 149 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="Nexus Pro Logo" class="h-8">
|
| 150 |
+
<span class="text-xl font-bold text-color-var ml-2 transition-colors-theme">Nexus Pro</span>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<div class="flex-grow overflow-y-auto pr-2" id="scrollable-nav-container">
|
| 154 |
+
<nav class="space-y-3 pb-4">
|
| 155 |
+
<a href="/mindus/nexus/dashboard" class="flex items-center p-3 text-secondary-var hover:text-color-var hover:bg-sidebar-active-var rounded-lg transition duration-150 transition-colors-theme">
|
| 156 |
+
<span class="material-symbols-rounded">dashboard</span>
|
| 157 |
+
<span class="ml-3">Dashboard</span>
|
| 158 |
+
</a>
|
| 159 |
+
<a href="/mindus/nexus/profile" class="flex items-center p-3 text-secondary-var hover:text-color-var hover:bg-sidebar-active-var rounded-lg transition duration-150 transition-colors-theme">
|
| 160 |
+
<span class="material-symbols-rounded">person</span>
|
| 161 |
+
<span class="ml-3">Profil</span>
|
| 162 |
+
</a>
|
| 163 |
+
<a href="/mindus/nexus/api_logs" class="flex items-center p-3 text-secondary-var hover:text-color-var hover:bg-sidebar-active-var rounded-lg transition duration-150 transition-colors-theme">
|
| 164 |
+
<span class="material-symbols-rounded">list_alt</span>
|
| 165 |
+
<span class="ml-3">Logs d'API</span>
|
| 166 |
+
</a>
|
| 167 |
+
<a href="/mindus/nexus/tarifs" class="flex items-center p-3 text-secondary-var hover:text-color-var hover:bg-sidebar-active-var rounded-lg transition duration-150 transition-colors-theme">
|
| 168 |
+
<span class="material-symbols-rounded">payments</span>
|
| 169 |
+
<span class="ml-3">Tarifs</span>
|
| 170 |
+
</a>
|
| 171 |
+
<a href="/mindus/nexus/statut" class="flex items-center p-3 bg-sidebar-active-var text-color-var rounded-lg transition duration-150 transition-colors-theme">
|
| 172 |
+
<span class="material-symbols-rounded">monitor_heart</span>
|
| 173 |
+
<span class="ml-3">Statut de l'API</span>
|
| 174 |
+
</a>
|
| 175 |
+
<a href="/mindus/nexus//" id="logout-button-sidebar" class="flex items-center p-3 text-red-500 hover:text-red-400 hover:bg-sidebar-active-var rounded-lg transition duration-150 transition-colors-theme">
|
| 176 |
+
<span class="material-symbols-rounded">logout</span>
|
| 177 |
+
<span class="ml-3">Déconnexion</span>
|
| 178 |
+
</a>
|
| 179 |
+
</nav>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
</aside>
|
| 185 |
+
|
| 186 |
+
<div id="main-content" class="main-content p-8 transition-colors-theme">
|
| 187 |
+
|
| 188 |
+
<header class="lg:hidden flex justify-between items-center mb-8">
|
| 189 |
+
<div class="flex items-center">
|
| 190 |
+
<img src="https://i.imgur.com/7Gn3toV.png" alt="Nexus Pro Logo" class="h-8">
|
| 191 |
+
<span class="text-xl font-bold text-color-var ml-2 transition-colors-theme">Nexus Pro</span>
|
| 192 |
+
</div>
|
| 193 |
+
<button id="sidebar-toggle" class="p-2 rounded-lg bg-sidebar-active-var hover:bg-sidebar-active-var/80 transition-colors-theme">
|
| 194 |
+
<span class="material-symbols-rounded text-color-var">menu</span>
|
| 195 |
+
</button>
|
| 196 |
+
</header>
|
| 197 |
+
|
| 198 |
+
<h1 class="text-3xl font-bold mb-8 text-color-var transition-colors-theme">Statut de l'API Nexus</h1>
|
| 199 |
+
|
| 200 |
+
{% with messages = get_flashed_messages(with_categories=true) %}
|
| 201 |
+
{% if messages %}
|
| 202 |
+
{% for category, message in messages %}
|
| 203 |
+
<div class="p-4 mb-4 text-sm rounded-lg border border-transparent
|
| 204 |
+
{{ 'bg-red-900/20 text-red-500 border-red-900' if category == 'error' or category == 'danger' or category == 'warning' else 'bg-green-900/20 text-green-500 border-green-900' }}" role="alert">
|
| 205 |
+
{{ message }}
|
| 206 |
+
</div>
|
| 207 |
+
{% endfor %}
|
| 208 |
+
{% endif %}
|
| 209 |
+
{% endwith %}
|
| 210 |
+
|
| 211 |
+
<div class="bg-card-var p-6 rounded-lg shadow-xl border border-sidebar-var transition-colors-theme mb-8">
|
| 212 |
+
<h2 class="text-xl font-semibold mb-4 flex items-center text-color-var transition-colors-theme">
|
| 213 |
+
<span class="material-symbols-rounded mr-2 text-primary-color-var">cloud_queue</span>
|
| 214 |
+
État Global du Service
|
| 215 |
+
</h2>
|
| 216 |
+
<div id="overall-status-display" class="p-4 rounded-lg text-lg font-bold text-white transition duration-300 shadow-md">
|
| 217 |
+
<p id="overall-status-text">Chargement du statut...</p>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<div class="bg-card-var p-6 rounded-lg shadow-xl border border-sidebar-var transition-colors-theme mb-8">
|
| 222 |
+
<h2 class="text-xl font-semibold mb-6 flex items-center text-color-var transition-colors-theme">
|
| 223 |
+
<span class="material-symbols-rounded mr-2 text-primary-color-var">bar_chart</span>
|
| 224 |
+
Statut des Composants API
|
| 225 |
+
</h2>
|
| 226 |
+
|
| 227 |
+
<div class="space-y-6">
|
| 228 |
+
|
| 229 |
+
<div class="flex flex-col md:flex-row items-start md:items-center justify-between border-b border-sidebar-var pb-4">
|
| 230 |
+
<span class="text-lg font-medium text-color-var w-full md:w-1/3 mb-2 md:mb-0 transition-colors-theme">Service d'Authentification</span>
|
| 231 |
+
<div class="w-full md:w-2/3">
|
| 232 |
+
<div id="auth-status-bar" data-status="{{ api_status.auth }}" class="status-bar" style="width: 100%;" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
|
| 233 |
+
{{ api_status.auth_display if api_status and api_status.auth_display else 'Chargement...' }}
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
|
| 238 |
+
<div class="flex flex-col md:flex-row items-start md:items-center justify-between border-b border-sidebar-var pb-4">
|
| 239 |
+
<span class="text-lg font-medium text-color-var w-full md:w-1/3 mb-2 md:mb-0 transition-colors-theme">Traitement des Données (Endpoints V1)</span>
|
| 240 |
+
<div class="w-full md:w-2/3">
|
| 241 |
+
<div id="data-status-bar" data-status="{{ api_status.data_v1 }}" class="status-bar" style="width: 100%;" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
|
| 242 |
+
{{ api_status.data_v1_display if api_status and api_status.data_v1_display else 'Chargement...' }}
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
|
| 247 |
+
<div class="flex flex-col md:flex-row items-start md:items-center justify-between">
|
| 248 |
+
<span class="text-lg font-medium text-color-var w-full md:w-1/3 mb-2 md:mb-0 transition-colors-theme">Base de Données Principale</span>
|
| 249 |
+
<div class="w-full md:w-2/3">
|
| 250 |
+
<div id="db-status-bar" data-status="{{ api_status.database }}" class="status-bar" style="width: 100%;" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
|
| 251 |
+
{{ api_status.database_display if api_status and api_status.database_display else 'Chargement...' }}
|
| 252 |
+
</div>
|
| 253 |
+
</div>
|
| 254 |
+
</div>
|
| 255 |
+
|
| 256 |
+
</div>
|
| 257 |
+
|
| 258 |
+
<p class="mt-8 text-sm text-secondary-var">Dernière mise à jour: <span id="last-updated">{{ api_status.last_updated if api_status and api_status.last_updated else 'N/A' }}</span></p>
|
| 259 |
+
|
| 260 |
+
</div>
|
| 261 |
+
|
| 262 |
+
<div class="bg-card-var p-6 rounded-lg shadow-xl border border-sidebar-var transition-colors-theme">
|
| 263 |
+
<h2 class="text-xl font-semibold mb-4 flex items-center text-color-var transition-colors-theme">
|
| 264 |
+
<span class="material-symbols-rounded mr-2 text-primary-color-var">history</span>
|
| 265 |
+
Historique des Incidents
|
| 266 |
+
</h2>
|
| 267 |
+
|
| 268 |
+
{% if incidents %}
|
| 269 |
+
<ul class="space-y-4">
|
| 270 |
+
{% for incident in incidents %}
|
| 271 |
+
<li class="border-l-4 p-4 rounded-r-lg shadow-sm
|
| 272 |
+
{% if incident.status == 'resolved' %} border-green-500 bg-green-900/20 text-green-500
|
| 273 |
+
{% elif incident.status == 'monitoring' %} border-yellow-500 bg-yellow-900/20 text-yellow-500
|
| 274 |
+
{% elif incident.status == 'investigating' %} border-red-500 bg-red-900/20 text-red-500
|
| 275 |
+
{% else %} border-secondary-var bg-input-var text-secondary-var
|
| 276 |
+
{% endif %}">
|
| 277 |
+
<p class="font-bold">{{ incident.title }} -
|
| 278 |
+
<span class="text-sm font-normal uppercase">[{{ incident.status_display }}]</span></p>
|
| 279 |
+
<p class="text-sm mt-1">{{ incident.description }}</p>
|
| 280 |
+
<p class="text-xs mt-2 opacity-75">Date: {{ incident.date }}</p>
|
| 281 |
+
</li>
|
| 282 |
+
{% endfor %}
|
| 283 |
+
</ul>
|
| 284 |
+
{% else %}
|
| 285 |
+
<p class="text-secondary-var italic">Aucun incident récent à signaler. Le service est stable.</p>
|
| 286 |
+
{% endif %}
|
| 287 |
+
|
| 288 |
+
</div>
|
| 289 |
+
|
| 290 |
+
</div>
|
| 291 |
+
|
| 292 |
+
<script>
|
| 293 |
+
|
| 294 |
+
// Fonction utilitaire pour appliquer le thème
|
| 295 |
+
function applyTheme(theme) {
|
| 296 |
+
if (theme === 'dark') {
|
| 297 |
+
document.documentElement.classList.add('dark');
|
| 298 |
+
localStorage.setItem('theme', 'dark');
|
| 299 |
+
} else {
|
| 300 |
+
document.documentElement.classList.remove('dark');
|
| 301 |
+
localStorage.setItem('theme', 'light');
|
| 302 |
+
}
|
| 303 |
+
// Mettre à jour l'icône du switch si nécessaire
|
| 304 |
+
const icon = document.querySelector('#theme-switch .material-symbols-rounded');
|
| 305 |
+
if (icon) {
|
| 306 |
+
// S'assurer que l'icône reflète le mode ACTIF
|
| 307 |
+
icon.textContent = theme === 'dark' ? 'light_mode' : 'dark_mode';
|
| 308 |
+
}
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
// 1. Initialisation du thème au chargement
|
| 312 |
+
// Récupérer le thème sauvé ou utiliser 'dark' comme défaut
|
| 313 |
+
const savedTheme = localStorage.getItem('theme') || 'dark';
|
| 314 |
+
applyTheme(savedTheme);
|
| 315 |
+
|
| 316 |
+
// 2. Logique du switch de thème
|
| 317 |
+
document.getElementById('theme-switch').addEventListener('click', () => {
|
| 318 |
+
// Vérifier si la classe 'dark' est présente sur l'élément racine
|
| 319 |
+
const currentTheme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
|
| 320 |
+
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
|
| 321 |
+
applyTheme(newTheme);
|
| 322 |
+
});
|
| 323 |
+
|
| 324 |
+
// 3. Logique de bascule de la sidebar pour mobile/tablette
|
| 325 |
+
const sidebarToggle = document.getElementById('sidebar-toggle');
|
| 326 |
+
const sidebar = document.getElementById('sidebar');
|
| 327 |
+
|
| 328 |
+
if (sidebarToggle && sidebar) {
|
| 329 |
+
sidebarToggle.addEventListener('click', () => {
|
| 330 |
+
sidebar.classList.toggle('open');
|
| 331 |
+
});
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
// 4. Fermeture de la sidebar lors du clic sur un lien (pour mobile)
|
| 335 |
+
if (sidebar) {
|
| 336 |
+
const sidebarLinks = sidebar.querySelectorAll('a');
|
| 337 |
+
if (sidebarLinks) {
|
| 338 |
+
sidebarLinks.forEach(link => {
|
| 339 |
+
link.addEventListener('click', () => {
|
| 340 |
+
// Fermer la sidebar uniquement sur les petits écrans
|
| 341 |
+
if (window.innerWidth < 1024) {
|
| 342 |
+
sidebar.classList.remove('open');
|
| 343 |
+
}
|
| 344 |
+
});
|
| 345 |
+
});
|
| 346 |
+
}
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// 5. Logique de Déconnexion (Conservée)
|
| 350 |
+
const logoutHandler = async (e) => {
|
| 351 |
+
e.preventDefault();
|
| 352 |
+
// La déconnexion est gérée par la route Flask directe
|
| 353 |
+
window.location.href = document.getElementById('logout-button-sidebar').href;
|
| 354 |
+
};
|
| 355 |
+
// On attache l'événement à la déconnexion dans la sidebar.
|
| 356 |
+
const logoutButtonSidebar = document.getElementById('logout-button-sidebar');
|
| 357 |
+
if (logoutButtonSidebar) {
|
| 358 |
+
logoutButtonSidebar.addEventListener('click', logoutHandler);
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
// 6. Logique de Mise à Jour du Statut de l'API (Simulée pour l'exemple)
|
| 362 |
+
function updateStatusBar(elementId, status) {
|
| 363 |
+
const bar = document.getElementById(elementId);
|
| 364 |
+
if (!bar) return;
|
| 365 |
+
|
| 366 |
+
// Réinitialiser les classes de couleur
|
| 367 |
+
bar.classList.remove('status-green', 'status-yellow', 'status-red');
|
| 368 |
+
|
| 369 |
+
let colorClass = 'status-green';
|
| 370 |
+
let statusText = 'Opérationnel';
|
| 371 |
+
|
| 372 |
+
// Le statut peut venir de Jinja (comme 'operational', 'degraded', 'outage')
|
| 373 |
+
switch (status) {
|
| 374 |
+
case 'operational':
|
| 375 |
+
colorClass = 'status-green';
|
| 376 |
+
statusText = 'Opérationnel';
|
| 377 |
+
bar.style.width = '100%';
|
| 378 |
+
break;
|
| 379 |
+
case 'degraded':
|
| 380 |
+
colorClass = 'status-yellow';
|
| 381 |
+
statusText = 'Performance Dégradée';
|
| 382 |
+
bar.style.width = '80%'; // Visuel de barre partielle
|
| 383 |
+
break;
|
| 384 |
+
case 'outage':
|
| 385 |
+
colorClass = 'status-red';
|
| 386 |
+
statusText = 'Panne Majeure';
|
| 387 |
+
bar.style.width = '20%'; // Visuel de barre presque vide
|
| 388 |
+
break;
|
| 389 |
+
default:
|
| 390 |
+
colorClass = 'bg-secondary-var';
|
| 391 |
+
statusText = 'Indisponible / Inconnu';
|
| 392 |
+
bar.style.width = '100%';
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
bar.classList.add(colorClass);
|
| 396 |
+
// S'assurer que le texte est à jour (seulement si non fourni par Jinja)
|
| 397 |
+
if (bar.textContent.trim() === 'Chargement...') {
|
| 398 |
+
bar.textContent = statusText;
|
| 399 |
+
}
|
| 400 |
+
bar.setAttribute('aria-valuenow', bar.style.width.replace('%', ''));
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
function updateOverallStatus(authStatus, dataStatus, dbStatus) {
|
| 404 |
+
const display = document.getElementById('overall-status-display');
|
| 405 |
+
const text = document.getElementById('overall-status-text');
|
| 406 |
+
if (!display || !text) return;
|
| 407 |
+
|
| 408 |
+
display.classList.remove('bg-green-500', 'bg-yellow-500', 'bg-red-500', 'bg-secondary-var');
|
| 409 |
+
|
| 410 |
+
// Logique de statut général
|
| 411 |
+
if (authStatus === 'outage' || dataStatus === 'outage' || dbStatus === 'outage') {
|
| 412 |
+
display.classList.add('bg-red-500');
|
| 413 |
+
text.textContent = 'PANNE MAJEURE - Nous enquêtons sur un problème.';
|
| 414 |
+
} else if (authStatus === 'degraded' || dataStatus === 'degraded' || dbStatus === 'degraded') {
|
| 415 |
+
display.classList.add('bg-yellow-500');
|
| 416 |
+
text.textContent = 'PERFORMANCE DÉGRADÉE - Certains services sont affectés.';
|
| 417 |
+
} else if (authStatus === 'operational' && dataStatus === 'operational' && dbStatus === 'operational') {
|
| 418 |
+
display.classList.add('bg-green-500');
|
| 419 |
+
text.textContent = 'TOUT EST OPÉRATIONNEL - L\'API fonctionne normalement.';
|
| 420 |
+
} else {
|
| 421 |
+
display.classList.add('bg-secondary-var');
|
| 422 |
+
text.textContent = 'Statut Indéterminé.';
|
| 423 |
+
}
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
// Fonction pour lire les statuts depuis les attributs de données (simulant le backend)
|
| 427 |
+
function initializeStatus() {
|
| 428 |
+
// Lecture des données Jinja2 pré-remplies (simulées)
|
| 429 |
+
const authStatus = document.getElementById('auth-status-bar').dataset.status || 'operational';
|
| 430 |
+
const dataStatus = document.getElementById('data-status-bar').dataset.status || 'operational';
|
| 431 |
+
const dbStatus = document.getElementById('db-status-bar').dataset.status || 'operational';
|
| 432 |
+
|
| 433 |
+
// Mise à jour visuelle
|
| 434 |
+
updateStatusBar('auth-status-bar', authStatus);
|
| 435 |
+
updateStatusBar('data-status-bar', dataStatus);
|
| 436 |
+
updateStatusBar('db-status-bar', dbStatus);
|
| 437 |
+
updateOverallStatus(authStatus, dataStatus, dbStatus);
|
| 438 |
+
|
| 439 |
+
// ** Simulation d'une mise à jour en temps réel (Animation) **
|
| 440 |
+
// Dans une application réelle, cette fonction appellerait une API / WebSocket.
|
| 441 |
+
// Pour l'exemple, nous allons animer les barres après le chargement initial.
|
| 442 |
+
|
| 443 |
+
setTimeout(() => {
|
| 444 |
+
// Le backend peut ajuster la largeur pour montrer la "santé" (par exemple, 90% pour opé)
|
| 445 |
+
// Ici, nous utilisons juste les couleurs/texte basés sur le statut simple (operational/degraded/outage)
|
| 446 |
+
document.getElementById('auth-status-bar').style.width = authStatus === 'operational' ? '100%' : (authStatus === 'degraded' ? '80%' : '20%');
|
| 447 |
+
document.getElementById('data-status-bar').style.width = dataStatus === 'operational' ? '100%' : (dataStatus === 'degraded' ? '80%' : '20%');
|
| 448 |
+
document.getElementById('db-status-bar').style.width = dbStatus === 'operational' ? '100%' : (dbStatus === 'degraded' ? '80%' : '20%');
|
| 449 |
+
}, 100); // Petite pause pour l'effet de chargement initial.
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
// 7. Initialisation du statut au chargement de la page
|
| 453 |
+
document.addEventListener('DOMContentLoaded', initializeStatus);
|
| 454 |
+
|
| 455 |
+
</script>
|
| 456 |
+
</body>
|
| 457 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/support.html
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Support & Contact - GitForge</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet"
|
| 9 |
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 10 |
+
<style>
|
| 11 |
+
body { font-family: 'Inter', sans-serif; }
|
| 12 |
+
|
| 13 |
+
/* Étape 2 : Définir les Variables de Thème (SOMBRE par défaut) */
|
| 14 |
+
:root {
|
| 15 |
+
/* Couleurs SOMBRE (Noir très foncé pour le fond) */
|
| 16 |
+
--bg-darker: #0A0A0A; /* Très foncé pour la barre ou le footer */
|
| 17 |
+
--bg-default: #121212; /* Fond général */
|
| 18 |
+
--bg-form: #1F1F1F; /* Fond des blocs de contenu */
|
| 19 |
+
--text-color: #E3E3E3;
|
| 20 |
+
--input-bg: #2C2C2C;
|
| 21 |
+
--input-border: #2C2C2C;
|
| 22 |
+
--header-border: #333333; /* Bordure plus discrète */
|
| 23 |
+
--blue-500: #3B82F6; /* Couleur primaire pour rester visible */
|
| 24 |
+
--blue-600: #2563EB;
|
| 25 |
+
--blue-700: #1D4ED8;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
/* Mode CLAIR */
|
| 29 |
+
html.light {
|
| 30 |
+
/* Couleurs CLAIR */
|
| 31 |
+
--bg-darker: #FFFFFF;
|
| 32 |
+
--bg-default: #F7F7F7;
|
| 33 |
+
--bg-form: #FFFFFF;
|
| 34 |
+
--text-color: #333333;
|
| 35 |
+
--input-bg: #EAEAEA;
|
| 36 |
+
--input-border: #D1D5DB;
|
| 37 |
+
--header-border: #E5E7EB;
|
| 38 |
+
--blue-500: #1D4ED8;
|
| 39 |
+
--blue-600: #2563EB;
|
| 40 |
+
--blue-700: #1D4ED8;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
/* Appliquer les variables et transitions */
|
| 44 |
+
body {
|
| 45 |
+
background-color: var(--bg-default) !important;
|
| 46 |
+
color: var(--text-color) !important;
|
| 47 |
+
transition: background-color 0.3s, color 0.3s;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/* Réinitialiser les classes Tailwind par défaut pour utiliser les variables */
|
| 51 |
+
.bg-gray-900 { background-color: var(--bg-default) !important; }
|
| 52 |
+
.bg-gray-800 { background-color: var(--bg-form) !important; }
|
| 53 |
+
.bg-gray-700 { background-color: var(--input-bg) !important; }
|
| 54 |
+
.text-white { color: var(--text-color) !important; }
|
| 55 |
+
.text-gray-300 { color: var(--text-color) !important; }
|
| 56 |
+
.text-gray-400 { color: #A0A0A0 !important; } /* Garder gris pour les textes secondaires */
|
| 57 |
+
.text-gray-500 { color: #888888 !important; }
|
| 58 |
+
|
| 59 |
+
.border-gray-700 { border-color: var(--header-border) !important; }
|
| 60 |
+
.border-blue-500\/50 { border-color: color-mix(in srgb, var(--blue-500) 50%, transparent) !important; }
|
| 61 |
+
.text-blue-500 { color: var(--blue-500) !important; }
|
| 62 |
+
|
| 63 |
+
.bg-blue-600 { background-color: var(--blue-600) !important; }
|
| 64 |
+
.hover\:bg-blue-700:hover { background-color: var(--blue-700) !important; }
|
| 65 |
+
.hover\:text-blue-500:hover { color: var(--blue-500) !important; }
|
| 66 |
+
.border-blue-600 { border-color: var(--blue-600) !important; }
|
| 67 |
+
|
| 68 |
+
/* Style du bouton de thème */
|
| 69 |
+
#theme-toggle {
|
| 70 |
+
background: none;
|
| 71 |
+
border: none;
|
| 72 |
+
cursor: pointer;
|
| 73 |
+
color: var(--text-color);
|
| 74 |
+
font-size: 24px;
|
| 75 |
+
transition: color 0.2s;
|
| 76 |
+
margin-right: 16px; /* Espace à droite du bouton */
|
| 77 |
+
}
|
| 78 |
+
</style>
|
| 79 |
+
</head>
|
| 80 |
+
<body class="bg-gray-900 text-white min-h-screen">
|
| 81 |
+
|
| 82 |
+
<div class="container mx-auto p-4 sm:p-6 lg:p-8">
|
| 83 |
+
|
| 84 |
+
<header class="flex flex-col sm:flex-row justify-between items-center py-4 border-b border-blue-500/50 mb-8
|
| 85 |
+
bg-[var(--bg-default)] sticky top-0 z-50 transition duration-300 shadow-xl shadow-black/20">
|
| 86 |
+
<h1 class="text-4xl font-extrabold text-blue-500 tracking-wider mb-4 sm:mb-0">
|
| 87 |
+
Support & Contact
|
| 88 |
+
</h1>
|
| 89 |
+
<nav class="flex items-center space-x-4">
|
| 90 |
+
<button id="theme-toggle" aria-label="Basculer le thème">
|
| 91 |
+
<span class="material-symbols-rounded">light_mode</span>
|
| 92 |
+
</button>
|
| 93 |
+
<a href="/" class="px-4 py-2 text-white hover:text-blue-300 transition duration-200 font-medium">
|
| 94 |
+
Accueil
|
| 95 |
+
</a>
|
| 96 |
+
{% if is_logged_in %}
|
| 97 |
+
<a href="/mindus/nexus/dashboard" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg transition duration-200 font-medium">
|
| 98 |
+
Dashboard
|
| 99 |
+
</a>
|
| 100 |
+
{% else %}
|
| 101 |
+
<a href="/mindus/nexus/connexion" class="px-4 py-2 border-2 border-blue-600 text-blue-600 rounded-lg hover:bg-blue-600 hover:text-white font-medium transition duration-200">
|
| 102 |
+
Connexion
|
| 103 |
+
</a>
|
| 104 |
+
{% endif %}
|
| 105 |
+
</nav>
|
| 106 |
+
</header>
|
| 107 |
+
|
| 108 |
+
<main class="space-y-10 max-w-2xl mx-auto">
|
| 109 |
+
|
| 110 |
+
<div class="p-8 bg-gray-800 rounded-xl shadow-2xl border-l-4 border-blue-500">
|
| 111 |
+
|
| 112 |
+
{% if is_logged_in %}
|
| 113 |
+
<h2 class="text-3xl font-bold text-blue-500 mb-4">Envoyer une Requête (Connecté)</h2>
|
| 114 |
+
<p class="text-gray-300 mb-6">
|
| 115 |
+
Votre ID utilisateur ({{ user_id }}) sera automatiquement attaché à votre ticket, garantissant un traitement plus rapide.
|
| 116 |
+
</p>
|
| 117 |
+
{% else %}
|
| 118 |
+
<h2 class="text-3xl font-bold text-blue-500 mb-4">Contactez notre Équipe</h2>
|
| 119 |
+
<p class="text-gray-300 mb-6">
|
| 120 |
+
Veuillez vous connecter pour un support prioritaire.
|
| 121 |
+
</p>
|
| 122 |
+
{% endif %}
|
| 123 |
+
|
| 124 |
+
<form id="supportForm" class="space-y-6">
|
| 125 |
+
<div>
|
| 126 |
+
<label for="subject" class="block text-sm font-medium text-gray-300 mb-1">Sujet de la Requête</label>
|
| 127 |
+
<input type="text" id="subject" name="subject" required
|
| 128 |
+
class="w-full px-4 py-3 bg-gray-700 text-white border-2 border-gray-700 rounded-lg focus:border-blue-500 transition duration-200"
|
| 129 |
+
placeholder="Problème de connexion, Question de facturation...">
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<div>
|
| 133 |
+
<label for="email" class="block text-sm font-medium text-gray-300 mb-1">Votre E-mail</label>
|
| 134 |
+
<input type="email" id="email" name="email" required
|
| 135 |
+
class="w-full px-4 py-3 bg-gray-700 text-white border-2 border-gray-700 rounded-lg focus:border-blue-500 transition duration-200"
|
| 136 |
+
placeholder="votre.email@exemple.com"
|
| 137 |
+
value="{% if is_logged_in %}L'email serait ici (via API){% endif %}">
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<div>
|
| 141 |
+
<label for="message" class="block text-sm font-medium text-gray-300 mb-1">Message</label>
|
| 142 |
+
<textarea id="message" name="message" rows="5" required
|
| 143 |
+
class="w-full px-4 py-3 bg-gray-700 text-white border-2 border-gray-700 rounded-lg focus:border-blue-500 transition duration-200"
|
| 144 |
+
placeholder="Décrivez votre problème ou votre question en détail."></textarea>
|
| 145 |
+
</div>
|
| 146 |
+
|
| 147 |
+
<div id="messageBoxSupport" class="text-sm p-3 rounded-lg hidden" role="alert"></div>
|
| 148 |
+
|
| 149 |
+
<button type="submit"
|
| 150 |
+
class="w-full py-3 bg-blue-600 hover:bg-blue-700 text-white font-semibold rounded-lg transition duration-300 shadow-lg">
|
| 151 |
+
Envoyer le Message
|
| 152 |
+
</button>
|
| 153 |
+
</form>
|
| 154 |
+
</div>
|
| 155 |
+
</main>
|
| 156 |
+
|
| 157 |
+
<footer class="mt-12 pt-6 border-t border-gray-700 text-center text-gray-500 text-sm">
|
| 158 |
+
© 2025 GitForge. Tous droits réservés.
|
| 159 |
+
</footer>
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
<script>
|
| 163 |
+
// Logique de bascule du mode sombre/clair (Étape 3)
|
| 164 |
+
const themeToggle = document.getElementById('theme-toggle');
|
| 165 |
+
const htmlElement = document.documentElement;
|
| 166 |
+
const iconElement = themeToggle.querySelector('.material-symbols-rounded');
|
| 167 |
+
|
| 168 |
+
// Charger le thème depuis le localStorage
|
| 169 |
+
const savedTheme = localStorage.getItem('theme');
|
| 170 |
+
if (savedTheme === 'light') {
|
| 171 |
+
htmlElement.classList.add('light');
|
| 172 |
+
iconElement.textContent = 'dark_mode'; // Afficher l'icône "Sombre" en mode clair
|
| 173 |
+
} else {
|
| 174 |
+
// Default is 'dark' (or first visit)
|
| 175 |
+
iconElement.textContent = 'light_mode'; // Afficher l'icône "Clair" en mode sombre
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
themeToggle.addEventListener('click', () => {
|
| 179 |
+
if (htmlElement.classList.contains('light')) {
|
| 180 |
+
// Passage du mode Clair au mode Sombre
|
| 181 |
+
htmlElement.classList.remove('light');
|
| 182 |
+
localStorage.setItem('theme', 'dark');
|
| 183 |
+
iconElement.textContent = 'light_mode';
|
| 184 |
+
} else {
|
| 185 |
+
// Passage du mode Sombre au mode Clair
|
| 186 |
+
htmlElement.classList.add('light');
|
| 187 |
+
localStorage.setItem('theme', 'light');
|
| 188 |
+
iconElement.textContent = 'dark_mode';
|
| 189 |
+
}
|
| 190 |
+
});
|
| 191 |
+
|
| 192 |
+
// Logique du formulaire de support (existante)
|
| 193 |
+
document.getElementById('supportForm').addEventListener('submit', async (event) => {
|
| 194 |
+
event.preventDefault();
|
| 195 |
+
|
| 196 |
+
const subject = document.getElementById('subject').value;
|
| 197 |
+
const email = document.getElementById('email').value;
|
| 198 |
+
const message = document.getElementById('message').value;
|
| 199 |
+
const messageBox = document.getElementById('messageBoxSupport');
|
| 200 |
+
messageBox.classList.add('hidden');
|
| 201 |
+
messageBox.textContent = '';
|
| 202 |
+
|
| 203 |
+
const formData = {
|
| 204 |
+
subject,
|
| 205 |
+
email,
|
| 206 |
+
message,
|
| 207 |
+
{% if is_logged_in %}
|
| 208 |
+
user_id: "{{ user_id }}" // Ajout automatique de l'ID si connecté
|
| 209 |
+
{% else %}
|
| 210 |
+
user_id: null
|
| 211 |
+
{% endif %}
|
| 212 |
+
};
|
| 213 |
+
|
| 214 |
+
try {
|
| 215 |
+
// Utiliser la route proxy Flask pour contacter l'API Nexus
|
| 216 |
+
const response = await fetch('/api/support', {
|
| 217 |
+
method: 'POST',
|
| 218 |
+
headers: { 'Content-Type': 'application/json' },
|
| 219 |
+
body: JSON.stringify(formData)
|
| 220 |
+
});
|
| 221 |
+
|
| 222 |
+
// Simuler la réponse, car la route /api/support est un placeholder dans app.py
|
| 223 |
+
const data = await response.json();
|
| 224 |
+
|
| 225 |
+
// Si la route /api/support n'est qu'un proxy sans réponse complète, on simule:
|
| 226 |
+
if (response.ok) {
|
| 227 |
+
messageBox.classList.remove('bg-red-900/50', 'text-red-300');
|
| 228 |
+
messageBox.classList.add('bg-green-900/50', 'text-green-300');
|
| 229 |
+
messageBox.textContent = "Votre requête a été envoyée avec succès ! (Simulé pour l'API Nexus)";
|
| 230 |
+
document.getElementById('supportForm').reset();
|
| 231 |
+
} else {
|
| 232 |
+
messageBox.classList.remove('bg-green-900/50', 'text-green-300');
|
| 233 |
+
messageBox.classList.add('bg-red-900/50', 'text-red-300');
|
| 234 |
+
messageBox.textContent = data.message || "Erreur lors de l'envoi. Veuillez réessayer.";
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
messageBox.classList.remove('hidden');
|
| 238 |
+
|
| 239 |
+
} catch (error) {
|
| 240 |
+
console.error('Erreur réseau ou du serveur Flask:', error);
|
| 241 |
+
messageBox.classList.remove('bg-green-900/50', 'text-green-300');
|
| 242 |
+
messageBox.classList.add('bg-red-900/50', 'text-red-300');
|
| 243 |
+
messageBox.textContent = "Impossible de contacter le serveur. Veuillez réessayer.";
|
| 244 |
+
messageBox.classList.remove('hidden');
|
| 245 |
+
}
|
| 246 |
+
});
|
| 247 |
+
</script>
|
| 248 |
+
|
| 249 |
+
<footer class="mt-16 border-t border-gray-700 bg-gray-900">
|
| 250 |
+
<div class="container mx-auto p-4 sm:p-6 lg:p-8 max-w-7xl">
|
| 251 |
+
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 text-sm">
|
| 252 |
+
|
| 253 |
+
<div class="col-span-2 lg:col-span-1">
|
| 254 |
+
<a href="/" class="text-3xl font-extrabold text-blue-500 tracking-wider">NEXUS</a>
|
| 255 |
+
<p class="mt-3 text-gray-400">
|
| 256 |
+
L'infrastructure API qui propulse votre avenir technologique.
|
| 257 |
+
</p>
|
| 258 |
+
<div class="mt-4 flex space-x-4">
|
| 259 |
+
<a href="#" class="text-gray-400 hover:text-blue-500 transition duration-200">
|
| 260 |
+
<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>
|
| 261 |
+
</a>
|
| 262 |
+
</div>
|
| 263 |
+
</div>
|
| 264 |
+
|
| 265 |
+
<div>
|
| 266 |
+
<h3 class="text-lg font-semibold text-white mb-4">Plateforme</h3>
|
| 267 |
+
<ul class="space-y-3 text-gray-400">
|
| 268 |
+
<li><a href="/mindus/nexus/tarifs" class="hover:text-blue-500 transition duration-200">Tarifs</a></li>
|
| 269 |
+
<li><a href="/mindus/nexus/documentation" class="hover:text-blue-500 transition duration-200">Documentation</a></li>
|
| 270 |
+
<li><a href="/mindus/nexus/connexion" class="hover:text-blue-500 transition duration-200">Connexion</a></li>
|
| 271 |
+
<li><a href="/mindus/nexus/support" class="hover:text-blue-500 transition duration-200">Support</a></li>
|
| 272 |
+
</ul>
|
| 273 |
+
</div>
|
| 274 |
+
|
| 275 |
+
<div>
|
| 276 |
+
<h3 class="text-lg font-semibold text-white mb-4">Légal</h3>
|
| 277 |
+
<ul class="space-y-3 text-gray-400">
|
| 278 |
+
<li><a href="/mindus/nexus/politique-confidentialite" class="hover:text-blue-500 transition duration-200">Politique de Confidentialité</a></li>
|
| 279 |
+
<li><a href="/mindus/nexus/mentions-legales" class="hover:text-blue-500 transition duration-200">Mentions Légales</a></li>
|
| 280 |
+
<li><a href="/mindus/nexus/conditions-utilisation" class="hover:text-blue-500 transition duration-200">Conditions d'Utilisation</a></li>
|
| 281 |
+
<li><a href="/mindus/nexus/a-propos" class="hover:text-blue-500 transition duration-200">À Propos</a></li>
|
| 282 |
+
</ul>
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<div class="col-span-2 md:col-span-1">
|
| 286 |
+
<h3 class="text-lg font-semibold text-white mb-4">Ressources</h3>
|
| 287 |
+
<ul class="space-y-3 text-gray-400">
|
| 288 |
+
<li><a href="mailto:support@nexus.com" class="hover:text-blue-500 transition duration-200">Contact Email</a></li>
|
| 289 |
+
<li><a href="/mindus/nexus/dashboard" class="hover:text-blue-500 transition duration-200">Espace Client</a></li>
|
| 290 |
+
<li><a href="/mindus/nexus/api-logs" class="hover:text-blue-500 transition duration-200">Statut API</a></li>
|
| 291 |
+
</ul>
|
| 292 |
+
</div>
|
| 293 |
+
|
| 294 |
+
</div>
|
| 295 |
+
|
| 296 |
+
<div class="mt-10 pt-6 border-t border-gray-800 text-center text-gray-500 text-sm">
|
| 297 |
+
© 2025 GitForge. Tous droits réservés. Construit pour l'ère des microservices.
|
| 298 |
+
</div>
|
| 299 |
+
</div>
|
| 300 |
+
</footer>
|
| 301 |
+
|
| 302 |
+
</body>
|
| 303 |
+
</html>
|
a6ea61c8-951a-413a-ba9d-7365d83fbd4d/github/templates/tarifs.html
ADDED
|
@@ -0,0 +1,826 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title data-translate="page-title">GitForge Pricing</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.png">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
| 10 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0" />
|
| 11 |
+
<style>
|
| 12 |
+
/* Custom Tailwind Configuration */
|
| 13 |
+
.bg-header { background-color: #f7f9fc; }
|
| 14 |
+
.header-border { border-color: #e5e7eb; }
|
| 15 |
+
.text-blue-600-var { color: #2563eb; }
|
| 16 |
+
.border-blue-600-var { border-color: #2563eb; }
|
| 17 |
+
.bg-blue-600-var { background-color: #2563eb; }
|
| 18 |
+
.hover\:bg-blue-700-var:hover { background-color: #1d4ed8; }
|
| 19 |
+
.text-gray-900-var { color: #1f2937; }
|
| 20 |
+
|
| 21 |
+
/* Ensure the language dropdown is visible */
|
| 22 |
+
.lang-dropdown-container {
|
| 23 |
+
position: relative;
|
| 24 |
+
}
|
| 25 |
+
.lang-menu-dropdown {
|
| 26 |
+
position: absolute;
|
| 27 |
+
left: 0;
|
| 28 |
+
bottom: 100%;
|
| 29 |
+
margin-bottom: 0.5rem;
|
| 30 |
+
width: 10rem;
|
| 31 |
+
background-color: #ffffff;
|
| 32 |
+
border-radius: 0.375rem;
|
| 33 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 34 |
+
z-index: 50;
|
| 35 |
+
border: 1px solid #e5e7eb;
|
| 36 |
+
display: none;
|
| 37 |
+
}
|
| 38 |
+
.lang-menu-dropdown a {
|
| 39 |
+
color: #1f2937;
|
| 40 |
+
}
|
| 41 |
+
.lang-menu-dropdown a:hover {
|
| 42 |
+
background-color: #f3f4f6;
|
| 43 |
+
color: #2563eb;
|
| 44 |
+
}
|
| 45 |
+
/* Custom style adjustments for the footer text to look good on a light background */
|
| 46 |
+
footer .text-white { color: #1f2937 !important; }
|
| 47 |
+
footer .text-gray-400 { color: #6b7280 !important; }
|
| 48 |
+
footer .border-t.border-[#4b5563] { border-color: #e5e7eb !important; }
|
| 49 |
+
footer .text-gray-500 { color: #6b7280 !important; }
|
| 50 |
+
|
| 51 |
+
/* Enterprise Card Specific Styling */
|
| 52 |
+
.enterprise-card-header {
|
| 53 |
+
border-top-left-radius: 0.5rem;
|
| 54 |
+
border-top-right-radius: 0.5rem;
|
| 55 |
+
height: 8px;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
/* Accordion-like behavior for features */
|
| 59 |
+
.feature-list-item {
|
| 60 |
+
cursor: pointer;
|
| 61 |
+
transition: all 0.2s ease-in-out;
|
| 62 |
+
}
|
| 63 |
+
.feature-details {
|
| 64 |
+
max-height: 0;
|
| 65 |
+
overflow: hidden;
|
| 66 |
+
opacity: 0;
|
| 67 |
+
transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.4s ease-in-out;
|
| 68 |
+
}
|
| 69 |
+
.feature-details.open {
|
| 70 |
+
max-height: 100px; /* Adjust as needed for content, or use JS to calculate */
|
| 71 |
+
opacity: 1;
|
| 72 |
+
margin-top: 0.5rem;
|
| 73 |
+
}
|
| 74 |
+
.feature-list-item i.fa-check {
|
| 75 |
+
transition: transform 0.2s ease-in-out;
|
| 76 |
+
}
|
| 77 |
+
.feature-list-item.open i.fa-check {
|
| 78 |
+
transform: rotate(45deg); /* Simple visual change on open */
|
| 79 |
+
}
|
| 80 |
+
.text-feature-title {
|
| 81 |
+
font-weight: 600; /* Semi-bold for the main feature text */
|
| 82 |
+
}
|
| 83 |
+
.text-feature-details {
|
| 84 |
+
font-weight: 400; /* Normal weight for the details */
|
| 85 |
+
}
|
| 86 |
+
</style>
|
| 87 |
+
</head>
|
| 88 |
+
<body class="bg-white text-gray-900 font-sans">
|
| 89 |
+
|
| 90 |
+
<header class="border-b border-gray-200">
|
| 91 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
|
| 92 |
+
<div class="flex items-center space-x-8">
|
| 93 |
+
<a href="#" class="text-2xl font-bold text-gray-900 flex items-center">
|
| 94 |
+
<img src="https://i.postimg.cc/t4NCGNzD/gitforge-png.png" alt="GitForge Logo" class="h-6 w-6 mr-2">
|
| 95 |
+
<span data-translate="site-name">GitForge</span>
|
| 96 |
+
</a>
|
| 97 |
+
<nav class="hidden md:flex space-x-6 text-sm font-medium text-gray-700">
|
| 98 |
+
<a href="/mindus/nexus/conditions_utilisation" class="hover:text-blue-600-var" data-translate="nav-platform">Platform</a>
|
| 99 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-solutions">Company</a>
|
| 100 |
+
<a href="#" class="hover:text-blue-600-var" data-translate="nav-resources">Resources</a>
|
| 101 |
+
<a href="/mindus/nexus/contact" class="hover:text-blue-600-var" data-translate="nav-opensource">Contact us</a>
|
| 102 |
+
<a href="/mindus/nexus/a_propos" class="hover:text-blue-600-var" data-translate="nav-enterprise">Enterprise</a>
|
| 103 |
+
<a href="/mindus/nexus/tarifs" class="hover:text-blue-600-var text-blue-600-var" data-translate="nav-pricing">Pricing</a>
|
| 104 |
+
</nav>
|
| 105 |
+
</div>
|
| 106 |
+
<div class="flex items-center space-x-4">
|
| 107 |
+
<button class="text-gray-700 hover:text-blue-600-var" aria-label="Search">
|
| 108 |
+
<i class="fas fa-search"></i>
|
| 109 |
+
</button>
|
| 110 |
+
<a href="/mindus/nexus/connexion" class="hidden sm:inline text-sm font-medium text-gray-700 hover:text-blue-600-var" data-translate="btn-sign-in">Sign in</a>
|
| 111 |
+
<a href="/mindus/nexus/inscription" class="px-4 py-2 text-sm font-medium border border-gray-300 rounded-md text-gray-700 hover:border-blue-600-var hover:text-blue-600-var transition" data-translate="btn-sign-up">Sign up</a>
|
| 112 |
+
</div>
|
| 113 |
+
</div>
|
| 114 |
+
</header>
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
<main class="py-16 md:py-24">
|
| 119 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 text-center">
|
| 120 |
+
<h1 class="text-5xl md:text-6xl font-extrabold text-gray-900-var mb-6 max-w-4xl mx-auto" data-translate="title-slogan">The unified DevOps platform, powered by AI.</h1>
|
| 121 |
+
<p class="text-xl text-gray-600 mb-12 max-w-3xl mx-auto" data-translate="subtitle-trial">Accelerate your software lifecycle with GitForge. We've packed GitForge Enterprise, Copilot, and Advanced Security into a single risk-free trial.</p>
|
| 122 |
+
<a href="#" class="inline-block bg-gray-800 hover:bg-gray-900 text-white font-medium py-3 px-8 rounded-md transition duration-300 text-lg" data-translate="btn-start-trial">Start free for 30 days</a>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 mt-16 md:mt-20">
|
| 126 |
+
<div class="flex flex-col lg:flex-row justify-center space-y-8 lg:space-y-0 lg:space-x-8">
|
| 127 |
+
|
| 128 |
+
<div class="w-full lg:w-1/3 bg-white border border-gray-200 rounded-lg shadow-md flex flex-col transition duration-300 hover:shadow-xl">
|
| 129 |
+
<div class="p-8 flex-grow">
|
| 130 |
+
<h2 class="text-xl font-bold text-gray-900-var mb-4" data-translate="plan-free-title">Free</h2>
|
| 131 |
+
<p class="text-sm text-gray-600 mb-6" data-translate="plan-free-subtitle">The basics for individuals and organizations</p>
|
| 132 |
+
<p class="text-4xl font-bold text-gray-900-var mb-2">$0 <span class="text-lg font-normal text-gray-500" data-translate="per-user-month">per user/month</span></p>
|
| 133 |
+
<button class="w-full py-3 mt-4 text-sm font-semibold text-blue-600-var border border-blue-600-var rounded-md hover:bg-blue-50 transition duration-200" data-translate="btn-join-free">Join for free</button>
|
| 134 |
+
|
| 135 |
+
<ul class="space-y-4 mt-8 text-gray-700">
|
| 136 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-free-1">
|
| 137 |
+
<div class="flex items-start w-full">
|
| 138 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 139 |
+
<span class="text-feature-title" data-translate="feature-free-1">Unlimited public/private repositories</span>
|
| 140 |
+
</div>
|
| 141 |
+
<div class="feature-details w-full pl-6">
|
| 142 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-free-1-details">No hidden costs, create as many as you need.</p>
|
| 143 |
+
</div>
|
| 144 |
+
</li>
|
| 145 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-free-2">
|
| 146 |
+
<div class="flex items-start w-full">
|
| 147 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 148 |
+
<span class="text-feature-title" data-translate="feature-free-2">Dependabot security and version updates</span>
|
| 149 |
+
</div>
|
| 150 |
+
<div class="feature-details w-full pl-6">
|
| 151 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-free-2-details">Automated dependency scanning and patching.</p>
|
| 152 |
+
</div>
|
| 153 |
+
</li>
|
| 154 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-free-3">
|
| 155 |
+
<div class="flex items-start w-full">
|
| 156 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 157 |
+
<span class="text-feature-title" data-translate="feature-free-3">2,000 CI/CD minutes/month</span>
|
| 158 |
+
</div>
|
| 159 |
+
<div class="feature-details w-full pl-6">
|
| 160 |
+
<span class="text-xs text-gray-500 block text-feature-details" data-translate="feature-free-3-sub">Free for public repositories</span>
|
| 161 |
+
</div>
|
| 162 |
+
</li>
|
| 163 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-free-4">
|
| 164 |
+
<div class="flex items-start w-full">
|
| 165 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 166 |
+
<span class="text-feature-title" data-translate="feature-free-4">1 GB of Packages storage</span>
|
| 167 |
+
</div>
|
| 168 |
+
<div class="feature-details w-full pl-6">
|
| 169 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-free-4-details">Store your Docker, npm, Maven, and more.</p>
|
| 170 |
+
</div>
|
| 171 |
+
</li>
|
| 172 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-free-5">
|
| 173 |
+
<div class="flex items-start w-full">
|
| 174 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 175 |
+
<span class="text-feature-title" data-translate="feature-free-5">Issues & Projects</span>
|
| 176 |
+
</div>
|
| 177 |
+
<div class="feature-details w-full pl-6">
|
| 178 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-free-5-details">Track work, manage tasks, and coordinate with your team.</p>
|
| 179 |
+
</div>
|
| 180 |
+
</li>
|
| 181 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-free-6">
|
| 182 |
+
<div class="flex items-start w-full">
|
| 183 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 184 |
+
<span class="text-feature-title" data-translate="feature-free-6">Community support</span>
|
| 185 |
+
</div>
|
| 186 |
+
<div class="feature-details w-full pl-6">
|
| 187 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-free-6-details">Access to forums and documentation.</p>
|
| 188 |
+
</div>
|
| 189 |
+
</li>
|
| 190 |
+
</ul>
|
| 191 |
+
</div>
|
| 192 |
+
<div class="p-8 border-t border-gray-200 bg-gray-50 rounded-b-lg">
|
| 193 |
+
<h3 class="font-bold text-gray-900-var mb-4" data-translate="addons-title">FEATURED ADD-ONS</h3>
|
| 194 |
+
<ul class="space-y-2 text-gray-700">
|
| 195 |
+
<li class="flex items-center">
|
| 196 |
+
<i class="fas fa-code text-gray-500 mr-2 text-sm"></i>
|
| 197 |
+
<span data-translate="addon-copilot">GitForge Copilot Access</span>
|
| 198 |
+
</li>
|
| 199 |
+
<li class="flex items-center">
|
| 200 |
+
<i class="fas fa-terminal text-gray-500 mr-2 text-sm"></i>
|
| 201 |
+
<span data-translate="addon-codespaces">GitForge Codespaces Access</span>
|
| 202 |
+
</li>
|
| 203 |
+
</ul>
|
| 204 |
+
</div>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<div class="w-full lg:w-1/3 bg-white border border-gray-200 rounded-lg shadow-md flex flex-col transition duration-300 hover:shadow-xl">
|
| 208 |
+
<div class="p-8 flex-grow">
|
| 209 |
+
<h2 class="text-xl font-bold text-gray-900-var mb-4" data-translate="plan-team-title">Team</h2>
|
| 210 |
+
<p class="text-sm text-gray-600 mb-6" data-translate="plan-team-subtitle">Advanced collaboration for individuals and organizations</p>
|
| 211 |
+
<p class="text-4xl font-bold text-gray-900-var mb-2">$4 <span class="text-lg font-normal text-gray-500" data-translate="per-user-month">per user/month</span></p>
|
| 212 |
+
<button class="w-full py-3 mt-4 text-sm font-semibold text-white bg-gray-800 rounded-md hover:bg-gray-900 transition duration-200" data-translate="btn-continue-team">Continue with Team</button>
|
| 213 |
+
|
| 214 |
+
<ul class="space-y-4 mt-8 text-gray-700">
|
| 215 |
+
<li class="flex items-start">
|
| 216 |
+
<i class="fas fa-arrow-left text-gray-500 mt-1 mr-2 text-sm"></i>
|
| 217 |
+
<span data-translate="feature-team-1">Everything included in Free, plus...</span>
|
| 218 |
+
</li>
|
| 219 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-2">
|
| 220 |
+
<div class="flex items-start w-full">
|
| 221 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 222 |
+
<span class="text-feature-title" data-translate="feature-team-2">Access to GitForge Codespaces</span>
|
| 223 |
+
</div>
|
| 224 |
+
<div class="feature-details w-full pl-6">
|
| 225 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-2-details">Cloud-based development environments on demand.</p>
|
| 226 |
+
</div>
|
| 227 |
+
</li>
|
| 228 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-3">
|
| 229 |
+
<div class="flex items-start w-full">
|
| 230 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 231 |
+
<span class="text-feature-title" data-translate="feature-team-3">Repository rules</span>
|
| 232 |
+
</div>
|
| 233 |
+
<div class="feature-details w-full pl-6">
|
| 234 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-3-details">Enforce standards across your code bases.</p>
|
| 235 |
+
</div>
|
| 236 |
+
</li>
|
| 237 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-4">
|
| 238 |
+
<div class="flex items-start w-full">
|
| 239 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 240 |
+
<span class="text-feature-title" data-translate="feature-team-4">Multiple reviewers in pull requests</span>
|
| 241 |
+
</div>
|
| 242 |
+
<div class="feature-details w-full pl-6">
|
| 243 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-4-details">Require sign-offs from more than one team member.</p>
|
| 244 |
+
</div>
|
| 245 |
+
</li>
|
| 246 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-5">
|
| 247 |
+
<div class="flex items-start w-full">
|
| 248 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 249 |
+
<span class="text-feature-title" data-translate="feature-team-5">Draft pull requests</span>
|
| 250 |
+
</div>
|
| 251 |
+
<div class="feature-details w-full pl-6">
|
| 252 |
+
<span class="text-xs text-gray-500 block text-feature-details" data-translate="feature-team-5-sub">Easily discuss and collaborate on pull requests before submitting to formal review.</span>
|
| 253 |
+
</div>
|
| 254 |
+
</li>
|
| 255 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-6">
|
| 256 |
+
<div class="flex items-start w-full">
|
| 257 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 258 |
+
<span class="text-feature-title" data-translate="feature-team-6">Code owners</span>
|
| 259 |
+
</div>
|
| 260 |
+
<div class="feature-details w-full pl-6">
|
| 261 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-6-details">Define individuals or teams responsible for parts of the code.</p>
|
| 262 |
+
</div>
|
| 263 |
+
</li>
|
| 264 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-7">
|
| 265 |
+
<div class="flex items-start w-full">
|
| 266 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 267 |
+
<span class="text-feature-title" data-translate="feature-team-7">Required reviewers</span>
|
| 268 |
+
</div>
|
| 269 |
+
<div class="feature-details w-full pl-6">
|
| 270 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-7-details">Ensure mandatory review by specified personnel.</p>
|
| 271 |
+
</div>
|
| 272 |
+
</li>
|
| 273 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-8">
|
| 274 |
+
<div class="flex items-start w-full">
|
| 275 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 276 |
+
<span class="text-feature-title" data-translate="feature-team-8">Pages and Wikis</span>
|
| 277 |
+
</div>
|
| 278 |
+
<div class="feature-details w-full pl-6">
|
| 279 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-8-details">Host simple sites and documentation directly from your repository.</p>
|
| 280 |
+
</div>
|
| 281 |
+
</li>
|
| 282 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-team-9">
|
| 283 |
+
<div class="flex items-start w-full">
|
| 284 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 285 |
+
<span class="text-feature-title" data-translate="feature-team-9">Environment deployment branches and secrets</span>
|
| 286 |
+
</div>
|
| 287 |
+
<div class="feature-details w-full pl-6">
|
| 288 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-team-9-details">Control deployments and secure sensitive data for different stages.</p>
|
| 289 |
+
</div>
|
| 290 |
+
</li>
|
| 291 |
+
</ul>
|
| 292 |
+
</div>
|
| 293 |
+
</div>
|
| 294 |
+
|
| 295 |
+
<div class="w-full lg:w-1/3 bg-white border border-blue-600-var rounded-lg shadow-2xl flex flex-col relative transform scale-100 lg:scale-105 transition duration-300">
|
| 296 |
+
<div class="absolute top-0 right-0 -mt-4 mr-4 bg-blue-600-var text-white text-xs font-bold py-1 px-3 rounded-full uppercase tracking-wider" data-translate="tag-recommended">Recommended</div>
|
| 297 |
+
<div class="enterprise-card-header bg-blue-600-var rounded-t-lg"></div>
|
| 298 |
+
<div class="p-8 flex-grow">
|
| 299 |
+
<h2 class="text-xl font-bold text-gray-900-var mb-4" data-translate="plan-enterprise-title">Enterprise</h2>
|
| 300 |
+
<p class="text-sm text-gray-600 mb-6" data-translate="plan-enterprise-subtitle">Security, compliance, and flexible deployment</p>
|
| 301 |
+
<p class="text-4xl font-bold text-gray-900-var mb-2">$21 <span class="text-lg font-normal text-gray-500" data-translate="per-user-month">per user/month</span></p>
|
| 302 |
+
<p class="text-xs text-gray-500 mb-4" data-translate="starting-at">Starting at</p>
|
| 303 |
+
|
| 304 |
+
<button class="w-full py-3 mt-1 text-sm font-semibold text-blue-600-var border border-blue-600-var rounded-md hover:bg-blue-50 transition duration-200" data-translate="btn-contact-sales">Contact Sales</button>
|
| 305 |
+
<button class="w-full py-3 mt-2 text-sm font-semibold text-white bg-gray-800 rounded-md hover:bg-gray-900 transition duration-200" data-translate="btn-start-free-trial">Start a free trial</button>
|
| 306 |
+
|
| 307 |
+
<ul class="space-y-4 mt-8 text-gray-700">
|
| 308 |
+
<li class="flex items-start">
|
| 309 |
+
<i class="fas fa-arrow-left text-gray-500 mt-1 mr-2 text-sm"></i>
|
| 310 |
+
<span data-translate="feature-enterprise-1">Everything included in Team, plus...</span>
|
| 311 |
+
</li>
|
| 312 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-2">
|
| 313 |
+
<div class="flex items-start w-full">
|
| 314 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 315 |
+
<span class="text-feature-title" data-translate="feature-enterprise-2">Data residency</span>
|
| 316 |
+
</div>
|
| 317 |
+
<div class="feature-details w-full pl-6">
|
| 318 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-2-details">Specify where your data is stored for compliance.</p>
|
| 319 |
+
</div>
|
| 320 |
+
</li>
|
| 321 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-3">
|
| 322 |
+
<div class="flex items-start w-full">
|
| 323 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 324 |
+
<span class="text-feature-title" data-translate="feature-enterprise-3">Enterprise Managed Users</span>
|
| 325 |
+
</div>
|
| 326 |
+
<div class="feature-details w-full pl-6">
|
| 327 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-3-details">Simplified identity management for large organizations.</p>
|
| 328 |
+
</div>
|
| 329 |
+
</li>
|
| 330 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-4">
|
| 331 |
+
<div class="flex items-start w-full">
|
| 332 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 333 |
+
<span class="text-feature-title" data-translate="feature-enterprise-4">User provisioning through SCIM</span>
|
| 334 |
+
</div>
|
| 335 |
+
<div class="feature-details w-full pl-6">
|
| 336 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-4-details">Automate user lifecycle management.</p>
|
| 337 |
+
</div>
|
| 338 |
+
</li>
|
| 339 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-5">
|
| 340 |
+
<div class="flex items-start w-full">
|
| 341 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 342 |
+
<span class="text-feature-title" data-translate="feature-enterprise-5">Enterprise Account to centrally manage multiple organizations</span>
|
| 343 |
+
</div>
|
| 344 |
+
<div class="feature-details w-full pl-6">
|
| 345 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-5-details">Consolidated billing and policy enforcement.</p>
|
| 346 |
+
</div>
|
| 347 |
+
</li>
|
| 348 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-6">
|
| 349 |
+
<div class="flex items-start w-full">
|
| 350 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 351 |
+
<span class="text-feature-title" data-translate="feature-enterprise-6">Environment protection rules</span>
|
| 352 |
+
</div>
|
| 353 |
+
<div class="feature-details w-full pl-6">
|
| 354 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-6-details">Fine-grained control over environment deployments.</p>
|
| 355 |
+
</div>
|
| 356 |
+
</li>
|
| 357 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-7">
|
| 358 |
+
<div class="flex items-start w-full">
|
| 359 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 360 |
+
<span class="text-feature-title" data-translate="feature-enterprise-7">Repository rules</span>
|
| 361 |
+
</div>
|
| 362 |
+
<div class="feature-details w-full pl-6">
|
| 363 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-7-details">Advanced rule sets for branch protection.</p>
|
| 364 |
+
</div>
|
| 365 |
+
</li>
|
| 366 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-8">
|
| 367 |
+
<div class="flex items-start w-full">
|
| 368 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 369 |
+
<span class="text-feature-title" data-translate="feature-enterprise-8">Audit Log API</span>
|
| 370 |
+
</div>
|
| 371 |
+
<div class="feature-details w-full pl-6">
|
| 372 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-8-details">Programmatic access to audit data for compliance.</p>
|
| 373 |
+
</div>
|
| 374 |
+
</li>
|
| 375 |
+
<li class="feature-list-item flex flex-col items-start" data-feature-key="feature-enterprise-9">
|
| 376 |
+
<div class="flex items-start w-full">
|
| 377 |
+
<i class="fas fa-check text-blue-600-var mt-1 mr-2 text-sm"></i>
|
| 378 |
+
<span class="text-feature-title" data-translate="feature-enterprise-9">SOC1, SOC2, type 2 reports annually</span>
|
| 379 |
+
</div>
|
| 380 |
+
<div class="feature-details w-full pl-6">
|
| 381 |
+
<p class="text-xs text-gray-500 text-feature-details" data-translate="feature-enterprise-9-details">Required compliance reports for your industry.</p>
|
| 382 |
+
</div>
|
| 383 |
+
</li>
|
| 384 |
+
</ul>
|
| 385 |
+
</div>
|
| 386 |
+
</div>
|
| 387 |
+
</div>
|
| 388 |
+
</div>
|
| 389 |
+
|
| 390 |
+
<section class="bg-gray-900 py-16 sm:py-24 mt-20">
|
| 391 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 392 |
+
|
| 393 |
+
<div class="flex flex-wrap justify-center items-center space-x-4 sm:space-x-8 lg:space-x-12 mb-16 opacity-75">
|
| 394 |
+
<h3 class="text-sm font-semibold text-gray-500 uppercase tracking-wider hidden md:block" data-translate="accepted-payments">Accepted Payments:</h3>
|
| 395 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b5/PayPal.svg" alt="PayPal Logo" class="h-6 sm:h-8 filter brightness-0 invert" aria-label="PayPal">
|
| 396 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/e/e9/Stripe_Logo%2C_revised_2014.svg" alt="Stripe Logo" class="h-6 sm:h-8 filter brightness-0 invert" aria-label="Stripe">
|
| 397 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/5/5e/Visa_Inc._logo.svg" alt="Visa Logo" class="h-3 sm:h-5 filter brightness-0 invert" aria-label="Visa">
|
| 398 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/2/2a/Mastercard-logo.svg" alt="Mastercard Logo" class="h-4 sm:h-6 filter brightness-0 invert" aria-label="Mastercard">
|
| 399 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/f/fa/American_Express_logo_%282018%29.svg" alt="American Express Logo" class="h-6 sm:h-8 filter brightness-0 invert" aria-label="American Express">
|
| 400 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/b/b8/Google_Pay_logo.svg" alt="Google Pay Logo" class="h-6 sm:h-8 filter brightness-0 invert" aria-label="Google Pay">
|
| 401 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/3/30/Apple_Pay_logo.svg" alt="Apple Pay Logo" class="h-6 sm:h-8 filter brightness-0 invert" aria-label="Apple Pay">
|
| 402 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/1/15/Wirecard_AG_logo.svg" alt="Wirecard Logo" class="h-6 sm:h-8 filter brightness-0 invert" aria-label="Wirecard">
|
| 403 |
+
</div>
|
| 404 |
+
|
| 405 |
+
<div class="flex flex-col lg:flex-row bg-gray-800 rounded-lg overflow-hidden shadow-2xl">
|
| 406 |
+
<div class="lg:w-1/2 min-h-[300px] lg:min-h-0 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1280&q=80');">
|
| 407 |
+
<div class="h-full w-full bg-black bg-opacity-30"></div>
|
| 408 |
+
</div>
|
| 409 |
+
|
| 410 |
+
<div class="lg:w-1/2 p-8 md:p-12 flex flex-col justify-center">
|
| 411 |
+
<blockquote class="text-white text-2xl md:text-3xl font-light leading-relaxed mb-8">
|
| 412 |
+
<p data-translate="quote-text">
|
| 413 |
+
People know what a pull request is because it’s how they contribute to open source projects. We have many developers who are well-versed with **GitForge**, either for personal development or previous roles. With **GitForge Enterprise**, no one has to relearn the wheel.
|
| 414 |
+
</p>
|
| 415 |
+
</blockquote>
|
| 416 |
+
<p class="text-lg font-medium text-gray-400">
|
| 417 |
+
— <span data-translate="quote-author">Laurent Ploix</span>, <span data-translate="quote-title">Product Manager, Spotify</span>
|
| 418 |
+
</p>
|
| 419 |
+
</div>
|
| 420 |
+
</div>
|
| 421 |
+
</div>
|
| 422 |
+
</section>
|
| 423 |
+
|
| 424 |
+
<section class="py-16 sm:py-24">
|
| 425 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 426 |
+
|
| 427 |
+
<h2 class="text-4xl font-extrabold text-gray-900-var mb-12 text-center" data-translate="features-title">
|
| 428 |
+
GitForge Features and Add-ons
|
| 429 |
+
</h2>
|
| 430 |
+
|
| 431 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 432 |
+
|
| 433 |
+
<a href="#" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-lg transition duration-300 group">
|
| 434 |
+
<div class="flex items-center mb-4">
|
| 435 |
+
<div class="p-3 rounded-full bg-purple-100 group-hover:bg-purple-200 transition">
|
| 436 |
+
<i class="fas fa-brain text-purple-600 text-xl"></i>
|
| 437 |
+
</div>
|
| 438 |
+
<h3 class="text-xl font-semibold text-gray-900-var ml-4" data-translate="card-copilot-title">GitForge Copilot</h3>
|
| 439 |
+
</div>
|
| 440 |
+
<p class="text-gray-600 mb-4" data-translate="card-copilot-desc">
|
| 441 |
+
Get started for free with up to 2,000 completions and 50 chat requests per month.
|
| 442 |
+
</p>
|
| 443 |
+
<span class="text-blue-600-var font-medium text-sm group-hover:underline" data-translate="compare-plans">Compare plans →</span>
|
| 444 |
+
</a>
|
| 445 |
+
|
| 446 |
+
<a href="#" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-lg transition duration-300 group">
|
| 447 |
+
<div class="flex items-center mb-4">
|
| 448 |
+
<div class="p-3 rounded-full bg-green-100 group-hover:bg-green-200 transition relative">
|
| 449 |
+
<i class="fas fa-microchip text-green-600 text-xl"></i>
|
| 450 |
+
<span class="absolute top-0 right-0 -mt-1 -mr-1 text-xs font-bold bg-green-500 text-white rounded-full px-2" data-translate="tag-new">New</span>
|
| 451 |
+
</div>
|
| 452 |
+
<h3 class="text-xl font-semibold text-gray-900-var ml-4" data-translate="card-models-title">GitForge Models</h3>
|
| 453 |
+
</div>
|
| 454 |
+
<p class="text-gray-600 mb-4" data-translate="card-models-desc">
|
| 455 |
+
Bring industry-leading AI into your workflow, securely, scalably, and with full developer control.
|
| 456 |
+
</p>
|
| 457 |
+
<span class="text-blue-600-var font-medium text-sm group-hover:underline" data-translate="learn-more">Learn more →</span>
|
| 458 |
+
</a>
|
| 459 |
+
|
| 460 |
+
<a href="#" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-lg transition duration-300 group">
|
| 461 |
+
<div class="flex items-center mb-4">
|
| 462 |
+
<div class="p-3 rounded-full bg-blue-100 group-hover:bg-blue-200 transition">
|
| 463 |
+
<i class="fas fa-shield-alt text-blue-600-var text-xl"></i>
|
| 464 |
+
</div>
|
| 465 |
+
<h3 class="text-xl font-semibold text-gray-900-var ml-4" data-translate="card-security-title">GitForge Advanced Security</h3>
|
| 466 |
+
</div>
|
| 467 |
+
<p class="text-gray-600 mb-4" data-translate="card-security-desc">
|
| 468 |
+
Gain peace of mind with our security, privacy, and responsible AI policies.
|
| 469 |
+
</p>
|
| 470 |
+
<span class="text-blue-600-var font-medium text-sm group-hover:underline" data-translate="learn-more">Learn more →</span>
|
| 471 |
+
</a>
|
| 472 |
+
|
| 473 |
+
<a href="#" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-lg transition duration-300 group">
|
| 474 |
+
<div class="flex items-center mb-4">
|
| 475 |
+
<div class="p-3 rounded-full bg-pink-100 group-hover:bg-pink-200 transition">
|
| 476 |
+
<i class="fas fa-laptop-code text-pink-600 text-xl"></i>
|
| 477 |
+
</div>
|
| 478 |
+
<h3 class="text-xl font-semibold text-gray-900-var ml-4" data-translate="card-codespaces-title">GitForge Codespaces</h3>
|
| 479 |
+
</div>
|
| 480 |
+
<p class="text-gray-600 mb-4" data-translate="card-codespaces-desc">
|
| 481 |
+
Starting at $0.18 per hour of compute and $0.07 per GB of storage.
|
| 482 |
+
</p>
|
| 483 |
+
<span class="text-blue-600-var font-medium text-sm group-hover:underline" data-translate="learn-more">Learn more →</span>
|
| 484 |
+
</a>
|
| 485 |
+
|
| 486 |
+
<a href="#" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-lg transition duration-300 group">
|
| 487 |
+
<div class="flex items-center mb-4">
|
| 488 |
+
<div class="p-3 rounded-full bg-orange-100 group-hover:bg-orange-200 transition">
|
| 489 |
+
<i class="fas fa-headset text-orange-600 text-xl"></i>
|
| 490 |
+
</div>
|
| 491 |
+
<h3 class="text-xl font-semibold text-gray-900-var ml-4" data-translate="card-support-title">Premium support</h3>
|
| 492 |
+
</div>
|
| 493 |
+
<p class="text-gray-600 mb-4" data-translate="card-support-desc">
|
| 494 |
+
Get expert help for Enterprise Cloud and Enterprise—any hour your team needs it.
|
| 495 |
+
</p>
|
| 496 |
+
<span class="text-blue-600-var font-medium text-sm group-hover:underline" data-translate="learn-more">Learn more →</span>
|
| 497 |
+
</a>
|
| 498 |
+
|
| 499 |
+
<a href="#" class="block p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-lg transition duration-300 group">
|
| 500 |
+
<div class="flex items-center mb-4">
|
| 501 |
+
<div class="p-3 rounded-full bg-yellow-100 group-hover:bg-yellow-200 transition">
|
| 502 |
+
<i class="fas fa-archive text-yellow-600 text-xl"></i>
|
| 503 |
+
</div>
|
| 504 |
+
<h3 class="text-xl font-semibold text-gray-900-var ml-4" data-translate="card-lfs-title">Git Large File Storage</h3>
|
| 505 |
+
</div>
|
| 506 |
+
<p class="text-gray-600 mb-4" data-translate="card-lfs-desc">
|
| 507 |
+
$5 per month for 50 GB bandwidth and 50 GB of storage.
|
| 508 |
+
</p>
|
| 509 |
+
<span class="text-blue-600-var font-medium text-sm group-hover:underline" data-translate="learn-more">Learn more →</span>
|
| 510 |
+
</a>
|
| 511 |
+
|
| 512 |
+
</div>
|
| 513 |
+
</div>
|
| 514 |
+
</section>
|
| 515 |
+
|
| 516 |
+
</main>
|
| 517 |
+
|
| 518 |
+
<footer class="mt-20 py-10 bg-header border-t header-border">
|
| 519 |
+
<div class="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
|
| 520 |
+
<div class="grid grid-cols-4 gap-8 text-sm">
|
| 521 |
+
<div class="col-span-4 md:col-span-1">
|
| 522 |
+
<h3 data-translate="site-name" class="text-2xl font-bold text-blue-600-var mb-4">GitForge</h3>
|
| 523 |
+
<p data-translate="footer-slogan" class="text-gray-600">The unified DevOps platform that accelerates your software lifecycle.</p>
|
| 524 |
+
<div class="flex space-x-4 mt-6">
|
| 525 |
+
<a href="#" aria-label="Twitter" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 526 |
+
<i class="fab fa-twitter text-xl"></i>
|
| 527 |
+
</a>
|
| 528 |
+
<a href="#" aria-label="LinkedIn" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 529 |
+
<i class="fab fa-linkedin-in text-xl"></i>
|
| 530 |
+
</a>
|
| 531 |
+
<a href="#" aria-label="Facebook" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 532 |
+
<i class="fab fa-facebook-f text-xl"></i>
|
| 533 |
+
</a>
|
| 534 |
+
<a href="#" aria-label="GitHub" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 535 |
+
<i class="fab fa-github text-xl"></i>
|
| 536 |
+
</a>
|
| 537 |
+
<a href="#" aria-label="YouTube" class="text-gray-600 hover:text-blue-600-var transition duration-200">
|
| 538 |
+
<i class="fab fa-youtube text-xl"></i>
|
| 539 |
+
</a>
|
| 540 |
+
</div>
|
| 541 |
+
</div>
|
| 542 |
+
<div class="col-span-2 md:col-span-1">
|
| 543 |
+
<h4 data-translate="footer-product" class="font-bold text-gray-900-var mb-3">Product</h4>
|
| 544 |
+
<ul class="space-y-2 text-gray-600">
|
| 545 |
+
<li><a data-translate="footer-doc" href="/mindus/nexus/documentation" class="hover:text-blue-600-var transition duration-200">Documentation</a></li>
|
| 546 |
+
<li><a data-translate="footer-pricing" href="/mindus/nexus/tarifs" class="hover:text-blue-600-var transition duration-200">Pricing</a></li>
|
| 547 |
+
<li><a data-translate="footer-integrations" href="/mindus/nexus/documentation" class="hover:text-blue-600-var transition duration-200">Integrations</a></li>
|
| 548 |
+
<li><a data-translate="footer-security" href="/mindus/nexus/politique_confidentialite" class="hover:text-blue-600-var transition duration-200">Security</a></li>
|
| 549 |
+
</ul>
|
| 550 |
+
</div>
|
| 551 |
+
<div class="col-span-2 md:col-span-1">
|
| 552 |
+
<h4 data-translate="footer-company" class="font-bold text-gray-900-var mb-3">Company</h4>
|
| 553 |
+
<ul class="space-y-2 text-gray-600">
|
| 554 |
+
<li><a data-translate="footer-about" href="/mindus/nexus/a_propos" class="hover:text-blue-600-var transition duration-200">About</a></li>
|
| 555 |
+
<li><a data-translate="footer-careers" href="#" class="hover:text-blue-600-var transition duration-200">Careers</a></li>
|
| 556 |
+
<li><a data-translate="footer-support" href="/mindus/nexus/contact" class="hover:text-blue-600-var transition duration-200">Support</a></li>
|
| 557 |
+
<li><a data-translate="footer-faq" href="#" class="hover:text-blue-600-var transition duration-200">FAQ</a></li>
|
| 558 |
+
</ul>
|
| 559 |
+
</div>
|
| 560 |
+
<div class="col-span-4 md:col-span-1 lang-dropdown-container">
|
| 561 |
+
<h4 data-translate="footer-resources" class="font-bold text-gray-900-var mb-3">Resources</h4>
|
| 562 |
+
<ul class="space-y-2 text-gray-600">
|
| 563 |
+
<li><a data-translate="footer-contact-email" href="/mindus/nexus/contact" class="hover:text-blue-600-var transition duration-200">Contact Email</a></li>
|
| 564 |
+
<li><a data-translate="footer-status" href="#" class="hover:text-blue-600-var transition duration-200">Service Status</a></li>
|
| 565 |
+
<li><a data-translate="footer-blog" href="#" class="hover:text-blue-600-var transition duration-200">Tech Blog</a></li>
|
| 566 |
+
|
| 567 |
+
<li class="relative mt-4 pt-4 border-t border-gray-200">
|
| 568 |
+
<button id="lang-menu-button" class="flex items-center text-gray-900-var hover:text-blue-600-var transition duration-200 text-sm">
|
| 569 |
+
<span id="current-flag">🇺🇸</span>
|
| 570 |
+
<span id="current-lang-name" class="ml-2 font-medium" data-lang-code="en">English</span>
|
| 571 |
+
<span class="material-symbols-rounded text-gray-600 ml-2 text-xl">expand_more</span>
|
| 572 |
+
</button>
|
| 573 |
+
<div id="lang-menu-dropdown" class="lang-menu-dropdown">
|
| 574 |
+
<a href="#" data-lang="fr" class="lang-option flex items-center px-4 py-2 text-sm">🇫🇷 Français</a>
|
| 575 |
+
<a href="#" data-lang="en" class="lang-option flex items-center px-4 py-2 text-sm">🇺🇸 English</a>
|
| 576 |
+
<a href="#" data-lang="es" class="lang-option flex items-center px-4 py-2 text-sm">🇪🇸 Español</a>
|
| 577 |
+
</div>
|
| 578 |
+
</li>
|
| 579 |
+
</ul>
|
| 580 |
+
</div>
|
| 581 |
+
</div>
|
| 582 |
+
<div class="mt-10 pt-6 border-t border-gray-200">
|
| 583 |
+
<p data-translate="footer-copyright" class="text-center text-sm text-gray-600"> © 2025 GitForge. All rights reserved. Powered by the <a href="/" class="hover:text-blue-600-var hover:underline">GitForge Platform</a>.</p>
|
| 584 |
+
<div class="text-center mt-2 space-x-4 text-xs">
|
| 585 |
+
<a data-translate="footer-cgu" href="/mindus/nexus/conditions_utilisation" class="text-gray-600 hover:text-blue-600-var">Terms of Service</a>
|
| 586 |
+
<a data-translate="footer-legal" href="/mindus/nexus/mentions_legales" class="text-gray-600 hover:text-blue-600-var">Legal Notice</a>
|
| 587 |
+
<a data-translate="footer-privacy" href="/mindus/nexus/politique_confidentialite" class="text-gray-600 hover:text-blue-600-var">Privacy Policy</a>
|
| 588 |
+
</div>
|
| 589 |
+
</div>
|
| 590 |
+
</div>
|
| 591 |
+
</footer>
|
| 592 |
+
|
| 593 |
+
<script>
|
| 594 |
+
const translations = {
|
| 595 |
+
"page-title": { "fr": "Tarifs GitForge", "en": "GitForge Pricing", "es": "Precios de GitForge" },
|
| 596 |
+
|
| 597 |
+
// Navigation
|
| 598 |
+
"site-name": { "fr": "GitForge", "en": "GitForge", "es": "GitForge" },
|
| 599 |
+
"nav-platform": { "fr": "Plateforme", "en": "Platform", "es": "Plataforma" },
|
| 600 |
+
"nav-solutions": { "fr": "Solutions", "en": "Solutions", "es": "Soluciones" },
|
| 601 |
+
"nav-resources": { "fr": "Ressources", "en": "Resources", "es": "Recursos" },
|
| 602 |
+
"nav-opensource": { "fr": "Open Source", "en": "Open Source", "es": "Código Abierto" },
|
| 603 |
+
"nav-enterprise": { "fr": "Entreprise", "en": "Enterprise", "es": "Empresa" },
|
| 604 |
+
"nav-pricing": { "fr": "Tarifs", "en": "Pricing", "es": "Precios" },
|
| 605 |
+
"btn-sign-in": { "fr": "Connexion", "en": "Sign in", "es": "Iniciar Sesión" },
|
| 606 |
+
"btn-sign-up": { "fr": "Inscription", "en": "Sign up", "es": "Registrarse" },
|
| 607 |
+
|
| 608 |
+
// Hero Section
|
| 609 |
+
"title-slogan": { "fr": "La plateforme DevOps unifiée, optimisée par l'IA.", "en": "The unified DevOps platform, powered by AI.", "es": "La plataforma DevOps unificada, impulsada por IA." },
|
| 610 |
+
"subtitle-trial": { "fr": "Accélérez votre cycle de vie logiciel avec GitForge. Nous avons regroupé GitForge Enterprise, Copilot et la Sécurité Avancée dans un seul essai sans risque.", "en": "Accelerate your software lifecycle with GitForge. We've packed GitForge Enterprise, Copilot, and Advanced Security into a single risk-free trial.", "es": "Acelere su ciclo de vida de software con GitForge. Hemos incluido GitForge Enterprise, Copilot y Seguridad Avanzada en una sola prueba sin riesgos." },
|
| 611 |
+
"btn-start-trial": { "fr": "Démarrer l'essai gratuit de 30 jours", "en": "Start free for 30 days", "es": "Comenzar prueba gratuita de 30 días" },
|
| 612 |
+
|
| 613 |
+
// Pricing Cards
|
| 614 |
+
"per-user-month": { "fr": "par utilisateur/mois", "en": "per user/month", "es": "por usuario/mes" },
|
| 615 |
+
"tag-recommended": { "fr": "Recommandé", "en": "Recommended", "es": "Recomendado" },
|
| 616 |
+
"starting-at": { "fr": "À partir de", "en": "Starting at", "es": "A partir de" },
|
| 617 |
+
|
| 618 |
+
// Free Plan
|
| 619 |
+
"plan-free-title": { "fr": "Gratuit", "en": "Free", "es": "Gratis" },
|
| 620 |
+
"plan-free-subtitle": { "fr": "Les bases pour les individus et les organisations", "en": "The basics for individuals and organizations", "es": "Lo básico para individuos y organizaciones" },
|
| 621 |
+
"btn-join-free": { "fr": "Rejoindre gratuitement", "en": "Join for free", "es": "Unirse gratis" },
|
| 622 |
+
"feature-free-1": { "fr": "Dépôts publics/privés illimités", "en": "Unlimited public/private repositories", "es": "Repositorios públicos/privados ilimitados" },
|
| 623 |
+
"feature-free-1-details": { "fr": "Pas de coûts cachés, créez-en autant que nécessaire.", "en": "No hidden costs, create as many as you need.", "es": "Sin costes ocultos, cree tantos como necesite." },
|
| 624 |
+
"feature-free-2": { "fr": "Mises à jour de sécurité et de version Dependabot", "en": "Dependabot security and version updates", "es": "Actualizaciones de seguridad y versión de Dependabot" },
|
| 625 |
+
"feature-free-2-details": { "fr": "Analyse et correction automatisées des dépendances.", "en": "Automated dependency scanning and patching.", "es": "Escaneo y parcheo de dependencias automatizado." },
|
| 626 |
+
"feature-free-3": { "fr": "2,000 minutes CI/CD/mois", "en": "2,000 CI/CD minutes/month", "es": "2,000 minutos CI/CD/mes" },
|
| 627 |
+
"feature-free-3-sub": { "fr": "Gratuit pour les dépôts publics", "en": "Free for public repositories", "es": "Gratis para repositorios públicos" },
|
| 628 |
+
"feature-free-4": { "fr": "1 Go de stockage de Packages", "en": "1 GB of Packages storage", "es": "1 GB de almacenamiento de Paquetes" },
|
| 629 |
+
"feature-free-4-details": { "fr": "Stockez vos Docker, npm, Maven, et plus.", "en": "Store your Docker, npm, Maven, and more.", "es": "Almacene sus Docker, npm, Maven, y más." },
|
| 630 |
+
"feature-free-5": { "fr": "Issues & Projets", "en": "Issues & Projects", "es": "Incidencias y Proyectos" },
|
| 631 |
+
"feature-free-5-details": { "fr": "Suivez le travail, gérez les tâches et coordonnez-vous avec votre équipe.", "en": "Track work, manage tasks, and coordinate with your team.", "es": "Realice un seguimiento del trabajo, gestione tareas y coordínese con su equipo." },
|
| 632 |
+
"feature-free-6": { "fr": "Support communautaire", "en": "Community support", "es": "Soporte comunitario" },
|
| 633 |
+
"feature-free-6-details": { "fr": "Accès aux forums et à la documentation.", "en": "Access to forums and documentation.", "es": "Acceso a foros y documentación." },
|
| 634 |
+
"addons-title": { "fr": "ADD-ONS EN VEDETTE", "en": "FEATURED ADD-ONS", "es": "ADD-ONS DESTACADOS" },
|
| 635 |
+
"addon-copilot": { "fr": "Accès à GitForge Copilot", "en": "GitForge Copilot Access", "es": "Acceso a GitForge Copilot" },
|
| 636 |
+
"addon-codespaces": { "fr": "Accès aux Codespaces GitForge", "en": "GitForge Codespaces Access", "es": "Acceso a Codespaces GitForge" },
|
| 637 |
+
|
| 638 |
+
// Team Plan
|
| 639 |
+
"plan-team-title": { "fr": "Équipe", "en": "Team", "es": "Equipo" },
|
| 640 |
+
"plan-team-subtitle": { "fr": "Collaboration avancée pour les individus et les organisations", "en": "Advanced collaboration for individuals and organizations", "es": "Colaboración avanzada para individuos y organizaciones" },
|
| 641 |
+
"btn-continue-team": { "fr": "Continuer avec Équipe", "en": "Continue with Team", "es": "Continuar con Equipo" },
|
| 642 |
+
"feature-team-1": { "fr": "Tout ce qui est inclus dans Gratuit, plus...", "en": "Everything included in Free, plus...", "es": "Todo lo incluido en Gratis, más..." },
|
| 643 |
+
"feature-team-2": { "fr": "Accès aux Codespaces GitForge", "en": "Access to GitForge Codespaces", "es": "Acceso a Codespaces GitForge" },
|
| 644 |
+
"feature-team-2-details": { "fr": "Environnements de développement basés sur le cloud à la demande.", "en": "Cloud-based development environments on demand.", "es": "Entornos de desarrollo basados en la nube bajo demanda." },
|
| 645 |
+
"feature-team-3": { "fr": "Règles de dépôt", "en": "Repository rules", "es": "Reglas de repositorio" },
|
| 646 |
+
"feature-team-3-details": { "fr": "Appliquez des normes à l'ensemble de vos bases de code.", "en": "Enforce standards across your code bases.", "es": "Haga cumplir los estándares en todas sus bases de código." },
|
| 647 |
+
"feature-team-4": { "fr": "Plusieurs relecteurs dans les demandes de tirage (pull requests)", "en": "Multiple reviewers in pull requests", "es": "Múltiples revisores en solicitudes de extracción" },
|
| 648 |
+
"feature-team-4-details": { "fr": "Nécessite la validation de plusieurs membres de l'équipe.", "en": "Require sign-offs from more than one team member.", "es": "Requiere la aprobación de más de un miembro del equipo." },
|
| 649 |
+
"feature-team-5": { "fr": "Demandes de tirage brouillons", "en": "Draft pull requests", "es": "Solicitudes de extracción de borrador" },
|
| 650 |
+
"feature-team-5-sub": { "fr": "Discutez et collaborez facilement sur les demandes de tirage avant de les soumettre à une révision formelle.", "en": "Easily discuss and collaborate on pull requests before submitting to formal review.", "es": "Discuta y colabore fácilmente en las solicitudes de extracción antes de enviarlas a una revisión formal." },
|
| 651 |
+
"feature-team-6": { "fr": "Propriétaires de code", "en": "Code owners", "es": "Propietarios de código" },
|
| 652 |
+
"feature-team-6-details": { "fr": "Définissez les individus ou les équipes responsables de certaines parties du code.", "en": "Define individuals or teams responsible for parts of the code.", "es": "Defina individuos o equipos responsables de partes del código." },
|
| 653 |
+
"feature-team-7": { "fr": "Relecteurs requis", "en": "Required reviewers", "es": "Revisores requeridos" },
|
| 654 |
+
"feature-team-7-details": { "fr": "Assurez une révision obligatoire par le personnel spécifié.", "en": "Ensure mandatory review by specified personnel.", "es": "Garantice una revisión obligatoria por parte del personal especificado." },
|
| 655 |
+
"feature-team-8": { "fr": "Pages et Wikis", "en": "Pages and Wikis", "es": "Páginas y Wikis" },
|
| 656 |
+
"feature-team-8-details": { "fr": "Hébergez des sites et de la documentation simples directement depuis votre dépôt.", "en": "Host simple sites and documentation directly from your repository.", "es": "Aloje sitios sencillos y documentación directamente desde su repositorio." },
|
| 657 |
+
"feature-team-9": { "fr": "Branches de déploiement d'environnement et secrets", "en": "Environment deployment branches and secrets", "es": "Ramas de despliegue de entorno y secretos" },
|
| 658 |
+
"feature-team-9-details": { "fr": "Contrôlez les déploiements et sécurisez les données sensibles pour différentes étapes.", "en": "Control deployments and secure sensitive data for different stages.", "es": "Controle los despliegues y asegure los datos sensibles para diferentes etapas." },
|
| 659 |
+
|
| 660 |
+
// Enterprise Plan
|
| 661 |
+
"plan-enterprise-title": { "fr": "Entreprise", "en": "Enterprise", "es": "Empresa" },
|
| 662 |
+
"plan-enterprise-subtitle": { "fr": "Sécurité, conformité et déploiement flexible", "en": "Security, compliance, and flexible deployment", "es": "Seguridad, cumplimiento y despliegue flexible" },
|
| 663 |
+
"btn-contact-sales": { "fr": "Contacter les Ventes", "en": "Contact Sales", "es": "Contactar Ventas" },
|
| 664 |
+
"btn-start-free-trial": { "fr": "Démarrer un essai gratuit", "en": "Start a free trial", "es": "Comenzar una prueba gratuita" },
|
| 665 |
+
"feature-enterprise-1": { "fr": "Tout ce qui est inclus dans Équipe, plus...", "en": "Everything included in Team, plus...", "es": "Todo lo incluido en Equipo, más..." },
|
| 666 |
+
"feature-enterprise-2": { "fr": "Résidence des données", "en": "Data residency", "es": "Residencia de datos" },
|
| 667 |
+
"feature-enterprise-2-details": { "fr": "Spécifiez où vos données sont stockées pour la conformité.", "en": "Specify where your data is stored for compliance.", "es": "Especifique dónde se almacenan sus datos para el cumplimiento." },
|
| 668 |
+
"feature-enterprise-3": { "fr": "Utilisateurs gérés par l'entreprise", "en": "Enterprise Managed Users", "es": "Usuarios gestionados por la empresa" },
|
| 669 |
+
"feature-enterprise-3-details": { "fr": "Gestion d'identité simplifiée pour les grandes organisations.", "en": "Simplified identity management for large organizations.", "es": "Gestión de identidad simplificada para grandes organizaciones." },
|
| 670 |
+
"feature-enterprise-4": { "fr": "Provisionnement d'utilisateurs via SCIM", "en": "User provisioning through SCIM", "es": "Provisionamiento de usuarios a través de SCIM" },
|
| 671 |
+
"feature-enterprise-4-details": { "fr": "Automatisez la gestion du cycle de vie des utilisateurs.", "en": "Automate user lifecycle management.", "es": "Automatice la gestión del ciclo de vida del usuario." },
|
| 672 |
+
"feature-enterprise-5": { "fr": "Compte d'entreprise pour gérer de manière centralisée plusieurs organisations", "en": "Enterprise Account to centrally manage multiple organizations", "es": "Cuenta de empresa para gestionar centralmente múltiples organizaciones" },
|
| 673 |
+
"feature-enterprise-5-details": { "fr": "Facturation consolidée et application des politiques.", "en": "Consolidated billing and policy enforcement.", "es": "Facturación consolidada y aplicación de políticas." },
|
| 674 |
+
"feature-enterprise-6": { "fr": "Règles de protection de l'environnement", "en": "Environment protection rules", "es": "Reglas de protección del entorno" },
|
| 675 |
+
"feature-enterprise-6-details": { "fr": "Contrôle précis des déploiements d'environnement.", "en": "Fine-grained control over environment deployments.", "es": "Control detallado sobre los despliegues de entorno." },
|
| 676 |
+
"feature-enterprise-7": { "fr": "Règles de dépôt", "en": "Repository rules", "es": "Reglas de repositorio" },
|
| 677 |
+
"feature-enterprise-7-details": { "fr": "Ensembles de règles avancées pour la protection des branches.", "en": "Advanced rule sets for branch protection.", "es": "Conjuntos de reglas avanzados para la protección de ramas." },
|
| 678 |
+
"feature-enterprise-8": { "fr": "API de journal d'audit", "en": "Audit Log API", "es": "API de registro de auditoría" },
|
| 679 |
+
"feature-enterprise-8-details": { "fr": "Accès programmatique aux données d'audit pour la conformité.", "en": "Programmatic access to audit data for compliance.", "es": "Acceso programático a los datos de auditoría para el cumplimiento." },
|
| 680 |
+
"feature-enterprise-9": { "fr": "Rapports SOC1, SOC2, type 2 annuels", "en": "SOC1, SOC2, type 2 reports annually", "es": "Informes SOC1, SOC2, tipo 2 anuales" },
|
| 681 |
+
"feature-enterprise-9-details": { "fr": "Rapports de conformité requis pour votre secteur.", "en": "Required compliance reports for your industry.", "es": "Informes de cumplimiento requeridos para su industria." },
|
| 682 |
+
|
| 683 |
+
// Quote Section
|
| 684 |
+
"accepted-payments": { "fr": "Paiements acceptés :", "en": "Accepted Payments:", "es": "Pagos aceptados:" },
|
| 685 |
+
"quote-text": { "fr": "Les gens savent ce qu'est une *pull request* car c'est ainsi qu'ils contribuent aux projets open source. Nous avons de nombreux développeurs qui connaissent bien **GitForge**, que ce soit pour le développement personnel ou des rôles précédents. Avec **GitForge Enterprise**, personne n'a à réapprendre la roue.", "en": "People know what a pull request is because it’s how they contribute to open source projects. We have many developers who are well-versed with **GitForge**, either for personal development or previous roles. With **GitForge Enterprise**, no one has to relearn the wheel.", "es": "La gente sabe qué es una *pull request* porque es la forma en que contribuyen a proyectos de código abierto. Tenemos muchos desarrolladores que conocen bien **GitForge**, ya sea para desarrollo personal o roles anteriores. Con **GitForge Enterprise**, nadie tiene que volver a aprender la rueda." },
|
| 686 |
+
"quote-author": { "fr": "Laurent Ploix", "en": "Laurent Ploix", "es": "Laurent Ploix" },
|
| 687 |
+
"quote-title": { "fr": "Chef de Produit, Spotify", "en": "Product Manager, Spotify", "es": "Gerente de Producto, Spotify" },
|
| 688 |
+
|
| 689 |
+
// Features Section
|
| 690 |
+
"features-title": { "fr": "Fonctionnalités et Add-ons GitForge", "en": "GitForge Features and Add-ons", "es": "Funcionalidades y Add-ons de GitForge" },
|
| 691 |
+
"tag-new": { "fr": "Nouveau", "en": "New", "es": "Nuevo" },
|
| 692 |
+
"compare-plans": { "fr": "Comparer les plans →", "en": "Compare plans →", "es": "Comparar planes →" },
|
| 693 |
+
"learn-more": { "fr": "En savoir plus →", "en": "Learn more →", "es": "Aprender más →" },
|
| 694 |
+
"card-copilot-title": { "fr": "GitForge Copilot", "en": "GitForge Copilot", "es": "GitForge Copilot" },
|
| 695 |
+
"card-copilot-desc": { "fr": "Démarrez gratuitement avec jusqu'à 2 000 complétions et 50 requêtes de chat par mois.", "en": "Get started for free with up to 2,000 completions and 50 chat requests per month.", "es": "Empiece gratis con hasta 2,000 finalizaciones y 50 solicitudes de chat al mes." },
|
| 696 |
+
"card-models-title": { "fr": "GitForge Models", "en": "GitForge Models", "es": "Modelos GitForge" },
|
| 697 |
+
"card-models-desc": { "fr": "Intégrez l'IA de pointe dans votre flux de travail, de manière sécurisée, évolutive et avec un contrôle total du développeur.", "en": "Bring industry-leading AI into your workflow, securely, scalably, and with full developer control.", "es": "Incorpore la IA líder de la industria en su flujo de trabajo, de forma segura, escalable y con control total del desarrollador." },
|
| 698 |
+
"card-security-title": { "fr": "GitForge Advanced Security", "en": "GitForge Advanced Security", "es": "Seguridad Avanzada GitForge" },
|
| 699 |
+
"card-security-desc": { "fr": "Ayez l'esprit tranquille grâce à nos politiques de sécurité, de confidentialité et d'IA responsable.", "en": "Gain peace of mind with our security, privacy, and responsible AI policies.", "es": "Obtenga tranquilidad con nuestras políticas de seguridad, privacidad e IA responsable." },
|
| 700 |
+
"card-codespaces-title": { "fr": "GitForge Codespaces", "en": "GitForge Codespaces", "es": "Codespaces GitForge" },
|
| 701 |
+
"card-codespaces-desc": { "fr": "À partir de 0,18 $ par heure de calcul et 0,07 $ par Go de stockage.", "en": "Starting at $0.18 per hour of compute and $0.07 per GB of storage.", "es": "A partir de 0,18 $ por hora de cómputo y 0,07 $ por GB de almacenamiento." },
|
| 702 |
+
"card-support-title": { "fr": "Support Premium", "en": "Premium support", "es": "Soporte Premium" },
|
| 703 |
+
"card-support-desc": { "fr": "Obtenez l'aide d'experts pour Enterprise Cloud et Enterprise – à toute heure dont votre équipe a besoin.", "en": "Get expert help for Enterprise Cloud and Enterprise—any hour your team needs it.", "es": "Obtenga ayuda experta para Enterprise Cloud y Enterprise—en cualquier momento que su equipo la necesite." },
|
| 704 |
+
"card-lfs-title": { "fr": "Git Large File Storage", "en": "Git Large File Storage", "es": "Git Large File Storage" },
|
| 705 |
+
"card-lfs-desc": { "fr": "5 $ par mois pour 50 Go de bande passante et 50 Go de stockage.", "en": "5$ per month for 50 GB bandwidth and 50 GB of storage.", "es": "5 $ al mes por 50 GB de ancho de banda y 50 GB de almacenamiento." },
|
| 706 |
+
|
| 707 |
+
|
| 708 |
+
// Footer
|
| 709 |
+
"footer-slogan": { "fr": "La plateforme DevOps unifiée qui accélère votre cycle de vie logiciel.", "en": "The unified DevOps platform that accelerates your software lifecycle.", "es": "La plataforma DevOps unificada que acelera su ciclo de vida de software." },
|
| 710 |
+
"footer-product": { "fr": "Produit", "en": "Product", "es": "Producto" },
|
| 711 |
+
"footer-doc": { "fr": "Documentation", "en": "Documentation", "es": "Documentación" },
|
| 712 |
+
"footer-pricing": { "fr": "Tarifs", "en": "Pricing", "es": "Precios" },
|
| 713 |
+
"footer-integrations": { "fr": "Intégrations", "en": "Integrations", "es": "Integraciones" },
|
| 714 |
+
"footer-security": { "fr": "Sécurité", "en": "Security", "es": "Seguridad" },
|
| 715 |
+
"footer-company": { "fr": "Entreprise", "en": "Company", "es": "Compañía" },
|
| 716 |
+
"footer-about": { "fr": "À Propos", "en": "About", "es": "Acerca de" },
|
| 717 |
+
"footer-careers": { "fr": "Carrières", "en": "Careers", "es": "Carreras" },
|
| 718 |
+
"footer-support": { "fr": "Support", "en": "Support", "es": "Soporte" },
|
| 719 |
+
"footer-faq": { "fr": "FAQ", "en": "FAQ", "es": "FAQ" },
|
| 720 |
+
"footer-resources": { "fr": "Ressources", "en": "Resources", "es": "Recursos" },
|
| 721 |
+
"footer-contact-email": { "fr": "Contact Email", "en": "Contact Email", "es": "Correo de Contacto" },
|
| 722 |
+
"footer-status": { "fr": "Statut du Service", "en": "Service Status", "es": "Estado del Servicio" },
|
| 723 |
+
"footer-blog": { "fr": "Blog Tech", "en": "Tech Blog", "es": "Blog de Tecnología" },
|
| 724 |
+
"footer-copyright": { "fr": "© 2025 GitForge. Tous droits réservés. Propulsé par la <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plateforme GitForge</a>.", "en": "© 2025 GitForge. All rights reserved. Powered by the <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">GitForge Platform</a>.", "es": "© 2025 GitForge. Todos los derechos reservados. Impulsado por la <a href=\"/\" class=\"hover:text-blue-600-var hover:underline\">Plataforma GitForge</a>." },
|
| 725 |
+
"footer-cgu": { "fr": "Conditions d'Utilisation", "en": "Terms of Service", "es": "Términos de Servicio" },
|
| 726 |
+
"footer-legal": { "fr": "Mentions Légales", "en": "Legal Notice", "es": "Aviso Legal" },
|
| 727 |
+
"footer-privacy": { "fr": "Politique de Confidentialité", "en": "Privacy Policy", "es": "Política de Privacidad" }
|
| 728 |
+
};
|
| 729 |
+
|
| 730 |
+
const languageNames = {
|
| 731 |
+
"fr": "Français",
|
| 732 |
+
"en": "English",
|
| 733 |
+
"es": "Español"
|
| 734 |
+
};
|
| 735 |
+
const languageFlags = {
|
| 736 |
+
"fr": "🇫🇷",
|
| 737 |
+
"en": "🇺🇸",
|
| 738 |
+
"es": "🇪🇸"
|
| 739 |
+
};
|
| 740 |
+
|
| 741 |
+
// Default language is English
|
| 742 |
+
let currentLang = 'en';
|
| 743 |
+
|
| 744 |
+
const applyTranslations = (lang) => {
|
| 745 |
+
document.querySelectorAll('[data-translate]').forEach(element => {
|
| 746 |
+
const key = element.getAttribute('data-translate');
|
| 747 |
+
if (translations[key] && translations[key][lang]) {
|
| 748 |
+
// Check if the element contains HTML content (like the footer-copyright or quote-text)
|
| 749 |
+
const text = translations[key][lang];
|
| 750 |
+
if (key === 'footer-copyright' || key === 'quote-text' || text.includes('<a') || text.includes('**')) {
|
| 751 |
+
element.innerHTML = text.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>');
|
| 752 |
+
} else {
|
| 753 |
+
element.textContent = text;
|
| 754 |
+
}
|
| 755 |
+
}
|
| 756 |
+
});
|
| 757 |
+
|
| 758 |
+
// Update language selector display
|
| 759 |
+
document.getElementById('current-flag').textContent = languageFlags[lang];
|
| 760 |
+
document.getElementById('current-lang-name').textContent = languageNames[lang];
|
| 761 |
+
document.getElementById('current-lang-name').setAttribute('data-lang-code', lang);
|
| 762 |
+
document.documentElement.lang = lang; // Update HTML lang attribute
|
| 763 |
+
currentLang = lang;
|
| 764 |
+
};
|
| 765 |
+
|
| 766 |
+
const setupAccordion = () => {
|
| 767 |
+
document.querySelectorAll('.feature-list-item').forEach(item => {
|
| 768 |
+
const featureTitle = item.querySelector('.flex.items-start.w-full');
|
| 769 |
+
const featureDetails = item.querySelector('.feature-details');
|
| 770 |
+
|
| 771 |
+
if (featureTitle && featureDetails) {
|
| 772 |
+
featureTitle.addEventListener('click', (e) => {
|
| 773 |
+
e.preventDefault();
|
| 774 |
+
const isOpen = item.classList.contains('open');
|
| 775 |
+
|
| 776 |
+
// Close all open details first (optional, but good for single open accordion)
|
| 777 |
+
document.querySelectorAll('.feature-list-item.open').forEach(openItem => {
|
| 778 |
+
if (openItem !== item) {
|
| 779 |
+
openItem.classList.remove('open');
|
| 780 |
+
openItem.querySelector('.feature-details').classList.remove('open');
|
| 781 |
+
}
|
| 782 |
+
});
|
| 783 |
+
|
| 784 |
+
// Toggle current item
|
| 785 |
+
item.classList.toggle('open');
|
| 786 |
+
featureDetails.classList.toggle('open');
|
| 787 |
+
});
|
| 788 |
+
}
|
| 789 |
+
});
|
| 790 |
+
};
|
| 791 |
+
|
| 792 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 793 |
+
// Language selector toggle logic
|
| 794 |
+
const langButton = document.getElementById('lang-menu-button');
|
| 795 |
+
const langDropdown = document.getElementById('lang-menu-dropdown');
|
| 796 |
+
|
| 797 |
+
langButton.addEventListener('click', (e) => {
|
| 798 |
+
e.stopPropagation();
|
| 799 |
+
langDropdown.style.display = langDropdown.style.display === 'block' ? 'none' : 'block';
|
| 800 |
+
});
|
| 801 |
+
|
| 802 |
+
document.addEventListener('click', (e) => {
|
| 803 |
+
if (!langButton.contains(e.target) && !langDropdown.contains(e.target)) {
|
| 804 |
+
langDropdown.style.display = 'none';
|
| 805 |
+
}
|
| 806 |
+
});
|
| 807 |
+
|
| 808 |
+
// Language selection logic
|
| 809 |
+
document.querySelectorAll('.lang-option').forEach(option => {
|
| 810 |
+
option.addEventListener('click', (e) => {
|
| 811 |
+
e.preventDefault();
|
| 812 |
+
const newLang = option.getAttribute('data-lang');
|
| 813 |
+
applyTranslations(newLang);
|
| 814 |
+
langDropdown.style.display = 'none'; // Close dropdown after selection
|
| 815 |
+
});
|
| 816 |
+
});
|
| 817 |
+
|
| 818 |
+
// Setup the accordion/dropdown functionality for features
|
| 819 |
+
setupAccordion();
|
| 820 |
+
|
| 821 |
+
// Initial load: Apply English translations by default
|
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5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>GitForge | Upload Files</title>
|
| 7 |
+
<link rel="icon" type="image/png" href="https://i.postimg.cc/t4NCGNzD/gitforge-png.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 |
+
/* Inter font configuration */
|
| 14 |
+
body { font-family: 'Inter', sans-serif; }
|
| 15 |
+
|
| 16 |
+
/* Theme Variables (Light Mode enforced for this 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; /* Commit Button (Green) */
|
| 27 |
+
--primary-hover: #2C974B;
|
| 28 |
+
--dropzone-bg: #F6F8FA;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/* Utility classes for 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 |
+
/* Specific style for the navigation bar */
|
| 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 for the drag-and-drop zone */
|
| 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 |
+
/* Loader style (spinning circle) */
|
| 50 |
+
.loader {
|
| 51 |
+
border: 4px solid rgba(255, 255, 255, 0.3);
|
| 52 |
+
border-top: 4px solid #ffffff; /* Spinning circle color */
|
| 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.postimg.cc/t4NCGNzD/gitforge-png.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> Upload
|
| 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">Add Files via Upload</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 |
+
Drag additional files here to add them to your repository
|
| 128 |
+
</p>
|
| 129 |
+
<p class="text-sm text-secondary-var">
|
| 130 |
+
Or <label for="file-upload" class="text-link-var cursor-pointer hover:underline">choose your files (Max 50 at once)</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">Pending Files: <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" name="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" name="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="mb-6">
|
| 151 |
+
<label for="subfolder-path" class="block text-sm font-medium text-color-var mb-1">
|
| 152 |
+
Destination Folder (Optional)
|
| 153 |
+
</label>
|
| 154 |
+
<input type="text" id="subfolder-path" name="subfolder_path"
|
| 155 |
+
placeholder="e.g., data/raw_files or just a_folder"
|
| 156 |
+
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">
|
| 157 |
+
<p class="text-xs text-secondary-var mt-1">Files will be placed in `{{ user.username if user.username else 'current_user' }}/{{ repo_slug }}/<destination>`.</p>
|
| 158 |
+
</div>
|
| 159 |
+
<div class="space-y-3 mb-6">
|
| 160 |
+
<div class="flex items-start">
|
| 161 |
+
<input type="radio" id="commit-main" name="branch-option" value="main" checked
|
| 162 |
+
class="mt-1 mr-2 text-link-var focus:ring-link-var border-color-var">
|
| 163 |
+
<label for="commit-main" class="text-sm text-color-var">
|
| 164 |
+
<span class="material-symbols-rounded text-base mr-1 align-bottom">subdirectory_arrow_right</span>
|
| 165 |
+
Commit directly to the <span class="font-semibold">main</span> branch.
|
| 166 |
+
</label>
|
| 167 |
+
</div>
|
| 168 |
+
|
| 169 |
+
<div class="flex items-start">
|
| 170 |
+
<input type="radio" id="commit-new-branch" name="branch-option" value="new"
|
| 171 |
+
class="mt-1 mr-2 text-link-var focus:ring-link-var border-color-var">
|
| 172 |
+
<label for="commit-new-branch" class="text-sm text-color-var">
|
| 173 |
+
Commit to a <span class="font-semibold">new branch</span> and start a pull request.
|
| 174 |
+
</label>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<div id="new-branch-input" class="mb-6 hidden">
|
| 179 |
+
<input type="text" id="new-branch-name" placeholder="Branch name (ex: add-upload-files)"
|
| 180 |
+
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">
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
<button type="submit" id="commit-button"
|
| 185 |
+
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"
|
| 186 |
+
disabled>
|
| 187 |
+
<span id="loader" class="loader mr-2 hidden"></span>
|
| 188 |
+
<span id="button-text">Commit changes</span>
|
| 189 |
+
</button>
|
| 190 |
+
</form>
|
| 191 |
+
|
| 192 |
+
</div>
|
| 193 |
+
|
| 194 |
+
<footer class="mt-12 py-8 border-t border-color-var text-sm text-secondary-var bg-header-var">
|
| 195 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 196 |
+
<p class="text-center sm:text-left">
|
| 197 |
+
© 2024 GitForge (Mindus Framework).
|
| 198 |
+
<span class="hidden sm:inline">All rights reserved.</span>
|
| 199 |
+
</p>
|
| 200 |
+
<p class="text-center sm:text-right mt-2 sm:mt-0 space-x-3">
|
| 201 |
+
<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>
|
| 202 |
+
</p>
|
| 203 |
+
</div>
|
| 204 |
+
</footer>
|
| 205 |
+
|
| 206 |
+
<script>
|
| 207 |
+
// --- GLOBAL VARIABLES AND SETUP ---
|
| 208 |
+
const dropArea = document.getElementById('drop-area');
|
| 209 |
+
const fileUpload = document.getElementById('file-upload');
|
| 210 |
+
const fileListContainer = document.getElementById('file-list');
|
| 211 |
+
const commitForm = document.getElementById('commit-form');
|
| 212 |
+
const commitButton = document.getElementById('commit-button');
|
| 213 |
+
const buttonText = document.getElementById('button-text');
|
| 214 |
+
const loader = document.getElementById('loader');
|
| 215 |
+
const fileCountSpan = document.getElementById('file-count');
|
| 216 |
+
const fileListHeader = document.getElementById('file-list-header');
|
| 217 |
+
|
| 218 |
+
// VARIABLES INJECTED BY JINJA2 FROM THE SERVER
|
| 219 |
+
const REPO_SLUG = "{{ repo_slug }}"; // Key for the API
|
| 220 |
+
const USER_SLUG = "{{ user.username if user.username else 'current_user' }}";
|
| 221 |
+
|
| 222 |
+
// File list state: contains the actual File Object
|
| 223 |
+
let pendingFiles = [];
|
| 224 |
+
|
| 225 |
+
// --- Interface Functions ---
|
| 226 |
+
|
| 227 |
+
/** Displays an alert message (success or error). */
|
| 228 |
+
const displayFlashMessage = (message, type = 'error') => {
|
| 229 |
+
const container = document.getElementById('flash-container');
|
| 230 |
+
const color = type === 'success' ? 'bg-green-100 border-green-400 text-green-700' : 'bg-red-100 border-red-400 text-red-700';
|
| 231 |
+
container.innerHTML = `
|
| 232 |
+
<div class="p-4 border rounded-md ${color}" role="alert">
|
| 233 |
+
<p class="font-bold">${type.toUpperCase()}:</p>
|
| 234 |
+
<p>${message}</p>
|
| 235 |
+
</div>
|
| 236 |
+
`;
|
| 237 |
+
// Remove the message after 5 seconds
|
| 238 |
+
setTimeout(() => container.innerHTML = '', 5000);
|
| 239 |
+
};
|
| 240 |
+
|
| 241 |
+
/** Formats the size in bytes to a readable string. */
|
| 242 |
+
const formatBytes = (bytes, decimals = 2) => {
|
| 243 |
+
if (bytes === 0) return '0 Bytes';
|
| 244 |
+
const k = 1024;
|
| 245 |
+
const dm = decimals < 0 ? 0 : decimals;
|
| 246 |
+
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
| 247 |
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
| 248 |
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
| 249 |
+
};
|
| 250 |
+
|
| 251 |
+
/** Removes a file from the pending list and updates the display. */
|
| 252 |
+
const removeFile = (e) => {
|
| 253 |
+
e.preventDefault();
|
| 254 |
+
const button = e.currentTarget;
|
| 255 |
+
const fileId = button.getAttribute('data-file-id');
|
| 256 |
+
|
| 257 |
+
pendingFiles = pendingFiles.filter(file => file.id !== fileId);
|
| 258 |
+
|
| 259 |
+
// Remove the HTML element
|
| 260 |
+
document.getElementById(fileId).remove();
|
| 261 |
+
|
| 262 |
+
renderFileList(); // Update the counter and button state
|
| 263 |
+
};
|
| 264 |
+
|
| 265 |
+
/** Updates the file list display and the commit button state. */
|
| 266 |
+
const renderFileList = () => {
|
| 267 |
+
fileListContainer.innerHTML = '';
|
| 268 |
+
fileCountSpan.textContent = pendingFiles.length;
|
| 269 |
+
|
| 270 |
+
if (pendingFiles.length > 0) {
|
| 271 |
+
commitButton.removeAttribute('disabled');
|
| 272 |
+
fileListHeader.classList.remove('hidden');
|
| 273 |
+
} else {
|
| 274 |
+
commitButton.setAttribute('disabled', 'disabled');
|
| 275 |
+
fileListHeader.classList.add('hidden');
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
pendingFiles.forEach(file => {
|
| 279 |
+
const fileItem = document.createElement('div');
|
| 280 |
+
fileItem.id = file.id;
|
| 281 |
+
fileItem.className = 'file-item flex justify-between items-center p-4 border border-color-var rounded-lg bg-card-var shadow-sm';
|
| 282 |
+
fileItem.innerHTML = `
|
| 283 |
+
<div class="flex items-center text-sm font-medium truncate">
|
| 284 |
+
<span class="material-symbols-rounded text-lg mr-3 text-secondary-var">description</span>
|
| 285 |
+
<span class="text-color-var">${file.name}</span>
|
| 286 |
+
<span class="text-secondary-var ml-3 text-xs">(${formatBytes(file.fileObject.size)})</span>
|
| 287 |
+
</div>
|
| 288 |
+
<button data-file-id="${file.id}" class="remove-file-btn text-secondary-var hover:text-red-600 transition flex-shrink-0">
|
| 289 |
+
<span class="material-symbols-rounded text-lg">close</span>
|
| 290 |
+
</button>
|
| 291 |
+
`;
|
| 292 |
+
fileListContainer.appendChild(fileItem);
|
| 293 |
+
});
|
| 294 |
+
|
| 295 |
+
// Re-attach removal listeners
|
| 296 |
+
document.querySelectorAll('.remove-file-btn').forEach(button => {
|
| 297 |
+
button.addEventListener('click', removeFile);
|
| 298 |
+
});
|
| 299 |
+
};
|
| 300 |
+
|
| 301 |
+
/** Adds validated files to the pending list. */
|
| 302 |
+
const addFiles = (files) => {
|
| 303 |
+
const filesToAdd = Array.from(files).slice(0, 50 - pendingFiles.length); // Limit to 50
|
| 304 |
+
|
| 305 |
+
if (filesToAdd.length === 0 && files.length > 0) {
|
| 306 |
+
displayFlashMessage("File limit of 50 reached. Please commit or remove files.");
|
| 307 |
+
return;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
filesToAdd.forEach(file => {
|
| 311 |
+
// Create a unique ID for tracking
|
| 312 |
+
const fileId = 'file-' + Date.now() + '-' + Math.random().toString(36).substring(2, 9);
|
| 313 |
+
|
| 314 |
+
// Duplicate check (by name)
|
| 315 |
+
if (pendingFiles.some(f => f.name === file.name)) {
|
| 316 |
+
displayFlashMessage(`File "${file.name}" has already been selected.`, 'error');
|
| 317 |
+
return;
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
// Add to the pending list
|
| 321 |
+
pendingFiles.push({
|
| 322 |
+
id: fileId,
|
| 323 |
+
name: file.name,
|
| 324 |
+
fileObject: file
|
| 325 |
+
});
|
| 326 |
+
});
|
| 327 |
+
|
| 328 |
+
renderFileList();
|
| 329 |
+
|
| 330 |
+
if (filesToAdd.length < files.length) {
|
| 331 |
+
displayFlashMessage("Warning: The limit of 50 pending files has been reached. The remaining files were not added.", 'error');
|
| 332 |
+
}
|
| 333 |
+
};
|
| 334 |
+
|
| 335 |
+
// --- Drag and Drop Handling ---
|
| 336 |
+
|
| 337 |
+
// Prevent default behavior (opening the file)
|
| 338 |
+
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 339 |
+
dropArea.addEventListener(eventName, e => {
|
| 340 |
+
e.preventDefault();
|
| 341 |
+
e.stopPropagation();
|
| 342 |
+
}, false);
|
| 343 |
+
});
|
| 344 |
+
|
| 345 |
+
// Highlight the drop zone
|
| 346 |
+
['dragenter', 'dragover'].forEach(eventName => {
|
| 347 |
+
dropArea.addEventListener(eventName, () => dropArea.classList.add('drag-over'), false);
|
| 348 |
+
});
|
| 349 |
+
|
| 350 |
+
// Remove the highlight
|
| 351 |
+
['dragleave', 'drop'].forEach(eventName => {
|
| 352 |
+
dropArea.addEventListener(eventName, () => dropArea.classList.remove('drag-over'), false);
|
| 353 |
+
});
|
| 354 |
+
|
| 355 |
+
// Handle file drop
|
| 356 |
+
dropArea.addEventListener('drop', handleDrop, false);
|
| 357 |
+
|
| 358 |
+
function handleDrop(e) {
|
| 359 |
+
const dt = e.dataTransfer;
|
| 360 |
+
const files = dt.files;
|
| 361 |
+
addFiles(files);
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
// Handle adding via the "choose your files" click
|
| 365 |
+
fileUpload.addEventListener('change', (e) => {
|
| 366 |
+
addFiles(e.target.files);
|
| 367 |
+
// Reset the input to allow re-selecting the same file
|
| 368 |
+
e.target.value = null;
|
| 369 |
+
});
|
| 370 |
+
|
| 371 |
+
// --- Submission Logic (Commit) ---
|
| 372 |
+
|
| 373 |
+
/** Activates/deactivates the button loading state. */
|
| 374 |
+
const setCommitLoading = (isLoading) => {
|
| 375 |
+
commitButton.disabled = isLoading || pendingFiles.length === 0;
|
| 376 |
+
loader.classList.toggle('hidden', !isLoading);
|
| 377 |
+
buttonText.textContent = isLoading ? 'Committing...' : 'Commit changes';
|
| 378 |
+
};
|
| 379 |
+
|
| 380 |
+
// Handle displaying the new branch field
|
| 381 |
+
document.querySelectorAll('input[name="branch-option"]').forEach(radio => {
|
| 382 |
+
radio.addEventListener('change', () => {
|
| 383 |
+
const newBranchInput = document.getElementById('new-branch-input');
|
| 384 |
+
const newBranchName = document.getElementById('new-branch-name');
|
| 385 |
+
if (radio.value === 'new') {
|
| 386 |
+
newBranchInput.classList.remove('hidden');
|
| 387 |
+
newBranchName.setAttribute('required', 'required');
|
| 388 |
+
} else {
|
| 389 |
+
newBranchInput.classList.add('hidden');
|
| 390 |
+
newBranchName.removeAttribute('required');
|
| 391 |
+
}
|
| 392 |
+
});
|
| 393 |
+
});
|
| 394 |
+
|
| 395 |
+
|
| 396 |
+
// Handle commit form submission
|
| 397 |
+
commitForm.addEventListener('submit', async (e) => {
|
| 398 |
+
e.preventDefault();
|
| 399 |
+
|
| 400 |
+
if (pendingFiles.length === 0) {
|
| 401 |
+
displayFlashMessage("Please select at least one file to upload.", 'error');
|
| 402 |
+
return;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
setCommitLoading(true);
|
| 406 |
+
|
| 407 |
+
// 1. Collect form data
|
| 408 |
+
const commitTitle = document.getElementById('commit-title').value;
|
| 409 |
+
const commitDescription = document.getElementById('commit-description').value;
|
| 410 |
+
const subfolderPath = document.getElementById('subfolder-path').value.trim(); // NEW FIELD
|
| 411 |
+
const branchOption = document.querySelector('input[name="branch-option"]:checked').value;
|
| 412 |
+
let branchName = 'main';
|
| 413 |
+
|
| 414 |
+
if (branchOption === 'new') {
|
| 415 |
+
branchName = document.getElementById('new-branch-name').value.trim();
|
| 416 |
+
if (!branchName) {
|
| 417 |
+
displayFlashMessage("Please provide a name for the new branch.", 'error');
|
| 418 |
+
setCommitLoading(false);
|
| 419 |
+
return;
|
| 420 |
+
}
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
// 2. Build the FormData object
|
| 424 |
+
const formData = new FormData();
|
| 425 |
+
formData.append('commit_title', commitTitle);
|
| 426 |
+
formData.append('commit_description', commitDescription);
|
| 427 |
+
formData.append('branch_name', branchName);
|
| 428 |
+
|
| 429 |
+
// NEW: Add the optional subfolder path
|
| 430 |
+
if (subfolderPath) {
|
| 431 |
+
formData.append('subfolder_path', subfolderPath);
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
// Add all files
|
| 435 |
+
pendingFiles.forEach(file => {
|
| 436 |
+
formData.append('files', file.fileObject, file.name);
|
| 437 |
+
});
|
| 438 |
+
|
| 439 |
+
// 3. Send the API request
|
| 440 |
+
try {
|
| 441 |
+
// Use the injected REPO_SLUG
|
| 442 |
+
const response = await fetch(`/api/files/${REPO_SLUG}/upload`, {
|
| 443 |
+
method: 'POST',
|
| 444 |
+
// DO NOT set 'Content-Type': 'multipart/form-data', the browser handles the boundary
|
| 445 |
+
body: formData
|
| 446 |
+
});
|
| 447 |
+
|
| 448 |
+
const result = await response.json();
|
| 449 |
+
|
| 450 |
+
if (response.ok) {
|
| 451 |
+
// Success: Display success message and redirect
|
| 452 |
+
displayFlashMessage(result.message || `Files added and committed successfully to repository ${REPO_SLUG}!`, 'success');
|
| 453 |
+
// Redirect to the repository page
|
| 454 |
+
setTimeout(() => {
|
| 455 |
+
window.location.href = `/mindus/nexus/repo_files?repo_slug=${REPO_SLUG}`;
|
| 456 |
+
}, 1000);
|
| 457 |
+
} else {
|
| 458 |
+
// API failure
|
| 459 |
+
const errorMessage = result.message || "Unknown error during commit.";
|
| 460 |
+
displayFlashMessage(errorMessage, 'error');
|
| 461 |
+
}
|
| 462 |
+
} catch (error) {
|
| 463 |
+
console.error('Network or internal error:', error);
|
| 464 |
+
displayFlashMessage("Network or internal error during commit. Please try again.", 'error');
|
| 465 |
+
} finally {
|
| 466 |
+
setCommitLoading(false); // Stop the animation even on error
|
| 467 |
+
}
|
| 468 |
+
});
|
| 469 |
+
|
| 470 |
+
// Initialization
|
| 471 |
+
renderFileList(); // Display the empty list on startup (no files by default)
|
| 472 |
+
</script>
|
| 473 |
+
</body>
|
| 474 |
+
</html>
|