mirror of
https://github.com/simon987/sist2.git
synced 2025-12-17 09:19:05 +00:00
web UI rewrite, switch to ndjson.zst index format
This commit is contained in:
46
sist2-vue/src/components/SearchBar.vue
Normal file
46
sist2-vue/src/components/SearchBar.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-input-group>
|
||||
<b-form-input :value="searchText"
|
||||
:placeholder="advanced() ? $t('searchBar.advanced') : $t('searchBar.simple')"
|
||||
@input="setSearchText($event)"></b-form-input>
|
||||
|
||||
<template #prepend>
|
||||
<b-input-group-text>
|
||||
<b-form-checkbox :checked="fuzzy" title="Toggle fuzzy searching" @change="setFuzzy($event)">
|
||||
{{ $t("searchBar.fuzzy") }}
|
||||
</b-form-checkbox>
|
||||
</b-input-group-text>
|
||||
</template>
|
||||
|
||||
<template #append>
|
||||
<b-button variant="outline-secondary" @click="$emit('show-help')">{{$t("help.help")}}</b-button>
|
||||
</template>
|
||||
</b-input-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters({
|
||||
optQueryMode: "optQueryMode",
|
||||
searchText: "searchText",
|
||||
fuzzy: "fuzzy",
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({
|
||||
setSearchText: "setSearchText",
|
||||
setFuzzy: "setFuzzy"
|
||||
}),
|
||||
advanced() {
|
||||
return this.optQueryMode === "advanced"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user