Update OpenAI API key and enhance app functionality: Replace the OpenAI API key in the .env file for improved access. Refactor app.py to include error handling for missing API keys and implement dark mode functionality with session management. Update README.md to reflect the use of Tailwind CSS via CDN and document the Content Security Policy (CSP) adjustments. Enhance mindmap data loading with a new API endpoint for refreshing data, ensuring better user experience during database connection issues. Update styles and templates for improved UI consistency and responsiveness.

This commit is contained in:
2025-04-27 16:56:16 +02:00
parent 2d8cdc052f
commit 4a3092a4d2
42 changed files with 2458 additions and 878 deletions

View File

@@ -66,18 +66,18 @@ class NeuralNetworkBackground {
flowColor: '#c4b5fd'
};
// Config - Updated to be more flowing and subtle
// Config - Updated to be more subtle, efficient, and elegant
this.config = {
nodeCount: 100, // Slightly fewer nodes for cleaner look
nodeSize: 0.8, // Smaller nodes
nodeVariation: 0.5, // Less variation for uniformity
connectionDistance: 200, // Longer connections for better flow
connectionOpacity: 0.2, // More subtle connections
animationSpeed: 0.08, // Much slower movement
pulseSpeed: 0.004, // Slower pulse
flowSpeed: 0.6, // Speed of flow animations
flowDensity: 0.001, // How often new flows start (lower = less frequent)
flowLength: 0.2 // Length of the flow (percentage of the connection)
nodeCount: 70, // Reduced node count for better performance
nodeSize: 0.6, // Smaller nodes for subtlety
nodeVariation: 0.3, // Less variation for uniformity
connectionDistance: 150, // Shorter connections for cleaner look
connectionOpacity: 0.15, // More subtle connections
animationSpeed: 0.04, // Slower, more elegant movement
pulseSpeed: 0.002, // Very slow pulse for subtlety
flowSpeed: 0.4, // Slower flow animations
flowDensity: 0.0008, // Less frequent flow animations
flowLength: 0.15 // Shorter flow animations
};
// Initialize
@@ -713,7 +713,7 @@ class NeuralNetworkBackground {
};
p2 = {
x: fromNode.x + (toNode.x - fromNode.x) * endProgress,
y: fromNode.y + (toNode.y - fromNode.y) * endProgress
y: fromNode.y + (toNode.y - fromNode.y) * startProgress
};
} else {
p1 = {