Skip to content

Commit

Permalink
update request reset password message (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine authored Oct 9, 2023
1 parent 39570de commit b10c0df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion resources/js/components/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const tokenName = ref();
const walletAccount = ref(publicKeyToAddress(appStore.user?.account));
const enableTokenCreate = ref(false);
const enableAccountModify = ref(false);
const loading = ref(true);
const loading = ref(appStore.user ? false : true);

const tokens = computed(() => appStore.user?.apiTokens);

Expand Down
20 changes: 6 additions & 14 deletions resources/js/components/pages/auth/RequestResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import * as yup from 'yup';
import EnjinLogo from '~/components/EnjinLogo.vue';
import { AuthApi } from '~/api/auth';
import snackbar from '~/util/snackbar';
import { snackbarErrors } from '~/util';
import { ArrowLeftIcon } from '@heroicons/vue/20/solid';
const router = useRouter();
Expand All @@ -77,19 +76,12 @@ const requestReset = async () => {
if (!(await isValid())) return;
isLoading.value = true;
try {
const res = await AuthApi.requestPasswordReset(email.value);
if (res.data.RequestPasswordReset === true) {
snackbar.success({ title: 'Password reset link sent', save: false });
} else {
snackbar.error({ title: 'Error sending password reset link' });
}
} catch (e) {
if (snackbarErrors(e)) return;
snackbar.error({ title: 'Error sending password reset link' });
} finally {
isLoading.value = false;
}
await AuthApi.requestPasswordReset(email.value);
snackbar.success({
title: "If an account with this email exists, you'll receive an email shortly with information on resetting your password.",
save: false,
});
isLoading.value = false;
};
(async () => {
Expand Down

0 comments on commit b10c0df

Please sign in to comment.