Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

added generic animated loader and message (#321)

vishnuszipstackc04acbdce500
diff --git a/frontend/src/components/generic-loader/GenericLoader.css b/frontend/src/components/generic-loader/GenericLoader.css
new file mode 100644
index 000000000..986b59c1e
--- /dev/null
+++ b/frontend/src/components/generic-loader/GenericLoader.css
@@ -0,0 +1,67 @@
+@keyframes pulse {
+ from {
+ opacity: 1;
+ transform: scale(1);
+ }
+ to {
+ opacity: .25;
+ transform: scale(.75);
+ }
+ }
+
+ /* PULSE BUBBLES */
+ .spinner-box {
+ text-align: center;
+ }
+ .pulse-container {
+ width: 60px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin: 0 auto;
+ margin-top: 15px;
+ margin-bottom: 15px;
+ }
+
+ .pulse-bubble {
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ }
+
+ .pulse-bubble-1 {
+ background-color: #ff4d6d;
+ animation: pulse .5s ease 0s infinite alternate;
+ }
+ .pulse-bubble-2 {
+ background-color: #ffb400;
+ animation: pulse .5s ease .2s infinite alternate;
+ }
+ .pulse-bubble-3 {
+ background-color: #7fb800;
+ animation: pulse .5s ease .4s infinite alternate;
+ }
+ .pulse-bubble-4 {
+ background-color: #00a6ed;
+ animation: pulse .5s ease .6s infinite alternate;
+ }
+
+ .fadeinout
+ {
+ animation: fadeinout 2s infinite;
+ }
+
+ @keyframes fadeinout
+ {
+ 0%{
+ opacity:.5;
+ }
+ 50%
+ {
+ opacity:1;
+ }
+ 100%
+ {
+ opacity:.5;
+ }
+ }
diff --git a/frontend/src/components/generic-loader/GenericLoader.jsx b/frontend/src/components/generic-loader/GenericLoader.jsx
new file mode 100644
index 000000000..5ebc75812
--- /dev/null
+++ b/frontend/src/components/generic-loader/GenericLoader.jsx
@@ -0,0 +1,26 @@
+import { Typography } from "antd";
+
+import { Logo64 } from "../../assets";
+import "./GenericLoader.css";
+
+function GenericLoader() {
+ return (
+ <div className="center">
+ <div className="spinner-box">
+ <Logo64 className="fadeinout" />
+ <div className="pulse-container">
+ <div className="pulse-bubble pulse-bubble-1"></div>
+ <div className="pulse-bubble pulse-bubble-2"></div>
+ <div className="pulse-bubble pulse-bubble-3"></div>
+ <div className="pulse-bubble pulse-bubble-4"></div>
+ </div>
+ <Typography>
+ Please wait while we prepare your session. <br></br>This might take a
+ minute.
+ </Typography>
+ </div>
+ </div>
+ );
+}
+
+export { GenericLoader };
diff --git a/frontend/src/components/helpers/auth/PersistentLogin.js b/frontend/src/components/helpers/auth/PersistentLogin.js
index 4ea218d72..b1268db1a 100644
--- a/frontend/src/components/helpers/auth/PersistentLogin.js
+++ b/frontend/src/components/helpers/auth/PersistentLogin.js
@@ -1,10 +1,10 @@
import { useEffect, useState } from "react";
import { Outlet } from "react-router-dom";
-import { Logo64 } from "../../../assets";
import useSessionValid from "../../../hooks/useSessionValid";
import { useSessionStore } from "../../../store/session-store";
import { SocketMessages } from "../socket-messages/SocketMessages";
+import { GenericLoader } from "../../generic-loader/GenericLoader";
function PersistentLogin() {
const [isLoading, setIsLoading] = useState(true);
@@ -28,11 +28,7 @@ function PersistentLogin() {
}, []);
if (isLoading) {
- return (
- <div className="center">
- <Logo64 />
- </div>
- );
+ return <GenericLoader />;
}
return (
<>
diff --git a/frontend/src/index.js b/frontend/src/index.js
index 0d338065f..832ec14b6 100644
--- a/frontend/src/index.js
+++ b/frontend/src/index.js
@@ -3,7 +3,7 @@ import ReactDOM from "react-dom/client";
import posthog from "posthog-js";
import { PostHogProvider } from "posthog-js/react";
-import { Logo64 } from "./assets";
+import { GenericLoader } from "./components/generic-loader/GenericLoader";
import { LazyLoader } from "./components/widgets/lazy-loader/LazyLoader.jsx";
import { SocketProvider } from "./helpers/SocketContext.js";
import "./index.css";
@@ -22,11 +22,7 @@ root.render(
<PostHogProvider client={posthog}>
<SocketProvider>
<LazyLoader
- loader={
- <div className="center">
- <Logo64 />
- </div>
- }
+ loader={<GenericLoader />}
component={() => import("./App.jsx")}
componentName="App"
/>