fix: restauration du conteneur de chat, de la zone de texte et du sélecteur multi-agents par requête
Build and Push Docker Image / build-and-push (push) Successful in 43s
Build and Push Docker Image / build-and-push (push) Successful in 43s
This commit is contained in:
1 parent
efbecada77
commit
e322435bd8
1 file changed
+19
-35
+19
-35
@@ -23,26 +23,6 @@
|
|||||||
|
|
||||||
<div id="app" class="flex w-full h-full relative bg-aethas-dark">
|
<div id="app" class="flex w-full h-full relative bg-aethas-dark">
|
||||||
|
|
||||||
<!-- MODAL PARAMÈTRES (Sécurité) -->
|
|
||||||
<div v-if="isSettingsModalOpen" class="fixed inset-0 bg-black/80 z-[100] flex items-center justify-center p-4">
|
|
||||||
<div class="bg-aethas-panel border border-gray-600 rounded-2xl w-full max-w-md overflow-hidden shadow-[0_0_30px_rgba(0,0,0,0.7)]">
|
|
||||||
<div class="p-4 border-b border-gray-700 flex justify-between items-center bg-gray-800/50">
|
|
||||||
<h2 class="text-lg font-bold text-white flex items-center gap-2"><i data-lucide="settings" class="w-5 h-5 text-aethas-cyan"></i> Paramètres</h2>
|
|
||||||
<button @click="closeSettings" class="text-gray-400 hover:text-white"><i data-lucide="x" class="w-5 h-5"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="p-6 space-y-4">
|
|
||||||
<h3 class="text-sm font-semibold text-aethas-cyan uppercase tracking-wider mb-2">Sécurité du compte</h3>
|
|
||||||
<div v-if="settingsMessage" :class="['p-3 rounded text-sm text-center', settingsMessage.includes('succès') ? 'bg-green-900/50 text-green-200 border border-green-500' : 'bg-red-900/50 text-red-200 border border-red-500']">{{ settingsMessage }}</div>
|
|
||||||
<div><label class="block text-sm text-gray-300 mb-1">Ancien mot de passe</label><input v-model="passForm.old" type="password" class="w-full bg-aethas-dark border border-gray-600 rounded-lg px-4 py-2 focus:border-aethas-cyan focus:outline-none"></div>
|
|
||||||
<div><label class="block text-sm text-gray-300 mb-1">Nouveau mot de passe</label><input v-model="passForm.new" type="password" class="w-full bg-aethas-dark border border-gray-600 rounded-lg px-4 py-2 focus:border-aethas-cyan focus:outline-none"></div>
|
|
||||||
<div><label class="block text-sm text-gray-300 mb-1">Confirmer</label><input v-model="passForm.confirm" type="password" class="w-full bg-aethas-dark border border-gray-600 rounded-lg px-4 py-2 focus:border-aethas-cyan focus:outline-none"></div>
|
|
||||||
<button @click="changePassword" :disabled="isSavingSettings" class="w-full mt-4 bg-gray-700 hover:bg-gray-600 text-white font-semibold py-2.5 px-4 rounded-lg transition-colors border border-gray-500 disabled:opacity-50">
|
|
||||||
<span v-if="isSavingSettings">Mise à jour...</span><span v-else>Modifier</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- BARRE LATÉRALE -->
|
<!-- BARRE LATÉRALE -->
|
||||||
<div :class="['transition-all duration-300 flex-shrink-0 relative z-50 flex flex-col', isSidebarOpen ? 'w-72' : 'w-0']">
|
<div :class="['transition-all duration-300 flex-shrink-0 relative z-50 flex flex-col', isSidebarOpen ? 'w-72' : 'w-0']">
|
||||||
<aside :class="['absolute top-0 left-0 h-full w-72 bg-aethas-panel border-r border-gray-700 flex flex-col transition-transform duration-300', isSidebarOpen ? 'translate-x-0' : '-translate-x-full']">
|
<aside :class="['absolute top-0 left-0 h-full w-72 bg-aethas-panel border-r border-gray-700 flex flex-col transition-transform duration-300', isSidebarOpen ? 'translate-x-0' : '-translate-x-full']">
|
||||||
@@ -63,7 +43,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 overflow-y-auto p-4 space-y-6">
|
<div class="flex-1 overflow-y-auto p-4 space-y-6 custom-scrollbar">
|
||||||
<div v-if="pinnedProjects.length > 0">
|
<div v-if="pinnedProjects.length > 0">
|
||||||
<h3 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">Épinglés</h3>
|
<h3 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-2">Épinglés</h3>
|
||||||
<ul class="space-y-1">
|
<ul class="space-y-1">
|
||||||
@@ -84,14 +64,14 @@
|
|||||||
<div class="hidden group-hover:flex items-center gap-1 bg-gray-800 pl-2 rounded">
|
<div class="hidden group-hover:flex items-center gap-1 bg-gray-800 pl-2 rounded">
|
||||||
<button @click.stop="renameProject(project)" class="text-gray-400 hover:text-aethas-cyan"><i data-lucide="edit-2" class="w-3.5 h-3.5"></i></button>
|
<button @click.stop="renameProject(project)" class="text-gray-400 hover:text-aethas-cyan"><i data-lucide="edit-2" class="w-3.5 h-3.5"></i></button>
|
||||||
<button @click.stop="togglePin(project.id)" class="text-gray-400 hover:text-white"><i data-lucide="pin" class="w-3.5 h-3.5"></i></button>
|
<button @click.stop="togglePin(project.id)" class="text-gray-400 hover:text-white"><i data-lucide="pin" class="w-3.5 h-3.5"></i></button>
|
||||||
<button @click.stop="deleteProject(project.id)" class="text-gray-400 hover:text-red-400"><i data-lucide="trash-2" class="w-3.5 h-3.5"></i></button>
|
<button @click.stop="deleteProject(project.id)" class="text-red-500 hover:text-red-400"><i data-lucide="trash-2" class="w-3.5 h-3.5"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- NOUVEAU : ENCART FINANCIER SOUS LE MENU RÉCENTS -->
|
<!-- ENCART FINANCIER -->
|
||||||
<div class="px-4 pb-2 border-b border-gray-700">
|
<div class="px-4 pb-2 border-b border-gray-700">
|
||||||
<div v-if="financesList.length > 0" class="flex flex-col gap-1.5 mb-2">
|
<div v-if="financesList.length > 0" class="flex flex-col gap-1.5 mb-2">
|
||||||
<div v-for="fin in financesList" :key="fin.provider" class="text-[10px] bg-gray-800/80 border border-gray-600/50 px-2 py-1.5 rounded flex justify-between items-center shadow-inner">
|
<div v-for="fin in financesList" :key="fin.provider" class="text-[10px] bg-gray-800/80 border border-gray-600/50 px-2 py-1.5 rounded flex justify-between items-center shadow-inner">
|
||||||
@@ -137,7 +117,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- VUE : CONFIGURATION (Par Niveaux) -->
|
<!-- VUE : CONFIGURATION (Par Niveaux) -->
|
||||||
<div v-if="activeView === 'settings'" class="flex-1 overflow-y-auto p-4 md:p-8">
|
<div v-if="activeView === 'settings'" class="flex-1 overflow-y-auto p-4 md:p-8 custom-scrollbar">
|
||||||
<div class="max-w-4xl mx-auto space-y-6">
|
<div class="max-w-4xl mx-auto space-y-6">
|
||||||
<h2 class="text-2xl font-bold text-white flex items-center gap-2 border-b border-gray-700 pb-4"><i data-lucide="settings-2" class="w-6 h-6 text-aethas-cyan"></i> Configuration Système</h2>
|
<h2 class="text-2xl font-bold text-white flex items-center gap-2 border-b border-gray-700 pb-4"><i data-lucide="settings-2" class="w-6 h-6 text-aethas-cyan"></i> Configuration Système</h2>
|
||||||
|
|
||||||
@@ -198,7 +178,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- VUE : MODÈLES ET FINANCES (Admin Only) -->
|
<!-- VUE : MODÈLES ET FINANCES (Admin Only) -->
|
||||||
<div v-if="activeView === 'models' && user.is_admin" class="flex-1 overflow-y-auto p-4 md:p-8 space-y-6">
|
<div v-if="activeView === 'models' && user.is_admin" class="flex-1 overflow-y-auto p-4 md:p-8 space-y-6 custom-scrollbar">
|
||||||
<div class="flex justify-between items-end border-b border-gray-700 pb-4">
|
<div class="flex justify-between items-end border-b border-gray-700 pb-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="text-2xl font-bold text-white flex items-center gap-2"><i data-lucide="cpu" class="w-6 h-6 text-aethas-cyan"></i> Modèles & Finances API</h2>
|
<h2 class="text-2xl font-bold text-white flex items-center gap-2"><i data-lucide="cpu" class="w-6 h-6 text-aethas-cyan"></i> Modèles & Finances API</h2>
|
||||||
@@ -253,14 +233,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- VUE : CHAT PAR DÉFAUT -->
|
<!-- VUE : CHAT (Toujours accessible et affichée par défaut) -->
|
||||||
<template v-if="activeView === 'chat'">
|
<div v-show="activeView === 'chat'" class="flex-1 flex flex-col min-h-0">
|
||||||
<div v-if="!activeProject" class="flex-1 overflow-y-auto p-4 flex flex-col items-center justify-center">
|
<div v-if="!activeProject" class="flex-1 overflow-y-auto p-4 flex flex-col items-center justify-center">
|
||||||
<img src="/assets/logo.png" class="w-24 h-24 mb-6 rounded-full border-2 border-aethas-cyan shadow-[0_0_15px_rgba(6,182,212,0.5)]">
|
<img src="/assets/logo.png" class="w-24 h-24 mb-6 rounded-full border-2 border-aethas-cyan shadow-[0_0_15px_rgba(6,182,212,0.5)]">
|
||||||
<h2 class="text-2xl font-bold text-gray-200 mb-2">Comment puis-je vous aider aujourd'hui ?</h2>
|
<h2 class="text-2xl font-bold text-gray-200 mb-2">Comment puis-je vous aider aujourd'hui ?</h2>
|
||||||
|
<p class="text-gray-500 text-sm">Sélectionnez ou créez un projet dans la barre latérale.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else class="flex-1 overflow-y-auto p-4 md:p-8 space-y-6 flex flex-col custom-scrollbar" id="chat-container">
|
<template v-else>
|
||||||
|
<div class="flex-1 overflow-y-auto p-4 md:p-8 space-y-6 flex flex-col custom-scrollbar" id="chat-container">
|
||||||
<div v-if="messages.length === 0" class="flex-1 flex items-center justify-center text-gray-500 italic">Démarrez la conversation ci-dessous.</div>
|
<div v-if="messages.length === 0" class="flex-1 flex items-center justify-center text-gray-500 italic">Démarrez la conversation ci-dessous.</div>
|
||||||
|
|
||||||
<div v-for="msg in messages" :key="msg.id" :class="['max-w-4xl rounded-2xl p-4', msg.role === 'user' ? 'bg-gray-800 ml-auto border border-gray-700' : 'bg-aethas-panel mr-auto border border-aethas-cyan/30 flex flex-col']">
|
<div v-for="msg in messages" :key="msg.id" :class="['max-w-4xl rounded-2xl p-4', msg.role === 'user' ? 'bg-gray-800 ml-auto border border-gray-700' : 'bg-aethas-panel mr-auto border border-aethas-cyan/30 flex flex-col']">
|
||||||
@@ -297,8 +279,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ZONE SÉLECTION MODÈLES PAR REQUÊTE -->
|
<!-- ZONE SÉLECTION MODÈLES PAR REQUÊTE & PROMPT -->
|
||||||
<div v-if="activeProject" class="p-4 md:p-6 w-full max-w-5xl mx-auto space-y-2">
|
<div class="p-4 md:p-6 w-full max-w-5xl mx-auto space-y-2 flex-shrink-0">
|
||||||
<div class="bg-gray-800/80 border border-gray-700 rounded-xl p-3 flex flex-wrap gap-4 items-center text-xs shadow-md">
|
<div class="bg-gray-800/80 border border-gray-700 rounded-xl p-3 flex flex-wrap gap-4 items-center text-xs shadow-md">
|
||||||
<div class="flex items-center gap-2 flex-1 min-w-[200px]">
|
<div class="flex items-center gap-2 flex-1 min-w-[200px]">
|
||||||
<span class="text-aethas-cyan font-semibold w-20"><i data-lucide="users" class="w-3 h-3 inline"></i> Travailleurs:</span>
|
<span class="text-aethas-cyan font-semibold w-20"><i data-lucide="users" class="w-3 h-3 inline"></i> Travailleurs:</span>
|
||||||
@@ -333,6 +315,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -405,12 +388,13 @@
|
|||||||
if(res.ok) {
|
if(res.ok) {
|
||||||
await fetchModelsInfo();
|
await fetchModelsInfo();
|
||||||
await fetchFinances();
|
await fetchFinances();
|
||||||
alert("Synchronisation terminée !");
|
alert("Synchronisation réussie !");
|
||||||
} else {
|
} else {
|
||||||
const err = await res.json();
|
let errText = await res.text();
|
||||||
alert("Erreur: " + err.detail);
|
try { const errObj = JSON.parse(errText); errText = errObj.detail || errText; } catch(e){}
|
||||||
|
alert("Erreur retournée par le serveur : " + errText);
|
||||||
}
|
}
|
||||||
} catch(e) { alert("Erreur réseau de synchronisation."); }
|
} catch(e) { alert("Erreur réseau: impossible de contacter le serveur (" + e.message + ")."); }
|
||||||
isSyncing.value = false;
|
isSyncing.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -448,7 +432,7 @@
|
|||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
if (Array.isArray(data)) messages.value = data;
|
if (Array.isArray(data)) messages.value = data;
|
||||||
await fetchFinances(); // MAJ du budget sous le nom
|
await fetchFinances();
|
||||||
} else {
|
} else {
|
||||||
const err = await response.json(); alert("Erreur API IA : " + err.detail);
|
const err = await response.json(); alert("Erreur API IA : " + err.detail);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user