chore: Änderungen commited
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/* ChatGPT Assistent Styles - Verbesserte Version */
|
/* ChatGPT Assistent Styles - Verbesserte Version */
|
||||||
#chatgpt-assistant {
|
#chatgpt-assistant {
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'Inter', sans-serif;
|
||||||
bottom: 4.5rem;
|
bottom: 5.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#assistant-chat {
|
#assistant-chat {
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
border-radius: 0.75rem;
|
border-radius: 0.75rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
max-width: calc(100vw - 2rem);
|
max-width: calc(100vw - 2rem);
|
||||||
max-height: 80vh !important;
|
max-height: 75vh !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#assistant-toggle {
|
#assistant-toggle {
|
||||||
@@ -182,12 +182,12 @@ body:not(.dark) .typing-indicator span {
|
|||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
#assistant-chat {
|
#assistant-chat {
|
||||||
width: calc(100vw - 2rem) !important;
|
width: calc(100vw - 2rem) !important;
|
||||||
max-height: 70vh !important;
|
max-height: 65vh !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chatgpt-assistant {
|
#chatgpt-assistant {
|
||||||
right: 1rem;
|
right: 1rem;
|
||||||
bottom: 5rem;
|
bottom: 6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,3 +234,14 @@ body.dark .assistant-message {
|
|||||||
color: #F9FAFB !important;
|
color: #F9FAFB !important;
|
||||||
border-left: 3px solid #8B5CF6;
|
border-left: 3px solid #8B5CF6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Chat-Assistent-Position im Footer-Bereich anpassen */
|
||||||
|
.chat-assistant {
|
||||||
|
max-height: 75vh;
|
||||||
|
bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-assistant .chat-messages {
|
||||||
|
max-height: calc(75vh - 180px);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
@@ -285,6 +285,7 @@
|
|||||||
this.darkMode = !this.darkMode;
|
this.darkMode = !this.darkMode;
|
||||||
this.applyDarkMode();
|
this.applyDarkMode();
|
||||||
|
|
||||||
|
// Server über Änderung informieren
|
||||||
fetch('/api/set_dark_mode', {
|
fetch('/api/set_dark_mode', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
@@ -295,11 +296,10 @@
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
|
// Event auslösen für andere Komponenten
|
||||||
document.dispatchEvent(new CustomEvent('darkModeToggled', {
|
document.dispatchEvent(new CustomEvent('darkModeToggled', {
|
||||||
detail: { isDark: this.darkMode }
|
detail: { isDark: this.darkMode }
|
||||||
}));
|
}));
|
||||||
} else {
|
|
||||||
console.error('Fehler beim Speichern der Dark Mode-Einstellung:', data.error);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
@@ -365,13 +365,16 @@
|
|||||||
<div class="flex items-center space-x-4">
|
<div class="flex items-center space-x-4">
|
||||||
<!-- Dark/Light Mode Schalter -->
|
<!-- Dark/Light Mode Schalter -->
|
||||||
<button
|
<button
|
||||||
@click="darkMode = !darkMode; toggleDarkMode()"
|
@click="toggleDarkMode()"
|
||||||
class="theme-toggle relative w-12 h-6 rounded-full bg-gradient-to-r transition-all duration-300 flex items-center"
|
class="theme-toggle relative w-12 h-6 rounded-full bg-gradient-to-r transition-all duration-300 flex items-center"
|
||||||
:class="darkMode ? 'from-purple-700 to-indigo-800' : 'from-purple-400 to-indigo-500'"
|
:class="darkMode ? 'from-purple-700 to-indigo-800' : 'from-purple-400 to-indigo-500'"
|
||||||
aria-label="Dark Mode umschalten"
|
aria-label="Dark Mode umschalten"
|
||||||
>
|
>
|
||||||
<span class="absolute w-5 h-5 rounded-full bg-white shadow-md transition-transform duration-300"
|
<span
|
||||||
:class="darkMode ? 'translate-x-7' : 'translate-x-1'"></span>
|
class="absolute w-5 h-5 rounded-full bg-white shadow-md transform transition-transform duration-300"
|
||||||
|
:class="darkMode ? 'translate-x-7' : 'translate-x-1'"
|
||||||
|
></span>
|
||||||
|
<span class="sr-only">{{ darkMode ? 'Zum Light Mode wechseln' : 'Zum Dark Mode wechseln' }}</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- Profil-Link oder Login -->
|
<!-- Profil-Link oder Login -->
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
@@ -700,15 +703,34 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.MindMap.toggleDarkMode = function() {
|
window.MindMap.toggleDarkMode = function() {
|
||||||
const isDark = document.body.classList.contains('dark');
|
const isDark = document.documentElement.classList.contains('dark');
|
||||||
applyDarkModeClasses(!isDark);
|
const newIsDark = !isDark;
|
||||||
|
|
||||||
|
// DOM aktualisieren
|
||||||
|
applyDarkModeClasses(newIsDark);
|
||||||
|
|
||||||
|
// Alpine.js Status aktualisieren (falls verfügbar)
|
||||||
|
const appEl = document.querySelector('body');
|
||||||
|
if (appEl && appEl.__x) {
|
||||||
|
appEl.__x.$data.darkMode = newIsDark;
|
||||||
|
}
|
||||||
|
|
||||||
// Server aktualisieren
|
// Server aktualisieren
|
||||||
fetch('/api/set_dark_mode', {
|
fetch('/api/set_dark_mode', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ darkMode: !isDark })
|
body: JSON.stringify({ darkMode: newIsDark })
|
||||||
}).catch(console.error);
|
})
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
if (data.success) {
|
||||||
|
// Event für andere Komponenten auslösen
|
||||||
|
document.dispatchEvent(new CustomEvent('darkModeToggled', {
|
||||||
|
detail: { isDark: newIsDark }
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(console.error);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialisierung beim Laden
|
// Initialisierung beim Laden
|
||||||
|
|||||||
0
templates/edit_mindmap.html
Normal file
0
templates/edit_mindmap.html
Normal file
Reference in New Issue
Block a user