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

@@ -110,13 +110,13 @@
</template>
<script lang="ts">
import type { IExecutionResponse, IMenuItem, IVersion } from '@/Interface';
import type { MessageBoxInputData } from 'element-ui/types/message-box';
import type { IExecutionResponse, IMenuItem, IVersion } from '../Interface';
import GiftNotificationIcon from './GiftNotificationIcon.vue';
import WorkflowSettings from '@/components/WorkflowSettings.vue';
import { genericHelpers } from '@/mixins/genericHelpers';
import { useMessage } from '@/composables';
import { showMessage } from '@/mixins/showMessage';
import { workflowHelpers } from '@/mixins/workflowHelpers';
import { workflowRun } from '@/mixins/workflowRun';
@@ -137,6 +137,7 @@ import { useVersionControlStore } from '@/stores/versionControl.store';
export default mixins(
genericHelpers,
showMessage,
workflowHelpers,
workflowRun,
userHelpers,
@@ -147,11 +148,6 @@ export default mixins(
GiftNotificationIcon,
WorkflowSettings,
},
setup() {
return {
...useMessage(),
};
},
data() {
return {
// @ts-ignore
@@ -487,7 +483,7 @@ export default mixins(
}
},
async sync() {
const prompt = (await this.prompt(
const prompt = await this.$prompt(
this.$locale.baseText('settings.versionControl.sync.prompt.description', {
interpolate: { branch: this.versionControlStore.state.currentBranch },
}),
@@ -503,7 +499,7 @@ export default mixins(
inputPattern: /^.+$/,
inputErrorMessage: this.$locale.baseText('settings.versionControl.sync.prompt.error'),
},
)) as MessageBoxInputData;
);
if (prompt.value) {
await this.versionControlStore.sync({ commitMessage: prompt.value });