loading cover page (hidden)
This commit is contained in:
parent
442f3d9aa5
commit
25eded3e2b
3 changed files with 52 additions and 0 deletions
BIN
extension/react-app/public/continue.gif
Normal file
BIN
extension/react-app/public/continue.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
50
extension/react-app/src/components/LoadingCover.tsx
Normal file
50
extension/react-app/src/components/LoadingCover.tsx
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
|
||||
const StyledDiv = styled.div`
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: linear-gradient(
|
||||
101.79deg,
|
||||
#12887a 0%,
|
||||
#87245c 32%,
|
||||
#e12637 63%,
|
||||
#ffb215 100%
|
||||
);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
z-index: 10;
|
||||
`;
|
||||
|
||||
const StyledImg = styled.img`
|
||||
/* add your styles here */
|
||||
`;
|
||||
|
||||
const StyledDiv2 = styled.div`
|
||||
width: 50%;
|
||||
height: 5px;
|
||||
background: white;
|
||||
margin-top: 20px;
|
||||
`;
|
||||
|
||||
interface LoadingCoverProps {
|
||||
message: string;
|
||||
hidden?: boolean;
|
||||
}
|
||||
|
||||
const LoadingCover = (props: LoadingCoverProps) => {
|
||||
return (
|
||||
<StyledDiv style={{ display: props.hidden ? "none" : "inherit" }}>
|
||||
<StyledImg src="continue.gif" alt="centered image" width="50%" />
|
||||
<StyledDiv2></StyledDiv2>
|
||||
<p>{props.message}</p>
|
||||
</StyledDiv>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoadingCover;
|
||||
|
|
@ -18,6 +18,7 @@ import ReactSwitch from "react-switch";
|
|||
import { usePostHog } from "posthog-js/react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootStore } from "../redux/store";
|
||||
import LoadingCover from "../components/LoadingCover";
|
||||
|
||||
const TopGUIDiv = styled.div`
|
||||
overflow: hidden;
|
||||
|
|
@ -328,6 +329,7 @@ function GUI(props: GUIProps) {
|
|||
// const iterations = useSelector(selectIterations);
|
||||
return (
|
||||
<>
|
||||
<LoadingCover hidden={true} message="Downloading local model..." />
|
||||
<TextDialog
|
||||
showDialog={showFeedbackDialog}
|
||||
onEnter={(text) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue