From 584f2b4b32e69865d9561f1537142791710f676d Mon Sep 17 00:00:00 2001
From: Robin Schneider <robin-schneider@outlook.de>
Date: Sat, 11 Sep 2021 12:42:57 +0200
Subject: Added custom hotkey support

---
 src/components/SearchInput.vue | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/components/SearchInput.vue')

diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue
index 40c5a1d..c4c11a2 100644
--- a/src/components/SearchInput.vue
+++ b/src/components/SearchInput.vue
@@ -15,10 +15,16 @@
 <script>
 export default {
   name: "SearchInput",
-  props: ["value"],
+  props: {
+    value: String,
+    hotkey: {
+      type: String,
+      default: "/"
+    }
+  },
   mounted() {
     this._keyListener = function (event) {
-      if (event.key === "/") {
+      if (event.key === this.hotkey) {
         event.preventDefault();
         this.focus();
       }
-- 
cgit v1.2.3


From b64b17a4f91669713328cecada81482ba97cea38 Mon Sep 17 00:00:00 2001
From: Robin Schneider <robin-schneider@outlook.de>
Date: Fri, 8 Oct 2021 15:11:00 +0200
Subject: Fixed spelling

---
 src/components/SearchInput.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/components/SearchInput.vue')

diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue
index c4c11a2..586ff71 100644
--- a/src/components/SearchInput.vue
+++ b/src/components/SearchInput.vue
@@ -34,7 +34,7 @@ export default {
     };
     document.addEventListener("keydown", this._keyListener.bind(this));
 
-    // fill seach from get parameter.
+    // fill search from get parameter.
     const search = new URLSearchParams(window.location.search).get("search");
     if (search) {
       this.$refs.search.value = search;
-- 
cgit v1.2.3

