mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-08-06 07:13:39 +00:00
Add binding for reloading deals
This commit is contained in:
24
src/App.vue
24
src/App.vue
@@ -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: {
|
||||
|
@@ -6,3 +6,12 @@ body {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
border-color: #404142;
|
||||
}
|
||||
|
||||
.form-control:focus {
|
||||
color: #ccc !important;
|
||||
background-color: #404142 !important;
|
||||
}
|
||||
|
Reference in New Issue
Block a user