Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
web/satellite: fix frozen status banners not showing
This change moves the call to fetch user's frozen status into the
getUser store action. It fixes an issue where the froze status banners
will not show.

Change-Id: I1a1853d5a89502e294848ceb6a8566120ecd4c10
  • Loading branch information
wilfred-asomanii committed May 19, 2023
1 parent b502310 commit 2507044
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions web/satellite/src/store/modules/usersStore.ts
Expand Up @@ -46,15 +46,12 @@ export const useUsersStore = defineStore('users', () => {
const configStore = useConfigStore();

const user = await api.get();
user.freezeStatus = await api.getFrozenStatus();
user.projectLimit ||= configStore.state.config.defaultProjectLimit;

setUser(user);
}

async function getFrozenStatus(): Promise<void> {
state.user.freezeStatus = await api.getFrozenStatus();
}

async function disableUserMFA(request: DisableMFARequest): Promise<void> {
await api.disableUserMFA(request.passcode, request.recoveryCode);
}
Expand Down Expand Up @@ -112,7 +109,6 @@ export const useUsersStore = defineStore('users', () => {
generateUserMFARecoveryCodes,
clear,
login,
getFrozenStatus,
setUser,
updateSettings,
getSettings,
Expand Down
1 change: 0 additions & 1 deletion web/satellite/src/views/DashboardArea.vue
Expand Up @@ -728,7 +728,6 @@ onMounted(async () => {
try {
await Promise.all([
usersStore.getUser(),
usersStore.getFrozenStatus(),
abTestingStore.fetchValues(),
usersStore.getSettings(),
]);
Expand Down
1 change: 0 additions & 1 deletion web/satellite/src/views/all-dashboard/AllDashboardArea.vue
Expand Up @@ -615,7 +615,6 @@ onMounted(async () => {
try {
await Promise.all([
usersStore.getUser(),
usersStore.getFrozenStatus(),
abTestingStore.fetchValues(),
usersStore.getSettings(),
]);
Expand Down

0 comments on commit 2507044

Please sign in to comment.