feat: add new frontend components, MH batch worker, and gitignore rules
- Add all new Frontend source files (pages, components, hooks, utils) - Add selenium_MHBatchPaymentCheckWorker.py and MHSinglePaymentCheckWorker.py - Add install-steps-5-13.sh setup script - Update .gitignore to exclude runtime/sensitive data (backups, uploads, chat-history, keys, downloads, generated .d.ts files) while keeping folders - Add .gitkeep to preserve empty runtime folders in git Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
let pendingFiles = [];
|
||||
export function setChatbotPendingFiles(files) {
|
||||
pendingFiles = [...files];
|
||||
}
|
||||
/** Returns and clears the stored files (consume-once). */
|
||||
export function takeChatbotPendingFiles() {
|
||||
const files = [...pendingFiles];
|
||||
pendingFiles = [];
|
||||
return files;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import AppLayout from "@/components/layout/app-layout";
|
||||
import LoadingScreen from "@/components/ui/LoadingScreen";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { Suspense } from "react";
|
||||
import { Redirect, Route } from "wouter";
|
||||
export function ProtectedRoute({ path, component: Component, adminOnly = false, }) {
|
||||
const { user, isLoading } = useAuth();
|
||||
return (<Route path={path}>
|
||||
{isLoading ? (<AppLayout>
|
||||
<LoadingScreen />
|
||||
</AppLayout>) : !user ? (<Redirect to="/auth"/>) : adminOnly && user.username !== "admin" ? (<Redirect to="/insurance-status"/>) : (<AppLayout>
|
||||
<Suspense fallback={<LoadingScreen />}>
|
||||
<Component />
|
||||
</Suspense>
|
||||
</AppLayout>)}
|
||||
</Route>);
|
||||
}
|
||||
Reference in New Issue
Block a user