npm run build fixed

This commit is contained in:
Orionis312050 committed 2026-04-16 17:43:02 +02:00
1 parent 76f963d49e
commit 4f50cc297e
8 files changed
+21 -12

No files matched your search

+4 -6
View File
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
import { BrowserRouter as Router, Routes, Route, Navigate, useLocation } from 'react-router-dom';
import { useState, useEffect } from 'react';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import HomeView from './views/HomeView';
import ServiceView from './views/ServiceView';
import LoginView from './views/LoginView';
@@ -14,7 +14,7 @@ function AppContent() {
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
const [isChatOpen, setIsChatOpen] = useState(false);
const { user, logout } = useAuth();
const location = useLocation();
// Gestion du thème
const [theme, setTheme] = useState<'dark' | 'light'>(
@@ -33,9 +33,7 @@ function AppContent() {
return () => window.removeEventListener('analyze-log', handleOpenAI);
}, []);
// Détection du service ID dans l'URL pour le contexte IA
const serviceIdMatch = location.pathname.match(/\/service\/(\d+)/);
const currentServiceId = serviceIdMatch ? parseInt(serviceIdMatch[1]) : null;
// Détection du service ID dans l'URL pour le contexte IA (omis car inutilisé)
return (
<div className={`app-container ${theme}`}>
+1 -1
View File
@@ -184,7 +184,7 @@ export default function AIChatSidebar({ isOpen, onClose, currentService }: AICha
if (targetConv.title === "Nouvelle discussion") {
fetchConversations();
// et on met à jour la reférence locale pour ne pas avoir de glitch visuel
setCurrentConv(prev => prev ? {...prev, title: text.substring(0, 30)} : prev);
setCurrentConv((prev: Conversation | null) => prev ? {...prev, title: text.substring(0, 30)} : prev);
}
} else if (data.error) {
setIsTyping(false);
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { useEffect, useState, useRef } from 'react';
import { useEffect, useState, useRef } from 'react';
import { io, Socket } from 'socket.io-client';
import { Download, Sparkles } from 'lucide-react';
import type { LogService } from '../types';
-1
View File
@@ -1,4 +1,3 @@
import React from 'react';
import { Navigate, Outlet } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
+12
View File
@@ -13,3 +13,15 @@ export interface GlobalSettings {
ollamaModel: string;
searxngUrl: string;
}
export interface Message {
role: 'user' | 'assistant' | 'system';
content: string;
}
export interface Conversation {
id: number;
title: string;
updatedAt: string;
messages?: Message[];
}
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { PlusCircle, Clock, Server, HardDrive, LayoutGrid } from 'lucide-react';
import AddServiceModal from '../components/AddServiceModal';
+1 -1
View File
@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import { useNavigate, Link } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
import { LogIn, UserPlus, Mail, Lock, ShieldCheck } from 'lucide-react';
import { LogIn, Mail, Lock, ShieldCheck } from 'lucide-react';
export default function LoginView() {
const [email, setEmail] = useState('');
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { ArrowLeft, Server, HardDrive, Trash2 } from 'lucide-react';
import type { LogService } from '../types';