Revert "refactor(editor): Turn showMessage mixin to composable" (#6243)

Revert "refactor(editor): Turn showMessage mixin to composable (#6081)"

This reverts commit b95fcd7323.
This commit is contained in:
Csaba Tuncsik
2023-05-12 16:43:34 +02:00
committed by GitHub
parent 13bcec1661
commit 638e3f209d
75 changed files with 863 additions and 991 deletions

View File

@@ -4,24 +4,19 @@
<script lang="ts">
import AuthView from './AuthView.vue';
import { useToast } from '@/composables';
import { showMessage } from '@/mixins/showMessage';
import { defineComponent } from 'vue';
import mixins from 'vue-typed-mixins';
import type { IFormBoxConfig } from '@/Interface';
import { mapStores } from 'pinia';
import { useSettingsStore } from '@/stores/settings.store';
import { useUsersStore } from '@/stores/users.store';
export default defineComponent({
export default mixins(showMessage).extend({
name: 'ForgotMyPasswordView',
components: {
AuthView,
},
setup() {
return {
...useToast(),
};
},
data() {
return {
loading: false,
@@ -79,7 +74,7 @@ export default defineComponent({
this.loading = true;
await this.usersStore.sendForgotPasswordEmail(values);
this.showMessage({
this.$showMessage({
type: 'success',
title: this.$locale.baseText('forgotPassword.recoveryEmailSent'),
message: this.$locale.baseText('forgotPassword.emailSentIfExists', {
@@ -91,7 +86,7 @@ export default defineComponent({
if (error.httpStatusCode === 422) {
message = this.$locale.baseText(error.message);
}
this.showMessage({
this.$showMessage({
type: 'error',
title: this.$locale.baseText('forgotPassword.sendingEmailError'),
message,