metaverse platform project
リビジョン | ecbe064a48f7867e0244ef401bb3d72bf4beb286 (tree) |
---|---|
日時 | 2023-01-11 16:51:09 |
作者 | Nknight AMAMIYA <88763245+NknightA@user...> |
コミッター | Nknight AMAMIYA |
update.
@@ -1,14 +1,10 @@ | ||
1 | 1 | "use strict"; |
2 | 2 | Object.defineProperty(exports, "__esModule", { value: true }); |
3 | -require("./styles/global.sass"); | |
4 | 3 | var react_1 = require("@chakra-ui/react"); |
5 | -var Uis_1 = require("./component/Uis"); | |
6 | 4 | function App(_a) { |
7 | 5 | var Component = _a.Component, pageProps = _a.pageProps; |
8 | 6 | return (<react_1.ChakraProvider> |
9 | - <Uis_1.Uis> | |
10 | - <Component {...pageProps}/> | |
11 | - </Uis_1.Uis> | |
12 | - </react_1.ChakraProvider>); | |
7 | + <Component {...pageProps}/> | |
8 | + </react_1.ChakraProvider>); | |
13 | 9 | } |
14 | 10 | exports.default = App; |
@@ -0,0 +1,65 @@ | ||
1 | +"use strict"; | |
2 | +var __importDefault = (this && this.__importDefault) || function (mod) { | |
3 | + return (mod && mod.__esModule) ? mod : { "default": mod }; | |
4 | +}; | |
5 | +Object.defineProperty(exports, "__esModule", { value: true }); | |
6 | +var react_1 = __importDefault(require("react")); | |
7 | +var icons_1 = require("@chakra-ui/icons"); | |
8 | +var react_2 = require("@chakra-ui/react"); | |
9 | +var HoverLink = function (props) { return <react_2.Link rounded="base" _hover={{ bg: "gray.200" }} p={2} {...props}/>; }; | |
10 | +var Navigation = function () { | |
11 | + return (<react_2.Stack as="nav"> | |
12 | + <HoverLink>Setting</HoverLink> | |
13 | + <HoverLink>Payment</HoverLink> | |
14 | + <HoverLink>- test -</HoverLink> | |
15 | + <HoverLink>- test -</HoverLink> | |
16 | + </react_2.Stack>); | |
17 | +}; | |
18 | +var DrawerMenu = function () { | |
19 | + var _a = (0, react_2.useDisclosure)(), isOpen = _a.isOpen, onOpen = _a.onOpen, onClose = _a.onClose; | |
20 | + var btnRef = react_1.default.useRef(null); | |
21 | + return (<> | |
22 | + <react_2.Button ref={btnRef} onClick={onOpen}> | |
23 | + <icons_1.HamburgerIcon /> | |
24 | + </react_2.Button> | |
25 | + <react_2.Drawer isOpen={isOpen} onClose={onClose} placement="left" finalFocusRef={btnRef}> | |
26 | + <react_2.DrawerOverlay> | |
27 | + <react_2.DrawerContent> | |
28 | + <react_2.DrawerCloseButton /> | |
29 | + <react_2.DrawerHeader> | |
30 | + Menu | |
31 | + </react_2.DrawerHeader> | |
32 | + <react_2.DrawerBody> | |
33 | + <Navigation /> | |
34 | + </react_2.DrawerBody> | |
35 | + </react_2.DrawerContent> | |
36 | + </react_2.DrawerOverlay> | |
37 | + </react_2.Drawer> | |
38 | + </>); | |
39 | +}; | |
40 | +var LayoutWithMenu = function (_a) { | |
41 | + var children = _a.children; | |
42 | + return (<react_2.Stack> | |
43 | + <react_2.HStack p={5}> | |
44 | + <react_2.Box display={{ base: "block", md: "none", }}> | |
45 | + <DrawerMenu /> | |
46 | + </react_2.Box> | |
47 | + </react_2.HStack> | |
48 | + <react_2.HStack alignItems="start"> | |
49 | + <react_2.Box display={{ base: "none", md: "block" }} w={500} px={6}> | |
50 | + <Navigation /> | |
51 | + </react_2.Box> | |
52 | + <react_2.Box>{children}</react_2.Box> | |
53 | + </react_2.HStack> | |
54 | + </react_2.Stack>); | |
55 | +}; | |
56 | +var SideMenu = function (_a) { | |
57 | + var children = _a.children; | |
58 | + return (<LayoutWithMenu> | |
59 | + <react_2.Box> | |
60 | + projectV v0.1 | |
61 | + {children} | |
62 | + </react_2.Box> | |
63 | + </LayoutWithMenu>); | |
64 | +}; | |
65 | +exports.default = SideMenu; |
@@ -7,7 +7,7 @@ exports.HomeIndex = void 0; | ||
7 | 7 | var react_1 = require("@chakra-ui/react"); |
8 | 8 | var react_2 = __importDefault(require("react")); |
9 | 9 | var link_1 = __importDefault(require("next/link")); |
10 | -var isDev = process.env; | |
10 | +var dev = process.env.NODE_ENV === "development"; | |
11 | 11 | var HomeIndex = function (_a) { |
12 | 12 | var link = _a.link, linktitle = _a.linktitle; |
13 | 13 | var url = "http://localhost:3000"; |
@@ -1,29 +1,34 @@ | ||
1 | 1 | "use strict"; |
2 | +var __importDefault = (this && this.__importDefault) || function (mod) { | |
3 | + return (mod && mod.__esModule) ? mod : { "default": mod }; | |
4 | +}; | |
2 | 5 | Object.defineProperty(exports, "__esModule", { value: true }); |
6 | +exports.ModalWindow = void 0; | |
3 | 7 | var react_1 = require("@chakra-ui/react"); |
4 | 8 | var react_2 = require("@chakra-ui/react"); |
5 | 9 | var react_3 = require("@chakra-ui/react"); |
6 | -function ModalWindow() { | |
7 | - var _a = (0, react_3.useDisclosure)(), isOpen = _a.isOpen, onOpen = _a.onOpen, onClose = _a.onClose; | |
10 | +var react_4 = __importDefault(require("react")); | |
11 | +var ModalWindow = function (_a) { | |
12 | + var buttontitle = _a.buttontitle, windowtitle = _a.windowtitle, children = _a.children; | |
13 | + var _b = (0, react_3.useDisclosure)(), isOpen = _b.isOpen, onOpen = _b.onOpen, onClose = _b.onClose; | |
8 | 14 | return (<> |
9 | - <react_2.Button onClick={onOpen}>Open Modal</react_2.Button> | |
15 | + <react_2.Button onClick={onOpen}>{buttontitle}</react_2.Button> | |
10 | 16 | |
11 | 17 | <react_1.Modal isOpen={isOpen} onClose={onClose}> |
12 | 18 | <react_1.ModalOverlay /> |
13 | 19 | <react_1.ModalContent> |
14 | - <react_1.ModalHeader>Test Title</react_1.ModalHeader> | |
20 | + <react_1.ModalHeader>{windowtitle}</react_1.ModalHeader> | |
15 | 21 | <react_1.ModalCloseButton /> |
16 | 22 | <react_1.ModalBody> |
17 | 23 | </react_1.ModalBody> |
18 | - Test Test Test | |
24 | + {children} | |
19 | 25 | <react_1.ModalFooter> |
20 | 26 | <react_2.Button colorScheme='blue' mr={3} onClick={onClose}> |
21 | 27 | Close |
22 | 28 | </react_2.Button> |
23 | - <react_2.Button variant='ghost'>Secondary Action</react_2.Button> | |
24 | 29 | </react_1.ModalFooter> |
25 | 30 | </react_1.ModalContent> |
26 | 31 | </react_1.Modal> |
27 | 32 | </>); |
28 | -} | |
29 | -exports.default = ModalWindow; | |
33 | +}; | |
34 | +exports.ModalWindow = ModalWindow; |
@@ -5,11 +5,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
5 | 5 | Object.defineProperty(exports, "__esModule", { value: true }); |
6 | 6 | exports.Uis = void 0; |
7 | 7 | var UIs_module_sass_1 = __importDefault(require("./UIs.module.sass")); |
8 | +var getWindowSize_1 = require("../getWindow/getWindowSize"); | |
9 | +var react_1 = require("@chakra-ui/react"); | |
10 | +var SideMenu_1 = __importDefault(require("./IndexSidemenu/SideMenu")); | |
8 | 11 | var Uis = function (_a) { |
9 | 12 | var children = _a.children; |
10 | - return (<div className={UIs_module_sass_1.default.Main}> | |
11 | - V metaverce console (for Admin) | |
12 | - {children} | |
13 | - </div>); | |
13 | + var _b = (0, getWindowSize_1.getWindowSize)(), height = _b.height, width = _b.width; | |
14 | + return (<react_1.Box className={UIs_module_sass_1.default.Main} style={{ | |
15 | + width: width, | |
16 | + height: height | |
17 | + }}> | |
18 | + <react_1.Box bgColor={'#ff2200'} textColor={'#000021'} p={3}> | |
19 | + <react_1.Text fontSize={30}>V metaverse for admin</react_1.Text> | |
20 | + </react_1.Box> | |
21 | + <react_1.Box p={7}> | |
22 | + <SideMenu_1.default> | |
23 | + Test | |
24 | + </SideMenu_1.default> | |
25 | + {children} | |
26 | + </react_1.Box> | |
27 | + </react_1.Box>); | |
14 | 28 | }; |
15 | 29 | exports.Uis = Uis; |
@@ -1,15 +1,9 @@ | ||
1 | 1 | "use strict"; |
2 | -var __importDefault = (this && this.__importDefault) || function (mod) { | |
3 | - return (mod && mod.__esModule) ? mod : { "default": mod }; | |
4 | -}; | |
5 | 2 | Object.defineProperty(exports, "__esModule", { value: true }); |
6 | -var HomeIndex_1 = require("./component/IndexWidgets/HomeIndex"); | |
7 | -var ModalWindow_1 = __importDefault(require("./component/Modal/ModalWindow")); | |
8 | -function Index() { | |
3 | +function Index(_a) { | |
4 | + var chldren = _a.chldren; | |
9 | 5 | return (<> |
10 | - Welcome to V!! | |
11 | - <ModalWindow_1.default /> | |
12 | - <HomeIndex_1.HomeIndex link="/Details/Setting/" linktitle="Test"/> | |
13 | - </>); | |
6 | + V{chldren} | |
7 | + </>); | |
14 | 8 | } |
15 | 9 | exports.default = Index; |
@@ -1,11 +0,0 @@ | ||
1 | -import { HomeIndex } from "../../component/IndexWidgets/HomeIndex" | |
2 | - | |
3 | -export default function Index () { | |
4 | - return ( | |
5 | - <> | |
6 | - Settings | |
7 | - <HomeIndex link="/" linktitle="Back"/> | |
8 | - </> | |
9 | - ) | |
10 | -} | |
11 | - |
@@ -0,0 +1,8 @@ | ||
1 | +export const UIs = ({children}: any) =>{ | |
2 | + return( | |
3 | + <> | |
4 | + V console - v1. | |
5 | + {children} | |
6 | + </> | |
7 | + ) | |
8 | +} | |
\ No newline at end of file |
@@ -1,14 +1,13 @@ | ||
1 | -import type { AppProps } from 'next/app'; | |
2 | -import "./styles/global.sass" | |
3 | -import { ChakraProvider } from '@chakra-ui/react'; | |
4 | -import {Uis} from "./component/Uis"; | |
1 | +import {AppProps} from "next/app"; | |
2 | +import { ChakraProvider } from "@chakra-ui/react"; | |
3 | +import { UIs } from "./UIs/UIs"; | |
5 | 4 | |
6 | -export default function App ({ Component, pageProps }: AppProps){ | |
7 | - return ( | |
8 | - <ChakraProvider> | |
9 | - <Uis> | |
10 | - <Component{...pageProps}/> | |
11 | - </Uis> | |
12 | - </ChakraProvider> | |
13 | - ) | |
14 | -} | |
5 | +export default function App ({Component, pageProps}: AppProps){ | |
6 | + return ( | |
7 | + <ChakraProvider> | |
8 | + <UIs> | |
9 | + <Component{...pageProps}/> | |
10 | + </UIs> | |
11 | + </ChakraProvider> | |
12 | + ) | |
13 | +} | |
\ No newline at end of file |
@@ -1,97 +0,0 @@ | ||
1 | -import React, {FC, ReactNode} from "react" | |
2 | -import { HamburgerIcon } from "@chakra-ui/icons" | |
3 | -import { | |
4 | - Box, | |
5 | - Button, | |
6 | - Drawer, | |
7 | - DrawerBody, | |
8 | - DrawerCloseButton, | |
9 | - DrawerContent, | |
10 | - DrawerHeader, | |
11 | - DrawerOverlay, | |
12 | - HStack, | |
13 | - Link, | |
14 | - LinkProps, | |
15 | - Stack, | |
16 | - useDisclosure | |
17 | -} from "@chakra-ui/react" | |
18 | - | |
19 | -const HoverLink = (props: LinkProps) => <Link rounded="base" _hover={{bg:"gray.200"}} p={2} {...props } /> | |
20 | - | |
21 | -const Navigation = () => { | |
22 | - return ( | |
23 | - <Stack as="nav"> | |
24 | - <HoverLink>Setting</HoverLink> | |
25 | - <HoverLink>Payment</HoverLink> | |
26 | - <HoverLink>- test -</HoverLink> | |
27 | - <HoverLink>- test -</HoverLink> | |
28 | - </Stack> | |
29 | - ) | |
30 | -} | |
31 | - | |
32 | -const DrawerMenu = () => { | |
33 | - const { isOpen, onOpen, onClose } = useDisclosure() | |
34 | - const btnRef = React.useRef<HTMLButtonElement>(null) | |
35 | - | |
36 | - return ( | |
37 | - <> | |
38 | - <Button ref={btnRef} onClick={onOpen}> | |
39 | - <HamburgerIcon /> | |
40 | - </Button> | |
41 | - <Drawer | |
42 | - isOpen={isOpen} | |
43 | - onClose={onClose} | |
44 | - placement="left" | |
45 | - finalFocusRef={btnRef} | |
46 | - > | |
47 | - <DrawerOverlay> | |
48 | - <DrawerContent> | |
49 | - <DrawerCloseButton /> | |
50 | - <DrawerHeader> | |
51 | - Menu | |
52 | - </DrawerHeader> | |
53 | - <DrawerBody> | |
54 | - <Navigation /> | |
55 | - </DrawerBody> | |
56 | - </DrawerContent> | |
57 | - </DrawerOverlay> | |
58 | - </Drawer> | |
59 | - </> | |
60 | - ) | |
61 | -} | |
62 | - | |
63 | - | |
64 | -type Props = { | |
65 | - children: ReactNode | |
66 | -} | |
67 | - | |
68 | -const LayoutWithMenu : FC<Props> = ({children}) => { | |
69 | - return ( | |
70 | - <Stack> | |
71 | - <HStack p={5}> | |
72 | - <Box display={{ base: "block", md: "none", }}> | |
73 | - <DrawerMenu /> | |
74 | - </Box> | |
75 | - </HStack> | |
76 | - <HStack alignItems="start" > | |
77 | - <Box display={{ base: "none", md: "block" }} w={500} px={6}> | |
78 | - <Navigation /> | |
79 | - </Box> | |
80 | - <Box>{children}</Box> | |
81 | - </HStack> | |
82 | - </Stack> | |
83 | - ) | |
84 | -} | |
85 | - | |
86 | -const SideMenu= ({children}: any) => { | |
87 | - return ( | |
88 | - <LayoutWithMenu> | |
89 | - <Box> | |
90 | - projectV v0.1 | |
91 | - {children} | |
92 | - </Box> | |
93 | - </LayoutWithMenu> | |
94 | - ) | |
95 | -} | |
96 | - | |
97 | -export default SideMenu | |
\ No newline at end of file |
@@ -1,17 +0,0 @@ | ||
1 | -import { Box, Text } from "@chakra-ui/react" | |
2 | -import React,{ FC,useEffect } from "react" | |
3 | -import Link from "next/link" | |
4 | -const dev = process.env.NODE_ENV === "development"; | |
5 | -type HomeIndexProps ={ | |
6 | - link: string | |
7 | - linktitle: string | |
8 | - dev: string | |
9 | -} | |
10 | -export const HomeIndex:FC<HomeIndexProps> = ({link,linktitle }) =>{ | |
11 | - const url = "http://localhost:3000" | |
12 | - return( | |
13 | - <Box> | |
14 | - <Link href={url + link}>{linktitle}</Link> | |
15 | - </Box> | |
16 | - ) | |
17 | -} |
@@ -1,44 +0,0 @@ | ||
1 | -import { | |
2 | - Modal, | |
3 | - ModalOverlay, | |
4 | - ModalContent, | |
5 | - ModalHeader, | |
6 | - ModalFooter, | |
7 | - ModalBody, | |
8 | - ModalCloseButton, | |
9 | -} from '@chakra-ui/react' | |
10 | -import { Button } from "@chakra-ui/react"; | |
11 | -import { useDisclosure } from "@chakra-ui/react"; | |
12 | -import React,{ FC } from "react" | |
13 | - | |
14 | -type ModalWindowProps = { | |
15 | - buttontitle: string | |
16 | - windowtitle: string | |
17 | - | |
18 | - children: any | |
19 | -} | |
20 | - | |
21 | -export const ModalWindow:FC<ModalWindowProps> = ({buttontitle,windowtitle ,children}) => { | |
22 | - const { isOpen, onOpen, onClose } = useDisclosure() | |
23 | - return ( | |
24 | - <> | |
25 | - <Button onClick={onOpen}>{buttontitle}</Button> | |
26 | - | |
27 | - <Modal isOpen={isOpen} onClose={onClose}> | |
28 | - <ModalOverlay /> | |
29 | - <ModalContent> | |
30 | - <ModalHeader>{windowtitle}</ModalHeader> | |
31 | - <ModalCloseButton /> | |
32 | - <ModalBody> | |
33 | - </ModalBody> | |
34 | - {children} | |
35 | - <ModalFooter> | |
36 | - <Button colorScheme='blue' mr={3} onClick={onClose}> | |
37 | - Close | |
38 | - </Button> | |
39 | - </ModalFooter> | |
40 | - </ModalContent> | |
41 | - </Modal> | |
42 | - </> | |
43 | - ) | |
44 | -} |
@@ -1,6 +0,0 @@ | ||
1 | -.Main { | |
2 | - background-color: #000011; | |
3 | - color: #ff2200; | |
4 | -} | |
5 | - | |
6 | -/*# sourceMappingURL=UIs.module.css.map */ |
@@ -1 +0,0 @@ | ||
1 | -{"version":3,"sourceRoot":"","sources":["UIs.module.sass"],"names":[],"mappings":"AAGA;EACE,kBAJW;EAKX,OAJM","file":"UIs.module.css"} | |
\ No newline at end of file |
@@ -1,7 +0,0 @@ | ||
1 | -$background: #000011 | |
2 | -$color: #ff2200 | |
3 | - | |
4 | -.Main | |
5 | - background-color: $background | |
6 | - color: $color | |
7 | - |
@@ -1,27 +0,0 @@ | ||
1 | -import UItStyle from "./UIs.module.sass" | |
2 | -import { getWindowSize } from "../getWindow/getWindowSize"; | |
3 | -import { Box,Text } from "@chakra-ui/react" | |
4 | -import SideMenu from "./IndexSidemenu/SideMenu"; | |
5 | - | |
6 | -export const Uis = ({children}: any) =>{ | |
7 | - const { height, width } = getWindowSize(); | |
8 | - return( | |
9 | - <Box className={UItStyle.Main} style={{ | |
10 | - width: width, | |
11 | - height: height | |
12 | - }}> | |
13 | - <Box bgColor={'#ff2200'} | |
14 | - textColor={'#000021'} | |
15 | - p={3} > | |
16 | - <Text fontSize={30}>V metaverse for admin</Text> | |
17 | - </Box> | |
18 | - <Box p={7}> | |
19 | - <SideMenu> | |
20 | - Test | |
21 | - </SideMenu> | |
22 | - {children} | |
23 | - </Box> | |
24 | - </Box> | |
25 | - ) | |
26 | -} | |
27 | - |
@@ -1,27 +0,0 @@ | ||
1 | -import { useEffect, useState } from "react"; | |
2 | - | |
3 | -export const getWindowSize = () => { | |
4 | - const [windowSize, setWindowSize] = useState({ | |
5 | - width: 0, | |
6 | - height: 0, | |
7 | - }); | |
8 | - | |
9 | - useEffect(() => { | |
10 | - if (typeof window !== "undefined") { | |
11 | - const handleResize = () => { | |
12 | - setWindowSize({ | |
13 | - width: | |
14 | - window.innerWidth, | |
15 | - height: window.innerHeight, | |
16 | - }); | |
17 | - }; | |
18 | - | |
19 | - window.addEventListener("resize", handleResize); | |
20 | - handleResize(); | |
21 | - return () => window.removeEventListener("resize", handleResize); | |
22 | - } else { | |
23 | - return; | |
24 | - } | |
25 | - }, []); | |
26 | - return windowSize; | |
27 | -}; | |
\ No newline at end of file |
@@ -1,18 +1,6 @@ | ||
1 | -import { Box,Text } from "@chakra-ui/react"; | |
2 | -import { HomeIndex } from "./component/IndexWidgets/HomeIndex"; | |
3 | -import {ModalWindow} from "./component/Modal/ModalWindow"; | |
4 | -export default function Index (){ | |
5 | - return ( | |
6 | - <> | |
7 | - <ModalWindow buttontitle={'aaa'} windowtitle={'Test'}> | |
8 | - <Box h={200} bgColor={'red'}> | |
9 | - <Text>SSS</Text> | |
10 | - </Box> | |
11 | - <Box h={200} bgColor={'blue'}> | |
12 | - <Text>SSS</Text> | |
13 | - </Box> | |
14 | - </ModalWindow> | |
15 | - <HomeIndex link="/Details/Setting/" linktitle="Test"/> | |
16 | - </> | |
17 | - ) | |
18 | -} | |
1 | +export default function Index () { | |
2 | + return ( | |
3 | + <> | |
4 | + </> | |
5 | + ) | |
6 | +} | |
\ No newline at end of file |
@@ -1,6 +0,0 @@ | ||
1 | -* { | |
2 | - padding: 0; | |
3 | - margin: 0; | |
4 | -} | |
5 | - | |
6 | -/*# sourceMappingURL=global.css.map */ |
@@ -1 +0,0 @@ | ||
1 | -{"version":3,"sourceRoot":"","sources":["global.sass"],"names":[],"mappings":"AAGA;EACE;EACA","file":"global.css"} | |
\ No newline at end of file |
@@ -1,7 +0,0 @@ | ||
1 | -$background: #000011 | |
2 | -$color: #ff2200 | |
3 | - | |
4 | -* | |
5 | - padding: 0 | |
6 | - margin: 0 | |
7 | - |
@@ -1,13 +0,0 @@ | ||
1 | -import type { NextPage } from "next"; | |
2 | -import { getWindowSize } from "./getWindow/getWindowSize"; | |
3 | - | |
4 | -const Home: NextPage = () => { | |
5 | - const { height, width } = getWindowSize(); | |
6 | - return ( | |
7 | - <div> | |
8 | - height:{height} width:{width} | |
9 | - </div> | |
10 | - ); | |
11 | -}; | |
12 | - | |
13 | -export default Home; | |
\ No newline at end of file |