Add staff email client with WebSocket real-time updates
Implements a complete email client for platform staff members: Backend: - Add routing_mode field to PlatformEmailAddress (PLATFORM/STAFF) - Create staff_email app with models for folders, emails, attachments, labels - IMAP service for fetching emails with folder mapping - SMTP service for sending emails with attachment support - Celery tasks for periodic sync and full sync operations - WebSocket consumer for real-time notifications - Comprehensive API viewsets with filtering and actions Frontend: - Thunderbird-style three-pane email interface - Multi-account support with drag-and-drop ordering - Email composer with rich text editor - Email viewer with thread support - Real-time WebSocket updates for new emails and sync status - 94 unit tests covering models, serializers, views, services, and consumers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,11 +102,20 @@ export const useLogout = () => {
|
||||
queryClient.removeQueries({ queryKey: ['currentUser'] });
|
||||
queryClient.clear();
|
||||
|
||||
// Redirect to login page on root domain
|
||||
// Redirect to appropriate login page based on current subdomain
|
||||
const protocol = window.location.protocol;
|
||||
const baseDomain = getBaseDomain();
|
||||
const port = window.location.port ? `:${window.location.port}` : '';
|
||||
window.location.href = `${protocol}//${baseDomain}${port}/login`;
|
||||
const hostname = window.location.hostname;
|
||||
|
||||
// Check if on platform subdomain
|
||||
if (hostname.startsWith('platform.')) {
|
||||
// Platform users go to platform login page
|
||||
window.location.href = `${protocol}//platform.${baseDomain}${port}/platform/login`;
|
||||
} else {
|
||||
// Business users go to their subdomain's login page
|
||||
window.location.href = `${protocol}//${hostname}${port}/login`;
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user