[Update] Starting Up: Add loading animation when the software preparing, until backend is ready.

This commit is contained in:
Sakamoto Shiina
2024-11-14 15:48:38 +09:00
parent 2d77f15c41
commit 2c7bb53b64
10 changed files with 61 additions and 5 deletions

View File

@@ -3,11 +3,15 @@ import { useStartPython } from "@logics/useStartPython";
import { WindowTitleBar } from "./window_title_bar/WindowTitleBar";
import { MainPage } from "./main_page/MainPage";
import { ConfigPage } from "./config_page/ConfigPage";
import { SplashComponent } from "./splash_component/SplashComponent";
import { ModalController } from "./modal_controller/ModalController";
import styles from "./App.module.scss";
import { useIsBackendReady } from "@logics_common";
export const App = () => {
const { currentIsBackendReady } = useIsBackendReady();
const { WindowGeometryController } = useWindow();
return (
<div className={styles.container}>
<StartPythonFacadeComponent />
@@ -18,13 +22,24 @@ export const App = () => {
<TransparencyController />
<WindowGeometryController />
{currentIsBackendReady.data === false
? <SplashComponent />
: <Contents />
}
</div>
);
};
const Contents = () => {
return (
<>
<WindowTitleBar />
<div className={styles.pages_wrapper}>
<ConfigPage />
<MainPage />
<ModalController />
</div>
</div>
</>
);
};