1 parent
2e7be01487
commit
d061e02d81
1 file changed
+1
-43
@@ -5,16 +5,6 @@
|
|||||||
<div class="modalWrapper">
|
<div class="modalWrapper">
|
||||||
<span class="closeModalImg" @click="closeModal">×</span>
|
<span class="closeModalImg" @click="closeModal">×</span>
|
||||||
<h1>Search Soundtracks</h1>
|
<h1>Search Soundtracks</h1>
|
||||||
<div class="searchTypeContainer">
|
|
||||||
<label class="radioLabel">
|
|
||||||
<input type="radio" v-model="searchType" value="fuzzy">
|
|
||||||
<span>Fuzzy Search</span>
|
|
||||||
</label>
|
|
||||||
<label class="radioLabel">
|
|
||||||
<input type="radio" v-model="searchType" value="exact">
|
|
||||||
<span>Exact Search</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="searchContainer">
|
<div class="searchContainer">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -48,7 +38,6 @@ export default {
|
|||||||
results: [],
|
results: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
searchTimeout: null,
|
searchTimeout: null,
|
||||||
searchType: "fuzzy",
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -56,7 +45,6 @@ export default {
|
|||||||
this.show = true;
|
this.show = true;
|
||||||
this.searchTerm = "";
|
this.searchTerm = "";
|
||||||
this.results = [];
|
this.results = [];
|
||||||
this.searchType = "fuzzy";
|
|
||||||
},
|
},
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
@@ -85,10 +73,9 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
try {
|
try {
|
||||||
const endpoint = this.searchType === 'fuzzy' ? '/findfuzzy' : '/find';
|
|
||||||
const response = await this.axios({
|
const response = await this.axios({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: `${window.__RUNTIME_CONFIG__.API_HOSTNAME}${endpoint}`,
|
url: `${window.__RUNTIME_CONFIG__.API_HOSTNAME}/find`,
|
||||||
data: new URLSearchParams({ search_term: this.searchTerm }),
|
data: new URLSearchParams({ search_term: this.searchTerm }),
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
@@ -126,26 +113,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.searchTypeContainer {
|
|
||||||
display: flex;
|
|
||||||
gap: 20px;
|
|
||||||
margin-top: 15px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.radioLabel {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.radioLabel input[type="radio"] {
|
|
||||||
margin: 0;
|
|
||||||
accent-color: #ff9c00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchContainer {
|
.searchContainer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
@@ -207,15 +174,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1000px) {
|
@media only screen and (max-width: 1000px) {
|
||||||
.searchTypeContainer {
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.radioLabel {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchInput {
|
.searchInput {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
Reference in new issue
Block a user