forked from langflow-ai/langflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: dark mode and header text display issues (langflow-ai#3315)
* Fix dark mode not starting with the browser saved variable * Added the Last saved at text on the header too * Fixed css
- Loading branch information
1 parent
5ad5ca5
commit c19a031
Showing
6 changed files
with
94 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import AlertDisplayArea from "@/alerts/displayArea"; | ||
import CrashErrorComponent from "@/components/crashErrorComponent"; | ||
import FetchErrorComponent from "@/components/fetchErrorComponent"; | ||
import LoadingComponent from "@/components/loadingComponent"; | ||
import { | ||
FETCH_ERROR_DESCRIPION, | ||
FETCH_ERROR_MESSAGE, | ||
} from "@/constants/constants"; | ||
import { useGetHealthQuery } from "@/controllers/API/queries/health"; | ||
import useTrackLastVisitedPath from "@/hooks/use-track-last-visited-path"; | ||
import useFlowsManagerStore from "@/stores/flowsManagerStore"; | ||
import { useFolderStore } from "@/stores/foldersStore"; | ||
import { cn } from "@/utils/utils"; | ||
import { ErrorBoundary } from "react-error-boundary"; | ||
import { Outlet } from "react-router-dom"; | ||
|
||
export function AppWrapperPage() { | ||
useTrackLastVisitedPath(); | ||
|
||
const isLoading = useFlowsManagerStore((state) => state.isLoading); | ||
const isLoadingFolders = useFolderStore((state) => state.isLoadingFolders); | ||
const { | ||
data: healthData, | ||
isFetching: fetchingHealth, | ||
isError: isErrorHealth, | ||
refetch, | ||
} = useGetHealthQuery(); | ||
const isLoadingApplication = isLoading || isLoadingFolders; | ||
return ( | ||
<div className="flex h-full flex-col"> | ||
<ErrorBoundary | ||
onReset={() => { | ||
// any reset function | ||
}} | ||
FallbackComponent={CrashErrorComponent} | ||
> | ||
<> | ||
{ | ||
<FetchErrorComponent | ||
description={FETCH_ERROR_DESCRIPION} | ||
message={FETCH_ERROR_MESSAGE} | ||
openModal={ | ||
isErrorHealth || | ||
(healthData && | ||
Object.values(healthData).some((value) => value !== "ok")) | ||
} | ||
setRetry={() => { | ||
refetch(); | ||
}} | ||
isLoadingHealth={fetchingHealth} | ||
></FetchErrorComponent> | ||
} | ||
|
||
<div | ||
className={cn( | ||
"loading-page-panel absolute left-0 top-0 z-[999]", | ||
isLoadingApplication ? "" : "hidden", | ||
)} | ||
> | ||
<LoadingComponent remSize={50} /> | ||
</div> | ||
<Outlet /> | ||
</> | ||
</ErrorBoundary> | ||
<div></div> | ||
<div className="app-div"> | ||
<AlertDisplayArea /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters