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

@@ -127,18 +127,18 @@
<script lang="ts">
import mixins from 'vue-typed-mixins';
import { useMessage } from '@/composables';
import { showMessage } from '@/mixins/showMessage';
import WorkflowPreview from '@/components/WorkflowPreview.vue';
import type { IExecutionUIData } from '@/mixins/executionsHelpers';
import { executionHelpers } from '@/mixins/executionsHelpers';
import { MODAL_CONFIRM, VIEWS } from '@/constants';
import { VIEWS } from '@/constants';
import { mapStores } from 'pinia';
import { useUIStore } from '@/stores/ui.store';
import { Dropdown as ElDropdown } from 'element-ui';
type RetryDropdownRef = InstanceType<typeof ElDropdown> & { hide: () => void };
export default mixins(executionHelpers).extend({
export default mixins(showMessage, executionHelpers).extend({
name: 'execution-preview',
components: {
ElDropdown,
@@ -149,11 +149,6 @@ export default mixins(executionHelpers).extend({
VIEWS,
};
},
setup() {
return {
...useMessage(),
};
},
computed: {
...mapStores(useUIStore),
executionUIDetails(): IExecutionUIData | null {
@@ -168,18 +163,14 @@ export default mixins(executionHelpers).extend({
},
methods: {
async onDeleteExecution(): Promise<void> {
const deleteConfirmed = await this.confirm(
const deleteConfirmed = await this.confirmMessage(
this.$locale.baseText('executionDetails.confirmMessage.message'),
this.$locale.baseText('executionDetails.confirmMessage.headline'),
{
type: 'warning',
confirmButtonText: this.$locale.baseText(
'executionDetails.confirmMessage.confirmButtonText',
),
cancelButtonText: '',
},
'warning',
this.$locale.baseText('executionDetails.confirmMessage.confirmButtonText'),
'',
);
if (deleteConfirmed !== MODAL_CONFIRM) {
if (!deleteConfirmed) {
return;
}
this.$emit('deleteCurrentExecution');