mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(editor): Turn showMessage mixin to composable (#6081)
* refactor(editor): move $getExecutionError from showMessages mixin to pushConnection (it is used there only) * refactor(editor): resolve showMessage mixin methods * fix(editor): use composable instead of mixin * fix(editor): resolve conflicts * fix(editor): replace clearAllStickyNotifications * fix(editor): replace confirmMessage * fix(editor): replace confirmMessage * fix(editor): replace confirmMessage * fix(editor): remove last confirmMessage usage * fix(editor): remove $prompt usage * fix(editor): remove $show methods * fix(editor): lint fix * fix(editor): lint fix * fix(editor): fixes after review
This commit is contained in:
@@ -110,13 +110,13 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import type { IExecutionResponse, IMenuItem, IVersion } from '../Interface';
|
||||
|
||||
import type { IExecutionResponse, IMenuItem, IVersion } from '@/Interface';
|
||||
import type { MessageBoxInputData } from 'element-ui/types/message-box';
|
||||
import GiftNotificationIcon from './GiftNotificationIcon.vue';
|
||||
import WorkflowSettings from '@/components/WorkflowSettings.vue';
|
||||
|
||||
import { genericHelpers } from '@/mixins/genericHelpers';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { useMessage } from '@/composables';
|
||||
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
import { workflowRun } from '@/mixins/workflowRun';
|
||||
|
||||
@@ -137,7 +137,6 @@ import { useVersionControlStore } from '@/stores/versionControl.store';
|
||||
|
||||
export default mixins(
|
||||
genericHelpers,
|
||||
showMessage,
|
||||
workflowHelpers,
|
||||
workflowRun,
|
||||
userHelpers,
|
||||
@@ -148,6 +147,11 @@ export default mixins(
|
||||
GiftNotificationIcon,
|
||||
WorkflowSettings,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
...useMessage(),
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// @ts-ignore
|
||||
@@ -483,7 +487,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 },
|
||||
}),
|
||||
@@ -499,7 +503,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 });
|
||||
|
||||
Reference in New Issue
Block a user