itube-specs 0.0.312 → 0.0.313

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ function onLoginClick() {
63
63
 
64
64
  const loading = ref(false)
65
65
 
66
- const { setErrorState, snackbarText, showErrorSnack, resetSnackbar } = useSnackbar()
66
+ const { setErrorState, snackbarTheme, snackbarText, showErrorSnack, resetSnackbar } = useSnackbar()
67
67
 
68
68
  async function submit() {
69
69
  resetSnackbar()
@@ -81,6 +81,7 @@ async function submit() {
81
81
  form.value.token = token || '';
82
82
  await useUser(AuthorizationApiService).password(form.value);
83
83
  useAuthPopup().closeAuthPopup();
84
+ snackbarTheme.value = 'success';
84
85
  snackbarText.value = 'Check your email';
85
86
  } catch (error) {
86
87
  setErrorState(error);
@@ -206,8 +206,8 @@ async function submit() {
206
206
  })
207
207
  closeReportPopup();
208
208
  resetForm();
209
- snackbarText.value = 'email_send';
210
209
  snackbarTheme.value = 'success';
210
+ snackbarText.value = 'email_send';
211
211
  } catch (error) {
212
212
  console.log('error send email', error);
213
213
  snackbarText.value = 'email_error';
@@ -18,7 +18,7 @@ function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K
18
18
  return result;
19
19
  }
20
20
 
21
- const { snackbarText, showErrorSnack } = useSnackbar();
21
+ const { snackbarText, snackbarTheme, showErrorSnack } = useSnackbar();
22
22
 
23
23
  export const useUser = (apiService) => {
24
24
  const register = async (form: IRegistrateForm) => {
@@ -69,6 +69,7 @@ export const useUser = (apiService) => {
69
69
  const changePassword = async (form: IChangePasswordForm) => {
70
70
  try {
71
71
  await apiService.changePassword(form);
72
+ snackbarTheme.value = 'success';
72
73
  snackbarText.value = 'Password changed';
73
74
  } catch (err) {
74
75
  showErrorSnack('Error while changing password');
@@ -79,6 +80,7 @@ export const useUser = (apiService) => {
79
80
  const changeEmail = async (form: IChangeEmail) => {
80
81
  try {
81
82
  await apiService.changeEmail(form);
83
+ snackbarTheme.value = 'success';
82
84
  snackbarText.value = 'email_changed';
83
85
  } catch (err) {
84
86
  showErrorSnack('Error while changing email');
@@ -89,6 +91,7 @@ export const useUser = (apiService) => {
89
91
  const recoveryPassword = async (form: IRecoveryPasswordForm) => {
90
92
  try {
91
93
  await apiService.recoveryPassword(form);
94
+ snackbarTheme.value = 'success';
92
95
  snackbarText.value = 'Password recovered';
93
96
  await useRouter().push('/profile');
94
97
  } catch (err) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "itube-specs",
3
3
  "type": "module",
4
- "version": "0.0.312",
4
+ "version": "0.0.313",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./types/index.d.ts",
7
7
  "scripts": {