Repo for the search and displace core module including the interface to select files and search and displace operations to run on them. https://searchanddisplace.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

68 lines
1.8 KiB

<template>
<div>
<div @click="adding = true"
class="box"
style="font-size: 6rem; max-width: 100px;">
+
</div>
<Dialog header="Select searcher"
position="right"
:visible="adding"
:closable="false"
:style="{width: '50vw'}"
:modal="true">
<searchers @selected="onSearcherSelected"
:ignore-searcher-ids="ignoreSearcherIds"
:allow-select="true">
</searchers>
<template #footer>
<Button label="Close"
icon="pi pi-times"
@click="adding = false"
class="p-button-text"/>
<Button label="Confirm"
icon="pi pi-check"
@click="onConfirm"
:disabled="Object.keys(selectedSearcher).length === 0"
autofocus />
</template>
</Dialog>
</div>
</template>
<script lang="ts">
import {Component, Prop, Vue} from "vue-property-decorator";
import Dialog from 'primevue/dialog';
import Searchers from './Index.vue';
@Component({
name: 'AddBox',
components: {
Dialog,
Searchers,
},
})
export default class Create extends Vue {
private adding: boolean = false;
private selectedSearcher: Object = {};
@Prop({default: () => {return[];}})
public readonly ignoreSearcherIds!: Array<string>;
onSearcherSelected(searcher: Object) {
this.selectedSearcher = searcher;
}
onConfirm() {
this.$emit('added', this.selectedSearcher);
this.selectedSearcher = {};
this.adding = false;
}
};
</script>