Enhance UI and functionality across multiple components

- Updated styles in style.css to improve overall design consistency and introduced CSS variables for better theming.
- Refined ChatWindow.vue with improved no-conversation styling and adjusted image borders for a cleaner look.
- Enhanced HistoryView.vue and InboxView.vue with new panel styles for better user experience and readability.
- Revamped LoginForm.vue to provide a more engaging user interface with a landing page layout and cookie-based profile persistence.
- Improved MenuBar.vue and SearchView.vue with active state indicators and refined item displays for better navigation.
- Added logout functionality in chat store and server routes to manage user sessions effectively.
- Introduced a new mockup view route for design previews.

These changes collectively enhance the user experience and visual appeal of the application.
This commit is contained in:
Torsten Schulz (local)
2026-03-19 15:01:59 +01:00
parent 8f3cbc16b8
commit 0205352ae9
15 changed files with 2432 additions and 350 deletions

View File

@@ -54,6 +54,39 @@ export function setupRoutes(app, __dirname) {
app.get('/api/health', (req, res) => {
res.json({ status: 'ok', timestamp: new Date().toISOString() });
});
app.post('/api/logout', (req, res) => {
try {
const sessionId = req.sessionID;
const clientsMap = getClientsMap();
const client = clientsMap.get(sessionId);
if (client?.socket) {
try {
client.socket.disconnect(true);
} catch (error) {
console.warn('Logout: Socket konnte nicht sauber getrennt werden:', error);
}
}
if (sessionId) {
clientsMap.delete(sessionId);
}
req.session.destroy((error) => {
if (error) {
console.error('Logout: Session konnte nicht zerstört werden:', error);
return res.status(500).json({ success: false });
}
res.clearCookie('connect.sid');
res.json({ success: true });
});
} catch (error) {
console.error('Logout-Fehler:', error);
res.status(500).json({ success: false });
}
});
// Bild-Upload-Endpoint
app.post('/api/upload-image', upload.single('image'), (req, res) => {
@@ -385,4 +418,3 @@ export function setupRoutes(app, __dirname) {
}
});
}