Add scheduling-remote service to docker-compose and enhance camera error handling
- Introduced a new service for scheduling-remote in docker-compose.yml, allowing for better management of scheduling functionalities. - Enhanced error handling in CameraMonitor and CameraStreamer classes to improve robustness during camera initialization and streaming processes. - Updated various components in the management dashboard to support dark mode and improve user experience with consistent styling. - Implemented feature flags for enabling/disabling modules, including the new scheduling module.
This commit is contained in:
29
scheduling-remote/src/App.tsx
Normal file
29
scheduling-remote/src/App.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react'
|
||||
import { Scheduling } from './components/Scheduling'
|
||||
import type { User } from './services/supabase'
|
||||
|
||||
interface AppProps {
|
||||
user?: User
|
||||
currentRoute?: string
|
||||
}
|
||||
|
||||
export default function App(props: AppProps) {
|
||||
// Get user and route from props or try to get from window (for standalone testing)
|
||||
const user = props.user || (window as any).__SCHEDULING_USER__
|
||||
const currentRoute = props.currentRoute || window.location.pathname
|
||||
|
||||
if (!user) {
|
||||
return (
|
||||
<div className="p-6">
|
||||
<div className="bg-yellow-50 border border-yellow-200 rounded-md p-4">
|
||||
<div className="text-sm text-yellow-700">
|
||||
User information is required to use the scheduling module. Please ensure you are logged in.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return <Scheduling user={user} currentRoute={currentRoute} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user