mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-08-07 09:02:27 +00:00
Add binding for reloading deals
This commit is contained in:
14
src/App.vue
14
src/App.vue
@@ -62,6 +62,15 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
this.fetchDeals();
|
||||||
|
Mousetrap.bind("/", this.focusSearch, "keyup");
|
||||||
|
Mousetrap.bind("r", this.loadDeals);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
focusSearch() {
|
||||||
|
this.$refs.search.focus();
|
||||||
|
},
|
||||||
|
fetchDeals() {
|
||||||
axios
|
axios
|
||||||
.get("http://localhost:8081/api/v1/topics")
|
.get("http://localhost:8081/api/v1/topics")
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@@ -71,11 +80,6 @@ export default {
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err.response);
|
console.log(err.response);
|
||||||
});
|
});
|
||||||
Mousetrap.bind("/", this.focusSearch);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
focusSearch() {
|
|
||||||
this.$refs.search.focus();
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: ["date"],
|
props: ["date"],
|
||||||
|
@@ -6,3 +6,12 @@ body {
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
border-color: #404142;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:focus {
|
||||||
|
color: #ccc !important;
|
||||||
|
background-color: #404142 !important;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user