UI Mechanics / New Look (orange - gray)
This commit is contained in:
@@ -108,3 +108,16 @@ export const fetchAllDishes = (id) => {
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
export const tryLogin = (username) => {
|
||||
return function (dispatch) {
|
||||
dispatch(toggles.setLoggedIn(username));
|
||||
dispatch(toggles.hideLoginDialog());
|
||||
};
|
||||
};
|
||||
|
||||
export const logout = () => {
|
||||
return function (dispatch) {
|
||||
dispatch(toggles.setLoggedOut());
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,3 +9,28 @@ export const hideDishes = () => {
|
||||
type: "SET_DISHLIST_HIDDEN",
|
||||
};
|
||||
};
|
||||
|
||||
export const showLoginDialog = () => {
|
||||
return {
|
||||
type: "DIALOG_LOGIN_VISIBLE",
|
||||
};
|
||||
};
|
||||
|
||||
export const hideLoginDialog = () => {
|
||||
return {
|
||||
type: "DIALOG_LOGIN_HIDDEN",
|
||||
};
|
||||
};
|
||||
|
||||
export const setLoggedIn = (username) => {
|
||||
return {
|
||||
type: "SET_LOGGEDIN",
|
||||
payload: username,
|
||||
};
|
||||
};
|
||||
|
||||
export const setLoggedOut = () => {
|
||||
return {
|
||||
type: "SET_LOGGEDOUT",
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user