import * as React from "react"; import * as d from "../../localData"; import { Header, TitleItem } from "./Header"; import { css, keyframes } from "@emotion/css"; import { AboutPage } from "./AboutPage"; import { AccountPage } from "./AccountPage"; import { CreateProjectPage } from "./CreateProjectPage"; import { HomePage } from "./HomePage"; import { LocalProjectPage } from "./LocalProjectPage"; import { PartPage } from "./PartPage"; import { ProjectPage } from "./ProjectPage"; import { SettingPage } from "./SettingPage"; import { SoundQuiz } from "../tool/SoundQuiz"; import { ThemeColorRainbow } from "../tool/ThemeColorRainbow"; import { ToolListPage } from "./ToolListPage"; import { TypePartPage } from "./TypePartPage"; import type { UseDefinyAppResult } from "../hook/useDefinyApp"; export type Props = { readonly useDefinyAppResult: UseDefinyAppResult; }; const titleItemList: ReadonlyArray = []; export const App: React.VFC = ({ useDefinyAppResult }) => { switch (useDefinyAppResult.logInState._) { case "RequestingLogInUrl": { return ( ); } case "JumpingToLogInPage": { return ( ); } } return (
{useDefinyAppResult.notificationElement}
); }; const PrepareLogIn: React.VFC<{ message: string }> = (props) => (
); const logInMessage = ( provider: d.OpenIdConnectProvider, language: d.Language ): string => { switch (language) { case "English": return `Preparing to log in to ${provider}`; case "Esperanto": return `Preparante ensaluti al Google${provider}`; case "Japanese": return `${provider}へのログインを準備中……`; } }; const jumpMessage = (language: d.Language): string => { switch (language) { case "English": return `Navigating to Google logIn page.`; case "Esperanto": return `Navigado al Google-ensaluta paĝo.`; case "Japanese": return `Google のログインページへ移動中……`; } }; const LoadingBox: React.VFC<{ message: string }> = (props) => (
{props.message}
definy
); const rotateAnimation = keyframes` 0% { transform: rotate(0); } 100% { transform: rotate(1turn); } `; /** * Header を含まない部分 */ const AppMain: React.VFC = (props) => { const useDefinyAppResult = props.useDefinyAppResult; switch (useDefinyAppResult.location._) { case "Home": return ( ); case "About": return ; case "Setting": return ( ); case "CreateProject": return ( ); case "Project": return ( ); case "Account": return ( ); case "TypePart": return ( ); case "Part": return ; case "LocalProject": return ; case "ToolList": return ( ); case "Tool": return ; } }; export const Tool = (props: { readonly toolName: d.ToolName; }): React.ReactElement => { switch (props.toolName) { case "ThemeColorRainbow": return ; case "SoundQuiz": return ; } };