refactor(editor): Replace mixed style of defineProps with the new style (no-changelog) (#9787)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-18 09:55:10 +02:00
committed by GitHub
parent 1e8716a607
commit 08c6e9b571
27 changed files with 161 additions and 277 deletions

View File

@@ -1,7 +1,6 @@
<script lang="ts" setup>
import Modal from './Modal.vue';
import { SOURCE_CONTROL_PULL_MODAL_KEY } from '@/constants';
import type { PropType } from 'vue';
import type { EventBus } from 'n8n-design-system/utils';
import type { SourceControlAggregatedFile } from '@/Interface';
import { useI18n } from '@/composables/useI18n';
@@ -9,16 +8,12 @@ import { useLoadingService } from '@/composables/useLoadingService';
import { useToast } from '@/composables/useToast';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { useUIStore } from '@/stores/ui.store';
import { useRoute, useRouter } from 'vue-router';
import { computed, nextTick, ref } from 'vue';
import { sourceControlEventBus } from '@/event-bus/source-control';
const props = defineProps({
data: {
type: Object as PropType<{ eventBus: EventBus; status: SourceControlAggregatedFile[] }>,
default: () => ({}),
},
});
const props = defineProps<{
data: { eventBus: EventBus; status: SourceControlAggregatedFile[] };
}>();
const incompleteFileTypes = ['variables', 'credential'];
@@ -27,8 +22,6 @@ const uiStore = useUIStore();
const toast = useToast();
const i18n = useI18n();
const sourceControlStore = useSourceControlStore();
const router = useRouter();
const route = useRoute();
const files = ref<SourceControlAggregatedFile[]>(props.data.status || []);
@@ -40,10 +33,6 @@ const modifiedWorkflowFiles = computed(() => {
return workflowFiles.value.filter((file) => file.status === 'modified');
});
const deletedWorkflowFiles = computed(() => {
return workflowFiles.value.filter((file) => file.status === 'deleted');
});
function close() {
uiStore.closeModal(SOURCE_CONTROL_PULL_MODAL_KEY);
}