Compare commits

...

2 Commits

Author SHA1 Message Date
Nikolai Petukhov
811e9448b0 0.2.1 2024-09-20 11:01:45 +03:00
Nikolai Petukhov
5ef5ca35b2 init structure is completed 2024-09-20 11:01:23 +03:00
24 changed files with 164 additions and 34 deletions

View File

@ -9,8 +9,11 @@ module.exports = {
},
navigations: {
'enterfront.main': '/enterfront',
'link.enterfront.auth': '/enterfront/auth',
'link.enterfront.account': '/enterfront/account',
'enterfront.home': '/enterfront/home',
'enterfront.auth': '/enterfront/auth',
'enterfront.reg': '/enterfront/reg',
'enterfront.account': '/enterfront/account',
'enterfront.chat': '/enterfront/chat',
},
features: {
'undefined': {

4
package-lock.json generated
View File

@ -14,7 +14,7 @@
"react-router-dom": "^6.26.1",
"typescript": "^5.5.4"
},
"version": "0.2.0"
"version": "0.2.1"
},
"node_modules/@ampproject/remapping": {
"version": "2.3.0",
@ -7800,5 +7800,5 @@
}
}
},
"version": "0.2.0"
"version": "0.2.1"
}

View File

@ -17,5 +17,5 @@
"clean": "rimraf dist"
},
"name": "enterfront",
"version": "0.2.0"
"version": "0.2.1"
}

View File

@ -3,14 +3,22 @@ import pkg from '../../package.json';
const baseUrl = getNavigationsValue(`${(pkg as any).name}.main`);
const navs = getNavigations();
const makeUrl = url => url;
export const URLs = {
baseUrl,
baseUrl, // init
home: {
url: navs[`${(pkg as any).name}.home`],
},
chat: {
url: navs[`${(pkg as any).name}.chat`],
},
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: {
url: makeUrl(navs[`link.${(pkg as any).name}.account`]),
}
url: navs[`${(pkg as any).name}.account`],
},
};

View File

@ -1,12 +1,16 @@
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import "./index.css"
import { Dashboard } from './dashboard';
import Interlocutor from './backend/interlocutor/Interlocutor.js'
import User from './backend/user/User.js'
const App = () => {
return(
<BrowserRouter>
<Dashboard />
<Dashboard/>
</BrowserRouter>
)
}

View 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
View File

@ -0,0 +1,3 @@
export default class User {
}

View File

@ -0,0 +1 @@
@import "../reg/css/index.css";

View 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;

View File

View File

@ -1,18 +1,25 @@
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 HomePage from './pages/HomePage.jsx'
import Hello from './pages/Hello.jsx'
import Home from './pages/Home.jsx'
import Init from './pages/Init.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 = () => {
return (
<Routes>
<Route path={URLs.baseUrl} element={<HomePage/>}/>
<Route path={URLs.auth.url} element={<Hello/>} />
<Route path={URLs.baseUrl} element={<Init/>}/>
<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="*" element={<h1>404 page not found</h1>}/>
</Routes>
);
};

9
src/header/Header.jsx Normal file
View 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
View File

14
src/index.css Normal file
View 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
View File

@ -0,0 +1,9 @@
import React from 'react';
const Chat = () => {
return (
<h2>Chat with ...</h2>
);
};
export default Chat;

View File

@ -1,9 +0,0 @@
import React from "react";
const Hello = () => {
return (
<h1>Hello!</h1>
)
}
export default Hello;

9
src/pages/Home.jsx Normal file
View File

@ -0,0 +1,9 @@
import React from "react";
const Home = () => {
return (
<h1 className="TestClass">Home</h1>
)
}
export default Home

View File

@ -1,9 +0,0 @@
import React from "react";
const HomePage = () => {
return (
<h1>Home</h1>
)
}
export default HomePage

9
src/pages/Init.jsx Normal file
View 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
View 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
View 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
View File

@ -0,0 +1,5 @@
@import "init.css";
.TestClass {
color: red;
}

3
src/pages/css/init.css Normal file
View File

@ -0,0 +1,3 @@
.TestInit {
color: blue;
}

18
versions.md Normal file
View 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*