Add binding for reloading deals

This commit is contained in:
Dave Gallant
2022-08-19 17:55:55 +00:00
parent 5e40b36232
commit a9110b0439
2 changed files with 23 additions and 10 deletions

View File

@@ -62,21 +62,25 @@ export default {
},
mounted() {
this.isLoading = true;
axios
.get("http://localhost:8081/api/v1/topics")
.then((response) => {
this.topics = response.data;
this.isLoading = false;
})
.catch((err) => {
console.log(err.response);
});
Mousetrap.bind("/", this.focusSearch);
this.fetchDeals();
Mousetrap.bind("/", this.focusSearch, "keyup");
Mousetrap.bind("r", this.loadDeals);
},
methods: {
focusSearch() {
this.$refs.search.focus();
},
fetchDeals() {
axios
.get("http://localhost:8081/api/v1/topics")
.then((response) => {
this.topics = response.data;
this.isLoading = false;
})
.catch((err) => {
console.log(err.response);
});
},
},
props: ["date"],
computed: {

View File

@@ -6,3 +6,12 @@ body {
position: sticky;
top: 0;
}
.form-control {
border-color: #404142;
}
.form-control:focus {
color: #ccc !important;
background-color: #404142 !important;
}