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