frontend restructured

This commit is contained in:
realaravinth
2021-04-05 17:26:58 +05:30
parent 2ce8a46a3f
commit 312d02a41d
20 changed files with 594 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
import './auth/forms.scss';
import signin from './auth/login';
import registerUser from './auth/register';
import {run as runPanel} from './panel/index';
import {checkUsernameEventHandler} from './auth/register/userExists';
if (window.location.pathname == '/') {
let form = document.getElementById('form');
form.addEventListener('submit', signin, true);
} else if (window.location.pathname == '/signup') {
let form = document.getElementById('form');
form.addEventListener('submit', registerUser, true);
let username = document.getElementById('username');
username.addEventListener('input', checkUsernameEventHandler, false);
} else if (window.location.pathname.includes('panel')) {
runPanel();
} else {
}
//export default signin;