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.
50 lines
1.6 KiB
50 lines
1.6 KiB
<template>
|
|
<div id="searchers-show">
|
|
<div>
|
|
<h3>{{ searcher.name }}</h3>
|
|
|
|
<h5>{{ searcher.description }}</h5>
|
|
|
|
<a v-if="editable"
|
|
:href="`/searchers/${searcher.id}/edit`">
|
|
Edit
|
|
</a>
|
|
</div>
|
|
|
|
<div v-for="(row, rowIndex) in searcher.rows" :key="`row-${rowIndex}`" class="flex-row">
|
|
<div v-for="(searcherItem, columnIndex) in row" :key="`column-${columnIndex}`">
|
|
<div class="box is-plain">
|
|
<template v-if="searcherItem.hasOwnProperty('name')">
|
|
<searcher-show :editable="false"
|
|
:searcher="searcherItem">
|
|
</searcher-show>
|
|
</template>
|
|
|
|
<template v-else>
|
|
<b>{{ searcherItem.expression }}</b>
|
|
|
|
<p>
|
|
<!-- // Show example here, so for example the user has to input the example in order to save-->
|
|
<!-- // the regex, show highlight, so apply regex on example text-->
|
|
</p>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import {Component, Vue, Prop} from "vue-property-decorator";
|
|
|
|
@Component({
|
|
name: 'SearcherShow',
|
|
})
|
|
export default class Create extends Vue {
|
|
@Prop({default: {}})
|
|
public readonly searcher!: Object;
|
|
|
|
@Prop({default: true})
|
|
public readonly editable!: boolean;
|
|
};
|
|
</script>
|