[Update] Combine in one window. Rename Main/Config Window to Main/Config Page accordingly.

For now, I put Config Page to below the main page temporary. Open Config Button does not work.
This commit is contained in:
Sakamoto Shiina
2024-08-09 12:23:17 +09:00
parent af1cdd2d7b
commit 3ed3d5eb40
118 changed files with 175 additions and 192 deletions

35
src-ui/app/App.jsx Normal file
View File

@@ -0,0 +1,35 @@
import { getCurrent } from "@tauri-apps/api/window";
import { useEffect, useRef } from "react";
import { useStartPython } from "@logics/useStartPython";
import { useConfig } from "@logics/useConfig";
import { MainPage } from "./main_page/MainPage";
import { ConfigPage } from "./config_page/ConfigPage";
export const App = () => {
const { asyncStartPython } = useStartPython();
const hasRunRef = useRef(false);
const main_page = getCurrent();
const { getSoftwareVersion } = useConfig();
useEffect(() => {
main_page.setDecorations(true);
if (!hasRunRef.current) {
asyncStartPython().then((result) => {
getSoftwareVersion();
}).catch((err) => {
});
}
return () => hasRunRef.current = true;
}, []);
return (
<>
<MainPage/>
<ConfigPage/>
</>
);
};