Login / Register / SideMenu / Fixes

This commit is contained in:
2020-08-09 17:50:53 +02:00
parent e5a68f4b85
commit 769be397e5
19 changed files with 960 additions and 160 deletions

View File

@@ -22,10 +22,10 @@ export const hideLoginDialog = () => {
};
};
export const setLoggedIn = (username) => {
export const setLoggedIn = (username, jwt, id, email) => {
return {
type: "SET_LOGGEDIN",
payload: username,
payload: { username: username, jwt: jwt, id: id, email: email },
};
};
@@ -34,3 +34,59 @@ export const setLoggedOut = () => {
type: "SET_LOGGEDOUT",
};
};
export const showRegisterDialog = () => {
return {
type: "DIALOG_REGISTER_VISIBLE",
};
};
export const hideRegisterDialog = () => {
return {
type: "DIALOG_REGISTER_HIDDEN",
};
};
export const showRegulaminDialog = () => {
return {
type: "DIALOG_REGULAMIN_VISIBLE",
};
};
export const hideRegulaminDialog = () => {
return {
type: "DIALOG_REGULAMIN_HIDDEN",
};
};
export const showRegisterCircle = () => {
return {
type: "DIALOG_REGISTER_CIRCLE_SHOW",
};
};
export const hideRegisterCircle = () => {
return {
type: "DIALOG_REGISTER_CIRCLE_HIDE",
};
};
export const hideRegisterForm = () => {
return {
type: "DIALOG_REGISTER_FORM_HIDE",
};
};
export const setRegisterResult = (text) => {
return {
type: "DIALOG_REGISTER_SET_RESULT",
payload: text,
};
};
export const setLoginResult = (text) => {
return {
type: "DIALOG_LOGIN_SET_RESULT",
payload: text,
};
};