Files
Automata/packages/editor-ui/src/components/ImportParameter.vue
Milorad FIlipović 5059c57f4a refactor(editor): Refactor utils files and mixins (#4654)
*  Added `utils` module. Moved `canvasHelpers` and old `utils.ts` file to it
*  Moved rest of utils and helpers
*  Fixing sytax errors
* 🔨 Refactoring new utils files
* 🔨 Organizing imports, adding comments and a bit more refactoring
* ✔️ Fixing tests
* 🔨 Moving mixins to `src`
2022-11-23 13:41:53 +01:00

46 lines
896 B
Vue

<template>
<div :class="$style.importSection">
<n8n-button
type="secondary"
:label="$locale.baseText('importParameter.label')"
:disabled="isReadOnly"
size="mini"
@click="onImportCurlClicked"
/>
</div>
</template>
<script lang="ts">
import { IMPORT_CURL_MODAL_KEY } from '@/constants';
import { useUIStore } from '@/stores/ui';
import { mapStores } from 'pinia';
import mixins from 'vue-typed-mixins';
import { showMessage } from '@/mixins/showMessage';
export default mixins(showMessage).extend({
name: 'import-parameter',
props: {
isReadOnly: {
type: Boolean,
default: false,
},
},
computed: {
...mapStores(useUIStore),
},
methods: {
onImportCurlClicked() {
this.uiStore.openModal(IMPORT_CURL_MODAL_KEY);
},
},
});
</script>
<style module lang="scss">
.importSection {
display: flex;
flex-direction: row-reverse;
margin-top: 10px;
}
</style>