From 172ddb70012c42b6fabea7ca50b8726267a47869 Mon Sep 17 00:00:00 2001 From: Ida Dittrich Date: Fri, 22 Aug 2025 13:09:24 +0200 Subject: [PATCH] fixed building app --- src/auth/authProvider.tsx | 5 ++- .../Connections/ConnectionEditModal.tsx | 4 +-- .../Connections/ConnectionsErrorDisplay.tsx | 2 +- .../Connections/connectionsInterfaces.ts | 7 ++-- .../Connections/connectionsLogic.tsx | 4 +-- .../DashboardChat/DashboardChatArea.tsx | 5 ++- .../DashboardChatAreaConnectedFiles.tsx | 2 +- .../DashboardChat/DashboardChatAreaInput.tsx | 2 +- .../DashboardChatAreaLogItem.tsx | 4 +-- .../DashboardChatAreaMessageItem.tsx | 32 ++----------------- .../DashboardChatAreaMessageList.tsx | 3 +- .../DashboardChat/FileAttachmentPopup.tsx | 16 +++------- .../DashboardChat/dashboardChatAreaTypes.ts | 13 ++++---- .../DashboardChat/useWorkflowManager.ts | 6 ++-- src/components/Mitglieder/mitgliederLogic.tsx | 6 ++-- src/components/PageManager/PageManager.tsx | 2 +- src/components/PageManager/pageConfigs.ts | 4 +-- src/components/Popup/EditForm.tsx | 2 +- src/components/Popup/ViewForm.tsx | 2 +- src/components/Prompts/promptsLogic.tsx | 2 +- src/components/Sidebar/SidebarItem.tsx | 2 +- src/hooks/useAuthentication.ts | 2 +- src/hooks/useConnections.ts | 2 +- src/hooks/usePrompts.ts | 2 +- src/hooks/useWorkflows.ts | 2 +- src/locales/fr.ts | 5 +-- src/pages/Home/Einstellungen.tsx | 2 +- src/pages/Home/Home.tsx | 6 ++-- src/pages/Register.tsx | 4 +-- vite.config.ts | 1 - 30 files changed, 55 insertions(+), 96 deletions(-) diff --git a/src/auth/authProvider.tsx b/src/auth/authProvider.tsx index 21e9754..666f2ed 100644 --- a/src/auth/authProvider.tsx +++ b/src/auth/authProvider.tsx @@ -1,8 +1,7 @@ import { AuthenticationResult, EventType, - PublicClientApplication, - InteractionStatus + PublicClientApplication } from "@azure/msal-browser"; import { msalConfig } from "./authConfig"; import { MsalProvider } from "@azure/msal-react"; @@ -15,7 +14,7 @@ import { export const AuthProvider = ({ children }: AuthProviderProps) => { const [msalInstance, setMsalInstance] = useState(null); const [isInitialized, setIsInitialized] = useState(false); - const [loginAttempted, setLoginAttempted] = useState(false); + useEffect(() => { const msalApp = new PublicClientApplication(msalConfig); diff --git a/src/components/Connections/ConnectionEditModal.tsx b/src/components/Connections/ConnectionEditModal.tsx index 789ac39..ca016dc 100644 --- a/src/components/Connections/ConnectionEditModal.tsx +++ b/src/components/Connections/ConnectionEditModal.tsx @@ -1,4 +1,4 @@ -import React from 'react'; + import { Popup, EditForm } from '../Popup'; import styles from './ConnectionEditModal.module.css'; import { ConnectionEditModalProps } from './connectionsInterfaces'; @@ -11,7 +11,7 @@ export function ConnectionEditModal({ onSave, onCancel }: ConnectionEditModalProps) { - const { t, isLoading } = useLanguage(); + const { t } = useLanguage(); if (!connection) { return null; diff --git a/src/components/Connections/ConnectionsErrorDisplay.tsx b/src/components/Connections/ConnectionsErrorDisplay.tsx index 813b51a..a4a006b 100644 --- a/src/components/Connections/ConnectionsErrorDisplay.tsx +++ b/src/components/Connections/ConnectionsErrorDisplay.tsx @@ -1,4 +1,4 @@ -import React from 'react'; + import styles from './ConnectionsErrorDisplay.module.css'; import { ConnectionsErrorDisplayProps } from './connectionsInterfaces'; import { useLanguage } from '../../contexts/LanguageContext'; diff --git a/src/components/Connections/connectionsInterfaces.ts b/src/components/Connections/connectionsInterfaces.ts index 61b85cb..1dc3da1 100644 --- a/src/components/Connections/connectionsInterfaces.ts +++ b/src/components/Connections/connectionsInterfaces.ts @@ -1,12 +1,13 @@ import { ColumnConfig } from '../FormGenerator'; import { EditFieldConfig } from '../Popup'; -// Re-export connection-related interfaces from hooks -export type { Connection, CreateConnectionData } from '../../hooks/useConnections'; - // Import React for component types import React from 'react'; +// Re-export connection-related interfaces from hooks +export type { Connection, CreateConnectionData } from '../../hooks/useConnections'; +import type { Connection } from '../../hooks/useConnections'; + // Component Props Interfaces export interface ConnectionsTableProps { connections: Connection[]; diff --git a/src/components/Connections/connectionsLogic.tsx b/src/components/Connections/connectionsLogic.tsx index 872f176..e9dbd95 100644 --- a/src/components/Connections/connectionsLogic.tsx +++ b/src/components/Connections/connectionsLogic.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import { IoIosLink, IoIosTrash } from 'react-icons/io'; import { MdModeEdit } from 'react-icons/md'; import { GoUnlink } from 'react-icons/go'; -import React from 'react'; + import { useConnections, useOAuthConnect, useDisconnect } from '../../hooks/useConnections'; import { useLanguage } from '../../contexts/LanguageContext'; @@ -24,8 +24,6 @@ export function useConnectionsLogic(): ConnectionsLogicReturn { fetchConnections, createConnection, updateConnection, - connectService, - disconnectService, deleteConnection, isLoading, error diff --git a/src/components/Dashboard/DashboardChat/DashboardChatArea.tsx b/src/components/Dashboard/DashboardChat/DashboardChatArea.tsx index 60c2fba..8be897c 100644 --- a/src/components/Dashboard/DashboardChat/DashboardChatArea.tsx +++ b/src/components/Dashboard/DashboardChat/DashboardChatArea.tsx @@ -1,6 +1,6 @@ import React, { useState } from "react"; import MessageList from "./DashboardChatAreaMessageList"; -import FilePreview from "./DashboardChatAreaFilePreview"; + import InputArea from "./DashboardChatAreaInput"; import ConnectedFiles from "./DashboardChatAreaConnectedFiles"; import { DashboardChatAreaProps } from "./dashboardChatAreaTypes"; @@ -17,9 +17,8 @@ const DashboardChatArea: React.FC = ({
{/* Top Left: Message List */}
-
diff --git a/src/components/Dashboard/DashboardChat/DashboardChatAreaConnectedFiles.tsx b/src/components/Dashboard/DashboardChat/DashboardChatAreaConnectedFiles.tsx index 6c42f80..48bbc65 100644 --- a/src/components/Dashboard/DashboardChat/DashboardChatAreaConnectedFiles.tsx +++ b/src/components/Dashboard/DashboardChat/DashboardChatAreaConnectedFiles.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useFileDownload } from '../../../hooks/useWorkflows'; + import { ConnectedFilesProps } from './dashboardChatAreaTypes'; import styles from './DashboardChatAreaStyles/DashboardChatConnectedFiles.module.css'; import { IoIosAttach } from 'react-icons/io'; diff --git a/src/components/Dashboard/DashboardChat/DashboardChatAreaInput.tsx b/src/components/Dashboard/DashboardChat/DashboardChatAreaInput.tsx index 853baf7..3f9b969 100644 --- a/src/components/Dashboard/DashboardChat/DashboardChatAreaInput.tsx +++ b/src/components/Dashboard/DashboardChat/DashboardChatAreaInput.tsx @@ -179,7 +179,7 @@ const InputArea: React.FC = ({ if (files.length > 0) { // Convert File objects to AttachedFile format const attachedFiles: AttachedFile[] = files.map((file, index) => ({ - id: Date.now() + index, // Simple ID generation + id: (Date.now() + index).toString(), // Simple ID generation name: file.name, size: file.size, type: file.type, diff --git a/src/components/Dashboard/DashboardChat/DashboardChatAreaLogItem.tsx b/src/components/Dashboard/DashboardChat/DashboardChatAreaLogItem.tsx index ee0f626..4a4213c 100644 --- a/src/components/Dashboard/DashboardChat/DashboardChatAreaLogItem.tsx +++ b/src/components/Dashboard/DashboardChat/DashboardChatAreaLogItem.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React from "react"; import { WorkflowLog } from "./dashboardChatAreaTypes"; import messageStyles from './DashboardChatAreaStyles/DashboardChatMessages.module.css'; @@ -8,7 +8,7 @@ interface LogItemProps { } const LogItem: React.FC = ({ log }) => { - const [showDetails, setShowDetails] = useState(false); + // Format timestamp with robust parsing (same logic as MessageList) const formatTimestamp = (timestamp: any) => { diff --git a/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageItem.tsx b/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageItem.tsx index f868c14..cc9923f 100644 --- a/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageItem.tsx +++ b/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageItem.tsx @@ -1,14 +1,12 @@ import React from "react"; -import { useFileDownload } from "../../../hooks/useWorkflows"; import { Message, Document } from "./dashboardChatAreaTypes"; import messageStyles from './DashboardChatAreaStyles/DashboardChatMessages.module.css'; -import { FaDownload, FaEye } from "react-icons/fa"; + interface MessageItemProps { message: Message; index: number; - onFilePreview?: (file: any) => void; } const formatFileSize = (bytes?: number) => { @@ -19,40 +17,16 @@ const formatFileSize = (bytes?: number) => { }; -const MessageItem: React.FC = ({ message, onFilePreview }) => { - const { downloadFile, isDownloading } = useFileDownload(); +const MessageItem: React.FC = ({ message }) => { const handleDocumentClick = (doc: Document) => { const link = doc.downloadUrl || doc.url; if (link) window.open(link, '_blank'); }; - const handlePreview = (doc: Document, e: React.MouseEvent) => { - e.stopPropagation(); - const fileId = doc.fileId || parseInt(doc.id || '0'); - if (!fileId || isNaN(fileId)) return; - - if (onFilePreview) { - onFilePreview({ - id: fileId.toString(), - name: doc.name, - mimeType: doc.type || 'application/octet-stream', - size: doc.size, - fileId - }); - } - }; - const handleDownload = async (doc: Document, e: React.MouseEvent) => { - e.stopPropagation(); - const fileId = doc.fileId || parseInt(doc.id || '0'); - if (!fileId) return; - - const fileName = doc.ext ? `${doc.name}.${doc.ext}` : doc.name; - await downloadFile(fileId, fileName); - }; - const hasDocuments = message.documents?.length > 0; + const hasDocuments = message.documents && message.documents.length > 0; const formatTimestamp = (ts?: string) => { if (!ts) return ''; diff --git a/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageList.tsx b/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageList.tsx index f26e04f..46a72a6 100644 --- a/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageList.tsx +++ b/src/components/Dashboard/DashboardChat/DashboardChatAreaMessageList.tsx @@ -8,7 +8,7 @@ import messageStyles from './DashboardChatAreaStyles/DashboardChatMessages.modul import { IoIosArrowDown, IoIosChatbubbles } from 'react-icons/io'; import { useLanguage } from '../../../contexts/LanguageContext'; -const MessageList: React.FC = ({ workflowState, onFilePreview }) => { +const MessageList: React.FC = ({ workflowState }) => { const { t } = useLanguage(); const { request } = useApiRequest(); const [messages, setMessages] = React.useState([]); @@ -140,7 +140,6 @@ const MessageList: React.FC = ({ workflowState, onFilePreview key={`message-${item.item.id}`} message={item.item} index={index} - onFilePreview={onFilePreview} /> ); } else if (item.type === 'log') { diff --git a/src/components/Dashboard/DashboardChat/FileAttachmentPopup.tsx b/src/components/Dashboard/DashboardChat/FileAttachmentPopup.tsx index 0b7f89c..6a5e80d 100644 --- a/src/components/Dashboard/DashboardChat/FileAttachmentPopup.tsx +++ b/src/components/Dashboard/DashboardChat/FileAttachmentPopup.tsx @@ -1,12 +1,8 @@ -import React, { useState, useRef, useEffect } from 'react'; +import React, { useState, useRef } from 'react'; import { useUserFiles, UserFile } from '../../../hooks/useFiles'; -import DateienAll from '../../../Dateien/DateienAll'; -import DateienShared from '../../../Dateien/DateienShared'; -import DateienCreated from '../../../Dateien/DateienCreated'; -import DateienUploads from '../../../Dateien/DateienUploads'; interface AttachedFile { - id: number; + id: string; name: string; size: number; type: string; @@ -67,7 +63,7 @@ const FileAttachmentPopup: React.FC = ({ // Create file objects with data for preview const uploadedFiles: AttachedFile[] = files.map((file, index) => { const fileObj: AttachedFile = { - id: Date.now() + index, + id: (Date.now() + index).toString(), name: file.name, size: file.size, type: file.type, @@ -107,9 +103,7 @@ const FileAttachmentPopup: React.FC = ({ }); }; - const isFileSelected = (fileId: number) => { - return selectedFiles.some(f => f.id === fileId); - }; + const handleConfirm = () => { onFilesSelected(selectedFiles); @@ -153,7 +147,7 @@ const FileAttachmentPopup: React.FC = ({ } }); - const isFileSelected = (fileId: number) => { + const isFileSelected = (fileId: string) => { return selectedFiles.some(f => f.id === fileId); }; diff --git a/src/components/Dashboard/DashboardChat/dashboardChatAreaTypes.ts b/src/components/Dashboard/DashboardChat/dashboardChatAreaTypes.ts index 60ba0df..3a3c228 100644 --- a/src/components/Dashboard/DashboardChat/dashboardChatAreaTypes.ts +++ b/src/components/Dashboard/DashboardChat/dashboardChatAreaTypes.ts @@ -52,7 +52,7 @@ export interface WorkflowMessage { sequenceNr: number; publishedAt: string; timestamp?: string; // For backward compatibility - fileIds?: number[]; // For backward compatibility + fileIds?: string[]; // For backward compatibility stats?: WorkflowMessageStats; success: boolean; actionId?: string; @@ -136,8 +136,8 @@ export interface WorkflowState { export interface WorkflowActions { loadWorkflow: (workflowId: string) => void; - startNewWorkflow: (prompt: string, fileIds?: number[]) => Promise; - continueWorkflow: (prompt: string, fileIds?: number[]) => Promise; + startNewWorkflow: (prompt: string, fileIds?: string[]) => Promise; + continueWorkflow: (prompt: string, fileIds?: string[]) => Promise; stopWorkflow: () => Promise; clearWorkflow: () => void; selectPrompt: (prompt: Prompt | null) => void; @@ -145,7 +145,7 @@ export interface WorkflowActions { } export interface FileInfo { - id: number; + id: string; name: string; mimeType: string; size?: number; @@ -184,7 +184,7 @@ export interface InputAreaProps { } export interface AttachedFile { - id: number; + id: string; name: string; size: number; type: string; @@ -196,12 +196,11 @@ export interface ConnectedFilesProps { onFileSelect?: (file: FileInfo) => void; selectedFile?: FileInfo | null; attachedFiles?: AttachedFile[]; - onRemoveFile?: (fileId: number) => void; + onRemoveFile?: (fileId: string) => void; } export interface MessageListProps { workflowState: WorkflowState; - onFilePreview?: (file: any) => void; } // Progress bar interfaces diff --git a/src/components/Dashboard/DashboardChat/useWorkflowManager.ts b/src/components/Dashboard/DashboardChat/useWorkflowManager.ts index db13dab..c60ea3b 100644 --- a/src/components/Dashboard/DashboardChat/useWorkflowManager.ts +++ b/src/components/Dashboard/DashboardChat/useWorkflowManager.ts @@ -22,7 +22,7 @@ export function useWorkflowManager(initialWorkflowId?: string | null): [Workflow const currentWorkflow = workflowStatus || workflow; // Helper to create optimistic user message - const createOptimisticMessage = useCallback((prompt: string, fileIds: number[] = []) => { + const createOptimisticMessage = useCallback((prompt: string, fileIds: string[] = []) => { const timestamp = new Date().toISOString(); return { id: `temp-${Date.now()}`, @@ -83,7 +83,7 @@ export function useWorkflowManager(initialWorkflowId?: string | null): [Workflow setCurrentWorkflowId(workflowId); }, []); - const startNewWorkflow = useCallback(async (prompt: string, fileIds: number[] = []): Promise => { + const startNewWorkflow = useCallback(async (prompt: string, fileIds: string[] = []): Promise => { // Add optimistic message immediately const optimisticMessage = createOptimisticMessage(prompt, fileIds); setPendingMessages(prev => [...prev, optimisticMessage]); @@ -119,7 +119,7 @@ export function useWorkflowManager(initialWorkflowId?: string | null): [Workflow return null; }, [startWorkflow, refetchMessages, createOptimisticMessage]); - const continueWorkflow = useCallback(async (prompt: string, fileIds: number[] = []): Promise => { + const continueWorkflow = useCallback(async (prompt: string, fileIds: string[] = []): Promise => { if (!currentWorkflowId) return false; // Add optimistic message immediately diff --git a/src/components/Mitglieder/mitgliederLogic.tsx b/src/components/Mitglieder/mitgliederLogic.tsx index e188a73..da1965d 100644 --- a/src/components/Mitglieder/mitgliederLogic.tsx +++ b/src/components/Mitglieder/mitgliederLogic.tsx @@ -1,6 +1,6 @@ -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; -import { useOrgUsers, User } from '../../hooks/useUsers'; +import { useOrgUsers } from '../../hooks/useUsers'; import { useLanguage } from '../../contexts/LanguageContext'; import type { @@ -10,7 +10,7 @@ import type { } from './mitgliederTypes'; export function useMitgliederLogic(): MitgliederLogicReturn { - const { users, loading, error, refetch, deleteUser } = useOrgUsers(); + const { users, loading, error, refetch } = useOrgUsers(); const { t } = useLanguage(); // Configure columns for the users table diff --git a/src/components/PageManager/PageManager.tsx b/src/components/PageManager/PageManager.tsx index f2fc7c1..c47ea84 100644 --- a/src/components/PageManager/PageManager.tsx +++ b/src/components/PageManager/PageManager.tsx @@ -143,7 +143,7 @@ const PageManager: React.FC = ({ loadingComponent: LoadingComp
{Array.from(pageInstances.values()).map((instance) => { const isVisible = instance.isActive; - const shouldAnimate = !instance.shouldPreserve; // Only animate non-preserved pages + if (instance.shouldPreserve) { // Preserved pages: Always mounted, just show/hide with animations diff --git a/src/components/PageManager/pageConfigs.ts b/src/components/PageManager/pageConfigs.ts index dc9bc3e..37f1289 100644 --- a/src/components/PageManager/pageConfigs.ts +++ b/src/components/PageManager/pageConfigs.ts @@ -5,7 +5,7 @@ import { lazy } from 'react'; import { MdOutlineWorkOutline } from 'react-icons/md'; import { LuWorkflow, LuTicket } from "react-icons/lu"; import { GoGear } from "react-icons/go"; -import { FaPlug, FaRegFileAlt, FaShare } from "react-icons/fa"; +import { FaPlug, FaRegFileAlt } from "react-icons/fa"; import { LuMessageSquareText } from "react-icons/lu"; // Lazy load components for better performance @@ -15,7 +15,7 @@ const TeamBereich = lazy(() => import('../../pages/Home/TeamBereich')); const Connections = lazy(() => import('../../pages/Home/Connections')); const Workflows = lazy(() => import('../../pages/Home/Workflows')); const Einstellungen = lazy(() => import('../../pages/Home/Einstellungen')); -const TestSharepoint = lazy(() => import('../../pages/Home/TestSharepoint')); + const Prompts = lazy(() => import('../../pages/Home/Prompts')); // Page configuration with caching and lifecycle settings diff --git a/src/components/Popup/EditForm.tsx b/src/components/Popup/EditForm.tsx index 22974fb..3d92118 100644 --- a/src/components/Popup/EditForm.tsx +++ b/src/components/Popup/EditForm.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import styles from './EditForm.module.css'; // Field configuration interface (moved from EditPopup) diff --git a/src/components/Popup/ViewForm.tsx b/src/components/Popup/ViewForm.tsx index 9d8e537..8432bf5 100644 --- a/src/components/Popup/ViewForm.tsx +++ b/src/components/Popup/ViewForm.tsx @@ -1,4 +1,4 @@ -import React from 'react'; + import styles from './ViewForm.module.css'; import { EditFieldConfig } from './EditForm'; diff --git a/src/components/Prompts/promptsLogic.tsx b/src/components/Prompts/promptsLogic.tsx index 4dc73a3..2995c9c 100644 --- a/src/components/Prompts/promptsLogic.tsx +++ b/src/components/Prompts/promptsLogic.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useMemo } from 'react'; +import { useState, useMemo } from 'react'; import { IoIosTrash, IoIosCopy } from 'react-icons/io'; import { MdModeEdit } from 'react-icons/md'; diff --git a/src/components/Sidebar/SidebarItem.tsx b/src/components/Sidebar/SidebarItem.tsx index cb16ff8..a95b165 100644 --- a/src/components/Sidebar/SidebarItem.tsx +++ b/src/components/Sidebar/SidebarItem.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Link } from "react-router-dom"; import { IoIosArrowDown } from "react-icons/io"; -import { motion, AnimatePresence } from "framer-motion"; + import styles from './SidebarStyles/SidebarItem.module.css'; import SidebarSubmenu from "./SidebarSubmenu"; diff --git a/src/hooks/useAuthentication.ts b/src/hooks/useAuthentication.ts index 6b00eb8..d8b61a8 100644 --- a/src/hooks/useAuthentication.ts +++ b/src/hooks/useAuthentication.ts @@ -1,5 +1,5 @@ import { useState } from 'react'; -import axios from 'axios'; + import { useMsal } from '@azure/msal-react'; import api from '../api'; import { useApiRequest } from './useApi'; diff --git a/src/hooks/useConnections.ts b/src/hooks/useConnections.ts index dc9aa8c..600b732 100644 --- a/src/hooks/useConnections.ts +++ b/src/hooks/useConnections.ts @@ -1,4 +1,4 @@ -import { useState, useEffect } from 'react'; +import { useState } from 'react'; import { useApiRequest } from './useApi'; // Connection interfaces based on backend UserConnection model diff --git a/src/hooks/usePrompts.ts b/src/hooks/usePrompts.ts index 4dfeee5..ee18dbb 100644 --- a/src/hooks/usePrompts.ts +++ b/src/hooks/usePrompts.ts @@ -38,7 +38,7 @@ export function usePrompts() { export function usePromptOperations() { const [deletingPrompts, setDeletingPrompts] = useState>(new Set()); const [creatingPrompt, setCreatingPrompt] = useState(false); - const { request, error: apiError, isLoading } = useApiRequest(); + const { request, isLoading } = useApiRequest(); const [deleteError, setDeleteError] = useState(null); const [createError, setCreateError] = useState(null); const [updateError, setUpdateError] = useState(null); diff --git a/src/hooks/useWorkflows.ts b/src/hooks/useWorkflows.ts index 811e859..599f5ba 100644 --- a/src/hooks/useWorkflows.ts +++ b/src/hooks/useWorkflows.ts @@ -7,7 +7,7 @@ export type { Workflow, WorkflowMessage, WorkflowStats, WorkflowDocument, Workfl export interface StartWorkflowRequest { prompt: string; - listFileId: number[]; + listFileId: string[]; } export interface StartWorkflowResponse { diff --git a/src/locales/fr.ts b/src/locales/fr.ts index bd33d9e..1fe1bc2 100644 --- a/src/locales/fr.ts +++ b/src/locales/fr.ts @@ -340,10 +340,7 @@ export default { 'files.type.audio': 'Audio', 'files.type.file': 'Fichier', - // File Sources - 'files.source.uploaded': 'Téléchargé', - 'files.source.created': 'Créé par IA', - 'files.source.shared': 'Partagé', + // File Actions 'files.action.download': 'Télécharger', diff --git a/src/pages/Home/Einstellungen.tsx b/src/pages/Home/Einstellungen.tsx index 95d48ef..9e9944b 100644 --- a/src/pages/Home/Einstellungen.tsx +++ b/src/pages/Home/Einstellungen.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import styles from './HomeStyles/Einstellungen.module.css'; import sharedStyles from '../../components/PageManager/pages.module.css'; import { useLanguage, Language } from '../../contexts/LanguageContext'; diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 8e3aaae..07f922c 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -1,19 +1,19 @@ import { useEffect } from 'react'; -import { useLocation } from 'react-router-dom'; + import styles from './HomeStyles/Home.module.css' import Sidebar from '../../components/Sidebar'; import PageManager from '../../components/PageManager'; -import { AnimatePresence, motion } from "framer-motion"; + function Home () { useEffect(()=> { document.title = "PowerOn"; }, []); - const location = useLocation(); + // Loading component const LoadingComponent = () => ( diff --git a/src/pages/Register.tsx b/src/pages/Register.tsx index 787365a..884f32b 100644 --- a/src/pages/Register.tsx +++ b/src/pages/Register.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; -import { FaMicrosoft } from 'react-icons/fa'; + import styles from './Register.module.css'; import { useRegister, useMsalRegister, useUsernameAvailability } from '../hooks/useAuthentication'; @@ -15,7 +15,7 @@ interface RegisterFormData { function Register() { const navigate = useNavigate(); const { register, error: registerError, isLoading } = useRegister(); - const { registerWithMsal, error: msalError, isLoading: msalLoading } = useMsalRegister(); + const { error: msalError } = useMsalRegister(); const { checkAvailability, isChecking, error: availabilityError } = useUsernameAvailability(); const [formData, setFormData] = useState({ username: '', diff --git a/vite.config.ts b/vite.config.ts index ef04e9e..90f7a4f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,6 +1,5 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; -import { httpsConfig } from './server.ts'; export default defineConfig({ plugins: [react()],