You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
1.3 KiB

import Page, {PageBody, PageFlexColumn, PageFlexRow} from "../primitives/page/Page";
import Header, {HeaderTitle} from "../primitives/header/Header";
import {Icon} from "../primitives/Shared";
import {faSpinner} from "@fortawesome/free-solid-svg-icons/faSpinner";
import {Boi} from "../primitives/boi/Boi";
interface LoadingPageProps {
text?: string
minimal?: boolean
}
function LoadingPage({text, minimal}: LoadingPageProps) {
return (
<Page background={minimal ? "2046" : undefined}>
{!minimal && (
<Header>
<HeaderTitle>YKonsole</HeaderTitle>
</Header>
)}
<PageBody>
<PageFlexRow vertical>
<PageFlexRow flex={1}/>
<LoadingSection text={text}/>
<PageFlexRow flex={1}/>
</PageFlexRow>
</PageBody>
</Page>
);
}
interface LoadingSectionProps {
text?: string
}
export function LoadingSection({text}: LoadingSectionProps) {
return (
<Boi vertical="center" horizontal="center" style={{
textAlign: "center",
marginTop: "1vmax", marginLeft: "1vmax", marginRight: "1vmax",
}}>
<div style={{fontSize: "200%"}}>
<Icon value={faSpinner} spin/>
</div>
{text && <div>{text}</div>}
</Boi>
);
}
export default LoadingPage;