Compare commits
2 Commits
626d556e1a
...
811e9448b0
Author | SHA1 | Date | |
---|---|---|---|
|
811e9448b0 | ||
|
5ef5ca35b2 |
@ -9,8 +9,11 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
navigations: {
|
navigations: {
|
||||||
'enterfront.main': '/enterfront',
|
'enterfront.main': '/enterfront',
|
||||||
'link.enterfront.auth': '/enterfront/auth',
|
'enterfront.home': '/enterfront/home',
|
||||||
'link.enterfront.account': '/enterfront/account',
|
'enterfront.auth': '/enterfront/auth',
|
||||||
|
'enterfront.reg': '/enterfront/reg',
|
||||||
|
'enterfront.account': '/enterfront/account',
|
||||||
|
'enterfront.chat': '/enterfront/chat',
|
||||||
},
|
},
|
||||||
features: {
|
features: {
|
||||||
'undefined': {
|
'undefined': {
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -14,7 +14,7 @@
|
|||||||
"react-router-dom": "^6.26.1",
|
"react-router-dom": "^6.26.1",
|
||||||
"typescript": "^5.5.4"
|
"typescript": "^5.5.4"
|
||||||
},
|
},
|
||||||
"version": "0.2.0"
|
"version": "0.2.1"
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
@ -7800,5 +7800,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "0.2.0"
|
"version": "0.2.1"
|
||||||
}
|
}
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
"clean": "rimraf dist"
|
"clean": "rimraf dist"
|
||||||
},
|
},
|
||||||
"name": "enterfront",
|
"name": "enterfront",
|
||||||
"version": "0.2.0"
|
"version": "0.2.1"
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,22 @@ import pkg from '../../package.json';
|
|||||||
|
|
||||||
const baseUrl = getNavigationsValue(`${(pkg as any).name}.main`);
|
const baseUrl = getNavigationsValue(`${(pkg as any).name}.main`);
|
||||||
const navs = getNavigations();
|
const navs = getNavigations();
|
||||||
const makeUrl = url => url;
|
|
||||||
|
|
||||||
export const URLs = {
|
export const URLs = {
|
||||||
baseUrl,
|
baseUrl, // init
|
||||||
|
home: {
|
||||||
|
url: navs[`${(pkg as any).name}.home`],
|
||||||
|
},
|
||||||
|
chat: {
|
||||||
|
url: navs[`${(pkg as any).name}.chat`],
|
||||||
|
},
|
||||||
auth: {
|
auth: {
|
||||||
url: makeUrl(navs[`link.${(pkg as any).name}.auth`]),
|
url: navs[`${(pkg as any).name}.auth`], // sign in
|
||||||
|
},
|
||||||
|
reg: {
|
||||||
|
url: navs[`${(pkg as any).name}.reg`], // sign up
|
||||||
},
|
},
|
||||||
account: {
|
account: {
|
||||||
url: makeUrl(navs[`link.${(pkg as any).name}.account`]),
|
url: navs[`${(pkg as any).name}.account`],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
|
|
||||||
|
import "./index.css"
|
||||||
import { Dashboard } from './dashboard';
|
import { Dashboard } from './dashboard';
|
||||||
|
|
||||||
|
import Interlocutor from './backend/interlocutor/Interlocutor.js'
|
||||||
|
import User from './backend/user/User.js'
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
return(
|
return(
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
|
8
src/backend/interlocutor/Interlocutor.js
Normal file
8
src/backend/interlocutor/Interlocutor.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export default class Interlocutor {
|
||||||
|
constructor(id, name) {
|
||||||
|
this.name = name
|
||||||
|
this.id = id
|
||||||
|
}
|
||||||
|
static name;
|
||||||
|
static id;
|
||||||
|
}
|
3
src/backend/user/User.js
Normal file
3
src/backend/user/User.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default class User {
|
||||||
|
|
||||||
|
}
|
1
src/components/css/index.css
Normal file
1
src/components/css/index.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
@import "../reg/css/index.css";
|
12
src/components/reg/InputField.jsx
Normal file
12
src/components/reg/InputField.jsx
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const InputField = (props) => {
|
||||||
|
return (
|
||||||
|
<input
|
||||||
|
onChange={(e) => props.setValue(e.target.value)}
|
||||||
|
value={props.value}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default InputField;
|
0
src/components/reg/css/index.css
Normal file
0
src/components/reg/css/index.css
Normal file
@ -1,18 +1,25 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Routes, Route, Navigate } from 'react-router-dom';
|
import { Routes, Route } from 'react-router-dom';
|
||||||
|
|
||||||
import { URLs } from './__data__/urls';
|
import { URLs } from './__data__/urls';
|
||||||
|
|
||||||
import HomePage from './pages/HomePage.jsx'
|
import Home from './pages/Home.jsx'
|
||||||
import Hello from './pages/Hello.jsx'
|
import Init from './pages/Init.jsx'
|
||||||
import Account from './pages/Account.jsx'
|
import Account from './pages/Account.jsx'
|
||||||
|
import Chat from './pages/Chat.jsx'
|
||||||
|
import SignIn from './pages/SignIn.jsx'
|
||||||
|
import SignUp from './pages/SignUp.jsx'
|
||||||
|
|
||||||
export const Dashboard = () => {
|
export const Dashboard = () => {
|
||||||
return (
|
return (
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path={URLs.baseUrl} element={<HomePage/>}/>
|
<Route path={URLs.baseUrl} element={<Init/>}/>
|
||||||
<Route path={URLs.auth.url} element={<Hello/>} />
|
<Route path={URLs.home.url} element={<Home/>}/>
|
||||||
|
<Route path={URLs.chat.url} element={<Chat/>}/>
|
||||||
|
<Route path={URLs.auth.url} element={<SignIn/>}/>
|
||||||
|
<Route path={URLs.reg.url} element={<SignUp/>}/>
|
||||||
<Route path={URLs.account.url} element={<Account/>}/>
|
<Route path={URLs.account.url} element={<Account/>}/>
|
||||||
|
<Route path="*" element={<h1>404 page not found</h1>}/>
|
||||||
</Routes>
|
</Routes>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
9
src/header/Header.jsx
Normal file
9
src/header/Header.jsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const Header = () => {
|
||||||
|
return (
|
||||||
|
<div>Header</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Header;
|
0
src/header/css/index.css
Normal file
0
src/header/css/index.css
Normal file
14
src/index.css
Normal file
14
src/index.css
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@import "pages/css/index.css";
|
||||||
|
@import "header/css/index.css";
|
||||||
|
@import "components/css/index.css";
|
||||||
|
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
9
src/pages/Chat.jsx
Normal file
9
src/pages/Chat.jsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const Chat = () => {
|
||||||
|
return (
|
||||||
|
<h2>Chat with ...</h2>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Chat;
|
@ -1,9 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
|
|
||||||
const Hello = () => {
|
|
||||||
return (
|
|
||||||
<h1>Hello!</h1>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Hello;
|
|
9
src/pages/Home.jsx
Normal file
9
src/pages/Home.jsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const Home = () => {
|
||||||
|
return (
|
||||||
|
<h1 className="TestClass">Home</h1>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Home
|
@ -1,9 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
|
|
||||||
const HomePage = () => {
|
|
||||||
return (
|
|
||||||
<h1>Home</h1>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HomePage
|
|
9
src/pages/Init.jsx
Normal file
9
src/pages/Init.jsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const Init = () => {
|
||||||
|
return (
|
||||||
|
<h1 className="TestInit">Init page</h1>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Init;
|
13
src/pages/SignIn.jsx
Normal file
13
src/pages/SignIn.jsx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import InputField from "../components/reg/InputField.jsx";
|
||||||
|
|
||||||
|
const SignIn = () => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>SignIn</h1>
|
||||||
|
<InputField/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SignIn;
|
13
src/pages/SignUp.jsx
Normal file
13
src/pages/SignUp.jsx
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import InputField from "../components/reg/InputField.jsx";
|
||||||
|
|
||||||
|
const SignUp = () => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>SignUp</h1>
|
||||||
|
<InputField/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SignUp;
|
5
src/pages/css/index.css
Normal file
5
src/pages/css/index.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@import "init.css";
|
||||||
|
|
||||||
|
.TestClass {
|
||||||
|
color: red;
|
||||||
|
}
|
3
src/pages/css/init.css
Normal file
3
src/pages/css/init.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.TestInit {
|
||||||
|
color: blue;
|
||||||
|
}
|
18
versions.md
Normal file
18
versions.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Instruction to create tags and versions
|
||||||
|
|
||||||
|
```
|
||||||
|
npm version <type>
|
||||||
|
```
|
||||||
|
|
||||||
|
Here <type> can be:
|
||||||
|
- `patch` - the smallest update, 1.2.3 -> 1.2.**4**
|
||||||
|
- `minor` - 1.**2**.3 -> 1.**3**.0
|
||||||
|
- `major` - the greatest, **1**.2.3 -> **2**.0.0
|
||||||
|
|
||||||
|
To submit tag (previous command is treated as a commit):
|
||||||
|
```
|
||||||
|
git push --tags
|
||||||
|
```
|
||||||
|
|
||||||
|
The version in `package.json` will be updated automatically\
|
||||||
|
After that add new version to *brojs-admin*
|
Loading…
Reference in New Issue
Block a user