feat(v4): Update the help center portal design (#10296)
Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
@@ -110,4 +110,10 @@ export const actions = {
|
||||
updatePortal: async ({ commit }, portal) => {
|
||||
commit(types.UPDATE_PORTAL_ENTRY, portal);
|
||||
},
|
||||
|
||||
switchPortal: async ({ commit }, isSwitching) => {
|
||||
commit(types.SET_PORTAL_SWITCHING_FLAG, {
|
||||
isSwitching,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -6,6 +6,8 @@ export const getters = {
|
||||
},
|
||||
|
||||
isFetchingPortals: state => state.uiFlags.isFetching,
|
||||
isCreatingPortal: state => state.uiFlags.isCreating,
|
||||
isSwitchingPortal: state => state.uiFlags.isSwitching,
|
||||
portalBySlug:
|
||||
(...getterArguments) =>
|
||||
portalId => {
|
||||
@@ -23,4 +25,5 @@ export const getters = {
|
||||
},
|
||||
count: state => state.portals.allIds.length || 0,
|
||||
getMeta: state => state.meta,
|
||||
isSwitching: state => state.isSwitching,
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@ const state = {
|
||||
uiFlags: {
|
||||
allFetched: false,
|
||||
isFetching: false,
|
||||
isSwitching: false,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ export const types = {
|
||||
REMOVE_PORTAL_ENTRY: 'removePortalEntry',
|
||||
REMOVE_PORTAL_ID: 'removePortalId',
|
||||
SET_HELP_PORTAL_UI_FLAG: 'setHelpCenterUIFlag',
|
||||
SET_PORTAL_SWITCHING_FLAG: 'setPortalSwitchingFlag',
|
||||
};
|
||||
|
||||
export const mutations = {
|
||||
@@ -105,4 +106,8 @@ export const mutations = {
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
[types.SET_PORTAL_SWITCHING_FLAG]($state, { isSwitching }) {
|
||||
$state.uiFlags.isSwitching = isSwitching;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user