mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
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:
@@ -35,15 +35,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from 'vue';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import { COMMUNITY_PACKAGE_CONFIRM_MODAL_KEY, COMMUNITY_PACKAGE_MANAGE_ACTIONS } from '@/constants';
|
||||
import { useToast } from '@/composables';
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import Modal from './Modal.vue';
|
||||
import {
|
||||
COMMUNITY_PACKAGE_CONFIRM_MODAL_KEY,
|
||||
COMMUNITY_PACKAGE_MANAGE_ACTIONS,
|
||||
} from '../constants';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useCommunityNodesStore } from '@/stores/communityNodes.store';
|
||||
import { createEventBus } from '@/event-bus';
|
||||
|
||||
export default defineComponent({
|
||||
export default mixins(showMessage).extend({
|
||||
name: 'CommunityPackageManageConfirmModal',
|
||||
components: {
|
||||
Modal,
|
||||
@@ -61,11 +64,6 @@ export default defineComponent({
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
...useToast(),
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
@@ -142,12 +140,12 @@ export default defineComponent({
|
||||
});
|
||||
this.loading = true;
|
||||
await this.communityNodesStore.uninstallPackage(this.activePackageName);
|
||||
this.showMessage({
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('settings.communityNodes.messages.uninstall.success.title'),
|
||||
type: 'success',
|
||||
});
|
||||
} catch (error) {
|
||||
this.showError(
|
||||
this.$showError(
|
||||
error,
|
||||
this.$locale.baseText('settings.communityNodes.messages.uninstall.error'),
|
||||
);
|
||||
@@ -169,7 +167,7 @@ export default defineComponent({
|
||||
this.loading = true;
|
||||
const updatedVersion = this.activePackage.updateAvailable;
|
||||
await this.communityNodesStore.updatePackage(this.activePackageName);
|
||||
this.showMessage({
|
||||
this.$showMessage({
|
||||
title: this.$locale.baseText('settings.communityNodes.messages.update.success.title'),
|
||||
message: this.$locale.baseText(
|
||||
'settings.communityNodes.messages.update.success.message',
|
||||
@@ -183,7 +181,7 @@ export default defineComponent({
|
||||
type: 'success',
|
||||
});
|
||||
} catch (error) {
|
||||
this.showError(
|
||||
this.$showError(
|
||||
error,
|
||||
this.$locale.baseText('settings.communityNodes.messages.update.error.title'),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user