diff --git a/src/App.vue b/src/App.vue index f32479e..ff159b6 100644 --- a/src/App.vue +++ b/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: { diff --git a/src/style.css b/src/style.css index 83c28d9..6cb917e 100644 --- a/src/style.css +++ b/src/style.css @@ -6,3 +6,12 @@ body { position: sticky; top: 0; } + +.form-control { + border-color: #404142; +} + +.form-control:focus { + color: #ccc !important; + background-color: #404142 !important; +}