• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

metaverse platform project


Commit MetaInfo

Révision25661e6f7aece052f7a1d55157cd93fdf1800fd8 (tree)
l'heure2023-01-10 21:14:58
AuteurNknight AMAMIYA <88763245+NknightA@user...>
CommiterNknight AMAMIYA

Message de Log

edit UIfiles.

Change Summary

Modification

--- /dev/null
+++ b/dist/config/Config.jsx
@@ -0,0 +1,4 @@
1+"use strict";
2+Object.defineProperty(exports, "__esModule", { value: true });
3+exports.URL = void 0;
4+exports.URL = "http://localhost:3000/";
--- /dev/null
+++ b/dist/pages/Details/Setting/index.jsx
@@ -0,0 +1,10 @@
1+"use strict";
2+Object.defineProperty(exports, "__esModule", { value: true });
3+var HomeIndex_1 = require("../../component/IndexWidgets/HomeIndex");
4+function Index() {
5+ return (<>
6+ Settings
7+ <HomeIndex_1.HomeIndex link="/" linktitle="Back"/>
8+ </>);
9+}
10+exports.default = Index;
--- /dev/null
+++ b/dist/pages/UIs/UITheme.jsx
@@ -0,0 +1,13 @@
1+"use strict";
2+Object.defineProperty(exports, "__esModule", { value: true });
3+var react_1 = require("@chakra-ui/react");
4+function UItheme(_a) {
5+ var children = _a.children;
6+ return (<react_1.Box bgColor="#000021" textColor="#fff" h="100vh">
7+ <react_1.Box bgColor="#ff3400" textColor="#000021" p={2} fontSize={30}>
8+ V Dev console. version -
9+ </react_1.Box>
10+ {children}
11+ </react_1.Box>);
12+}
13+exports.default = UItheme;
--- a/dist/pages/_app.jsx
+++ b/dist/pages/_app.jsx
@@ -1,10 +1,14 @@
11 "use strict";
22 Object.defineProperty(exports, "__esModule", { value: true });
3+require("./styles/global.sass");
4+var react_1 = require("@chakra-ui/react");
35 var Uis_1 = require("./component/Uis");
46 function App(_a) {
57 var Component = _a.Component, pageProps = _a.pageProps;
6- return (<Uis_1.Uis>
7- <Component {...pageProps}/>
8- </Uis_1.Uis>);
8+ return (<react_1.ChakraProvider>
9+ <Uis_1.Uis>
10+ <Component {...pageProps}/>
11+ </Uis_1.Uis>
12+ </react_1.ChakraProvider>);
913 }
1014 exports.default = App;
--- /dev/null
+++ b/dist/pages/component/IndexWidgets/HomeIndex.jsx
@@ -0,0 +1,18 @@
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+exports.HomeIndex = void 0;
7+var react_1 = require("@chakra-ui/react");
8+var react_2 = __importDefault(require("react"));
9+var link_1 = __importDefault(require("next/link"));
10+var isDev = process.env;
11+var HomeIndex = function (_a) {
12+ var link = _a.link, linktitle = _a.linktitle;
13+ var url = "http://localhost:3000";
14+ return (<react_1.Box>
15+ <link_1.default href={url + link}>{linktitle}</link_1.default>
16+ </react_1.Box>);
17+};
18+exports.HomeIndex = HomeIndex;
--- /dev/null
+++ b/dist/pages/component/Modal/ModalWindow.jsx
@@ -0,0 +1,29 @@
1+"use strict";
2+Object.defineProperty(exports, "__esModule", { value: true });
3+var react_1 = require("@chakra-ui/react");
4+var react_2 = require("@chakra-ui/react");
5+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;
8+ return (<>
9+ <react_2.Button onClick={onOpen}>Open Modal</react_2.Button>
10+
11+ <react_1.Modal isOpen={isOpen} onClose={onClose}>
12+ <react_1.ModalOverlay />
13+ <react_1.ModalContent>
14+ <react_1.ModalHeader>Test Title</react_1.ModalHeader>
15+ <react_1.ModalCloseButton />
16+ <react_1.ModalBody>
17+ </react_1.ModalBody>
18+ Test Test Test
19+ <react_1.ModalFooter>
20+ <react_2.Button colorScheme='blue' mr={3} onClick={onClose}>
21+ Close
22+ </react_2.Button>
23+ <react_2.Button variant='ghost'>Secondary Action</react_2.Button>
24+ </react_1.ModalFooter>
25+ </react_1.ModalContent>
26+ </react_1.Modal>
27+ </>);
28+}
29+exports.default = ModalWindow;
--- a/dist/pages/index.jsx
+++ b/dist/pages/index.jsx
@@ -1,8 +1,15 @@
11 "use strict";
2+var __importDefault = (this && this.__importDefault) || function (mod) {
3+ return (mod && mod.__esModule) ? mod : { "default": mod };
4+};
25 Object.defineProperty(exports, "__esModule", { value: true });
6+var HomeIndex_1 = require("./component/IndexWidgets/HomeIndex");
7+var ModalWindow_1 = __importDefault(require("./component/Modal/ModalWindow"));
38 function Index() {
49 return (<>
5- testing
10+ Welcome to V!!
11+ <ModalWindow_1.default />
12+ <HomeIndex_1.HomeIndex link="/Details/Setting/" linktitle="Test"/>
613 </>);
714 }
815 exports.default = Index;
--- /dev/null
+++ b/dist/pages/test.jsx
@@ -0,0 +1,10 @@
1+"use strict";
2+Object.defineProperty(exports, "__esModule", { value: true });
3+var getWindowSize_1 = require("./getWindow/getWindowSize");
4+var Home = function () {
5+ var _a = (0, getWindowSize_1.getWindowSize)(), height = _a.height, width = _a.width;
6+ return (<div>
7+ height:{height} width:{width}
8+ </div>);
9+};
10+exports.default = Home;
--- a/dist/server/index.js
+++ b/dist/server/index.js
@@ -41,7 +41,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4141 Object.defineProperty(exports, "__esModule", { value: true });
4242 var express_1 = __importDefault(require("express"));
4343 var next_1 = __importDefault(require("next"));
44-var router_1 = require("../pages/api/router");
4544 var dev = process.env.NODE_ENV === "development";
4645 var port = 3000;
4746 var app = (0, next_1.default)({ dev: dev });
@@ -57,7 +56,6 @@ var server = (0, express_1.default)();
5756 case 1:
5857 _a.sent();
5958 server_1 = (0, express_1.default)();
60- server_1.use("/api", router_1.router);
6159 server_1.all("*", function (req, res) {
6260 return handle(req, res);
6361 });
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
88 "name": "v",
99 "version": "0.1.0",
1010 "dependencies": {
11+ "@chakra-ui/icons": "^2.0.15",
1112 "@chakra-ui/react": "^2.4.6",
1213 "@emotion/react": "^11.10.5",
1314 "@emotion/styled": "^11.10.5",
@@ -21,6 +22,7 @@
2122 "eslint-config-next": "13.1.1",
2223 "express": "^4.18.2",
2324 "framer-motion": "^8.3.3",
25+ "isdev": "^1.0.1",
2426 "next": "13.1.1",
2527 "react": "18.2.0",
2628 "react-dom": "18.2.0",
@@ -794,6 +796,18 @@
794796 "react": ">=18"
795797 }
796798 },
799+ "node_modules/@chakra-ui/icons": {
800+ "version": "2.0.15",
801+ "resolved": "https://registry.npmjs.org/@chakra-ui/icons/-/icons-2.0.15.tgz",
802+ "integrity": "sha512-/Hsefej7DfRMg+Go+gf/UU4PHNMPmba41ogO1K3242aP9VSs/6/qXB3zrZHl21OX/rdrK408VqYEPInLmUwiHw==",
803+ "dependencies": {
804+ "@chakra-ui/icon": "3.0.14"
805+ },
806+ "peerDependencies": {
807+ "@chakra-ui/system": ">=2.0.0",
808+ "react": ">=18"
809+ }
810+ },
797811 "node_modules/@chakra-ui/image": {
798812 "version": "2.0.13",
799813 "resolved": "https://registry.npmjs.org/@chakra-ui/image/-/image-2.0.13.tgz",
@@ -4792,6 +4806,11 @@
47924806 "node": ">=8"
47934807 }
47944808 },
4809+ "node_modules/isdev": {
4810+ "version": "1.0.1",
4811+ "resolved": "https://registry.npmjs.org/isdev/-/isdev-1.0.1.tgz",
4812+ "integrity": "sha512-DThobhVvTNizIR+xsuQslZMT03pPktdCw/OVmWfbeAFrolz6rLkLK7CYvPdOPBcnCHTUDemm95Ga3IbQb+XgbA=="
4813+ },
47954814 "node_modules/isexe": {
47964815 "version": "2.0.0",
47974816 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -7396,6 +7415,14 @@
73967415 "@chakra-ui/shared-utils": "2.0.4"
73977416 }
73987417 },
7418+ "@chakra-ui/icons": {
7419+ "version": "2.0.15",
7420+ "resolved": "https://registry.npmjs.org/@chakra-ui/icons/-/icons-2.0.15.tgz",
7421+ "integrity": "sha512-/Hsefej7DfRMg+Go+gf/UU4PHNMPmba41ogO1K3242aP9VSs/6/qXB3zrZHl21OX/rdrK408VqYEPInLmUwiHw==",
7422+ "requires": {
7423+ "@chakra-ui/icon": "3.0.14"
7424+ }
7425+ },
73997426 "@chakra-ui/image": {
74007427 "version": "2.0.13",
74017428 "resolved": "https://registry.npmjs.org/@chakra-ui/image/-/image-2.0.13.tgz",
@@ -10318,6 +10345,11 @@
1031810345 "is-docker": "^2.0.0"
1031910346 }
1032010347 },
10348+ "isdev": {
10349+ "version": "1.0.1",
10350+ "resolved": "https://registry.npmjs.org/isdev/-/isdev-1.0.1.tgz",
10351+ "integrity": "sha512-DThobhVvTNizIR+xsuQslZMT03pPktdCw/OVmWfbeAFrolz6rLkLK7CYvPdOPBcnCHTUDemm95Ga3IbQb+XgbA=="
10352+ },
1032110353 "isexe": {
1032210354 "version": "2.0.0",
1032310355 "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
--- a/package.json
+++ b/package.json
@@ -3,13 +3,14 @@
33 "version": "0.1.0",
44 "private": true,
55 "scripts": {
6- "ts": "tsc -p tsconfig.server.json && cross-env NODE_ENV=development node ./dist/pages/index.jsx",
6+ "ts": "tsc -p tsconfig.server.json && cross-env NODE_ENV=development node ./dist/server/index.js",
77 "dev": "cross-env NODE_ENV=development nodemon",
88 "build": "next build",
99 "start": "next start",
1010 "lint": "next lint"
1111 },
1212 "dependencies": {
13+ "@chakra-ui/icons": "^2.0.15",
1314 "@chakra-ui/react": "^2.4.6",
1415 "@emotion/react": "^11.10.5",
1516 "@emotion/styled": "^11.10.5",
@@ -23,6 +24,7 @@
2324 "eslint-config-next": "13.1.1",
2425 "express": "^4.18.2",
2526 "framer-motion": "^8.3.3",
27+ "isdev": "^1.0.1",
2628 "next": "13.1.1",
2729 "react": "18.2.0",
2830 "react-dom": "18.2.0",
--- a/pages/Details/Setting/index.tsx
+++ b/pages/Details/Setting/index.tsx
@@ -4,7 +4,7 @@ export default function Index () {
44 return (
55 <>
66 Settings
7- <HomeIndex link="../../" linkitle="Back"/>
7+ <HomeIndex link="/" linktitle="Back"/>
88 </>
99 )
1010 }
--- a/pages/UIs/UITheme.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
1-import { Box } from "@chakra-ui/react";
2-
3-export default function UItheme ({children}: any) {
4- return (
5- <Box bgColor="#000021" textColor="#fff"
6- h="100vh">
7- <Box bgColor="#ff3400"
8- textColor="#000021"
9- p={2} fontSize={30}>
10- V Dev console. version -
11- </Box>
12- {children}
13- </Box>
14- )
15-}
16-
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,14 +1,14 @@
11 import type { AppProps } from 'next/app';
2-import UItheme from './UIs/UITheme';
32 import "./styles/global.sass"
43 import { ChakraProvider } from '@chakra-ui/react';
4+import {Uis} from "./component/Uis";
55
66 export default function App ({ Component, pageProps }: AppProps){
77 return (
88 <ChakraProvider>
9- <UItheme>
9+ <Uis>
1010 <Component{...pageProps}/>
11- </UItheme>
11+ </Uis>
1212 </ChakraProvider>
1313 )
1414 }
--- a/pages/api/router.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
1-import express, { Request, Response } from "express"
2-
3-export const router = express.Router();
4-
5-router.get("/" , (req: Request, res: Response, next ) => {
6- res.status(200).json(`Hello V!`);
7-});
8-
9-
10-router.post("/" , (req: Request, res: Response, next ) => {
11- res.status(200).json(`Post`);
12-});
--- /dev/null
+++ b/pages/component/IndexSidemenu/SideMenu.tsx
@@ -0,0 +1,97 @@
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
--- a/pages/component/IndexWidgets/HomeIndex.tsx
+++ b/pages/component/IndexWidgets/HomeIndex.tsx
@@ -4,16 +4,15 @@ import Link from "next/link"
44
55 type HomeIndexProps ={
66 link: string
7- linkitle: string
8- url: string
7+ linktitle: string
98 }
109
11-const url = "http://localhost:3000";
10+export const HomeIndex:FC<HomeIndexProps> = ({link,linktitle}) =>{
11+ const url = "http://localhost:3000";
1212
13-export const HomeIndex:FC<HomeIndexProps> = ({link,linkitle}) =>{
1413 return (
1514 <Box>
16- <Link href={link}>{linkitle}</Link>
15+ <Link href={url + link}>{linktitle}</Link>
1716 </Box>
1817 )
1918 }
--- /dev/null
+++ b/pages/component/Modal/ModalWindow.tsx
@@ -0,0 +1,44 @@
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+}
--- a/pages/component/Uis.tsx
+++ b/pages/component/Uis.tsx
@@ -1,15 +1,27 @@
11 import UItStyle from "./UIs.module.sass"
22 import { getWindowSize } from "../getWindow/getWindowSize";
3+import { Box,Text } from "@chakra-ui/react"
4+import SideMenu from "./IndexSidemenu/SideMenu";
5+
36 export const Uis = ({children}: any) =>{
47 const { height, width } = getWindowSize();
58 return(
6- <div className={UItStyle.Main} style={{
9+ <Box className={UItStyle.Main} style={{
710 width: width,
811 height: height
912 }}>
10- V metaverce console (for Admin)
11- {children}
12- </div>
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>
1325 )
1426 }
1527
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1,11 +1,18 @@
1-import { Box } from "@chakra-ui/react";
1+import { Box,Text } from "@chakra-ui/react";
22 import { HomeIndex } from "./component/IndexWidgets/HomeIndex";
3-
3+import {ModalWindow} from "./component/Modal/ModalWindow";
44 export default function Index (){
55 return (
66 <>
7- Welcome to V!!
8- <HomeIndex link="/Details/Setting/" linkitle="Test"/>
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"/>
916 </>
1017 )
1118 }
--- a/server/index.ts
+++ b/server/index.ts
@@ -1,6 +1,5 @@
11 import express , { Request, Response} from "express";
22 import next from "next";
3-import {router} from "../pages/api/router";
43
54 const dev = process.env.NODE_ENV === "development";
65 const port = 3000;
@@ -11,7 +10,6 @@ const server = express();
1110 try {
1211 await app.prepare();
1312 const server = express();
14- server.use("/api", router);
1513 server.all("*", (req: Request, res: Response) =>{
1614 return handle(req, res);
1715 })