aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-07-11 22:07:48 +0200
committerBastien Wirtz <bastien.wirtz@gmail.com>2022-07-11 22:07:48 +0200
commit9582b1871ac63d1e625ccf6c221bd1248a1c9d03 (patch)
tree3e2582b7a4134ce0c6ba4f6d835461fbd2f23205
parentce391840e58d04f74ca1d411a4686801fc1a1a70 (diff)
downloadhomer-9582b1871ac63d1e625ccf6c221bd1248a1c9d03.tar.gz
homer-9582b1871ac63d1e625ccf6c221bd1248a1c9d03.tar.zst
homer-9582b1871ac63d1e625ccf6c221bd1248a1c9d03.zip
Fix search widget
-rw-r--r--package.json8
-rw-r--r--src/App.vue16
-rw-r--r--yarn.lock35
3 files changed, 34 insertions, 25 deletions
diff --git a/package.json b/package.json
index 8643569..bd19439 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "homer", 2 "name": "homer",
3 "version": "22.07.1", 3 "version": "22.07.2",
4 "scripts": { 4 "scripts": {
5 "dev": "vite", 5 "dev": "vite",
6 "build": "vite build", 6 "build": "vite build",
@@ -19,11 +19,11 @@
19 "@vitejs/plugin-vue": "^2.3.1", 19 "@vitejs/plugin-vue": "^2.3.1",
20 "@vue/eslint-config-prettier": "^7.0.0", 20 "@vue/eslint-config-prettier": "^7.0.0",
21 "eslint": "^8.5.0", 21 "eslint": "^8.5.0",
22 "eslint-plugin-vue": "^9.1.1", 22 "eslint-plugin-vue": "^9.2.0",
23 "prettier": "^2.5.1", 23 "prettier": "^2.5.1",
24 "sass": "^1.52.2", 24 "sass": "^1.52.2",
25 "vite": "^2.9.9", 25 "vite": "^2.9.14",
26 "vite-plugin-pwa": "^0.12.2" 26 "vite-plugin-pwa": "^0.12.3"
27 }, 27 },
28 "license": "Apache-2.0" 28 "license": "Apache-2.0"
29} 29}
diff --git a/src/App.vue b/src/App.vue
index 43ba322..4120fe5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -49,10 +49,10 @@
49 <SearchInput 49 <SearchInput
50 class="navbar-item is-inline-block-mobile" 50 class="navbar-item is-inline-block-mobile"
51 :hotkey="searchHotkey()" 51 :hotkey="searchHotkey()"
52 @input="filterServices" 52 @input="filterServices($event.target?.value)"
53 @search-focus="showMenu = true" 53 @search-focus="showMenu = true"
54 @search-open="navigateToFirstService" 54 @search-open="navigateToFirstService($event?.target?.value)"
55 @search-cancel="filterServices" 55 @search-cancel="filterServices()"
56 /> 56 />
57 </Navbar> 57 </Navbar>
58 </div> 58 </div>
@@ -255,11 +255,12 @@ export default {
255 }); 255 });
256 }, 256 },
257 matchesFilter: function (item) { 257 matchesFilter: function (item) {
258 const needle = this.filter?.toLowerCase();
258 return ( 259 return (
259 item.name.toLowerCase().includes(this.filter) || 260 item.name.toLowerCase().includes(needle) ||
260 (item.subtitle && item.subtitle.toLowerCase().includes(this.filter)) || 261 (item.subtitle && item.subtitle.toLowerCase().includes(needle)) ||
261 (item.tag && item.tag.toLowerCase().includes(this.filter)) || 262 (item.tag && item.tag.toLowerCase().includes(needle)) ||
262 (item.keywords && item.keywords.toLowerCase().includes(this.filter)) 263 (item.keywords && item.keywords.toLowerCase().includes(needle))
263 ); 264 );
264 }, 265 },
265 navigateToFirstService: function (target) { 266 navigateToFirstService: function (target) {
@@ -271,6 +272,7 @@ export default {
271 } 272 }
272 }, 273 },
273 filterServices: function (filter) { 274 filterServices: function (filter) {
275 console.log(filter);
274 this.filter = filter; 276 this.filter = filter;
275 277
276 if (!filter) { 278 if (!filter) {
diff --git a/yarn.lock b/yarn.lock
index b22f2ec..de6a390 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1715,10 +1715,10 @@ eslint-plugin-prettier@^4.0.0:
1715 dependencies: 1715 dependencies:
1716 prettier-linter-helpers "^1.0.0" 1716 prettier-linter-helpers "^1.0.0"
1717 1717
1718eslint-plugin-vue@^9.1.1: 1718eslint-plugin-vue@^9.2.0:
1719 version "9.1.1" 1719 version "9.2.0"
1720 resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.1.1.tgz#341f7533cb041958455138834341d5be01f9f327" 1720 resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-9.2.0.tgz#b7ca02b2ce8218b7586346440fc61c2655db353a"
1721 integrity sha512-W9n5PB1X2jzC7CK6riG0oAcxjmKrjTF6+keL1rni8n57DZeilx/Fulz+IRJK3lYseLNAygN0I62L7DvioW40Tw== 1721 integrity sha512-W2hc+NUXoce8sZtWgZ45miQTy6jNyuSdub5aZ1IBune4JDeAyzucYX0TzkrQ1jMO52sNUDYlCIHDoaNePe0p5g==
1722 dependencies: 1722 dependencies:
1723 eslint-utils "^3.0.0" 1723 eslint-utils "^3.0.0"
1724 natural-compare "^1.4.0" 1724 natural-compare "^1.4.0"
@@ -2679,13 +2679,20 @@ rollup-plugin-terser@^7.0.0:
2679 serialize-javascript "^4.0.0" 2679 serialize-javascript "^4.0.0"
2680 terser "^5.0.0" 2680 terser "^5.0.0"
2681 2681
2682rollup@^2.43.1, rollup@^2.59.0, rollup@^2.75.5: 2682rollup@^2.43.1, rollup@^2.59.0:
2683 version "2.75.7" 2683 version "2.75.7"
2684 resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.7.tgz#221ff11887ae271e37dcc649ba32ce1590aaa0b9" 2684 resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.7.tgz#221ff11887ae271e37dcc649ba32ce1590aaa0b9"
2685 integrity sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ== 2685 integrity sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==
2686 optionalDependencies: 2686 optionalDependencies:
2687 fsevents "~2.3.2" 2687 fsevents "~2.3.2"
2688 2688
2689rollup@^2.75.7:
2690 version "2.76.0"
2691 resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.76.0.tgz#c69fe03db530ac53fcb9523b3caa0d3c0b9491a1"
2692 integrity sha512-9jwRIEY1jOzKLj3nsY/yot41r19ITdQrhs+q3ggNWhr9TQgduHqANvPpS32RNpzGklJu3G1AJfvlZLi/6wFgWA==
2693 optionalDependencies:
2694 fsevents "~2.3.2"
2695
2689run-parallel@^1.1.9: 2696run-parallel@^1.1.9:
2690 version "1.2.0" 2697 version "1.2.0"
2691 resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" 2698 resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
@@ -3005,22 +3012,22 @@ v8-compile-cache@^2.0.3:
3005 resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" 3012 resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
3006 integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== 3013 integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
3007 3014
3008vite-plugin-pwa@^0.12.2: 3015vite-plugin-pwa@^0.12.3:
3009 version "0.12.2" 3016 version "0.12.3"
3010 resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.12.2.tgz#d0ec1cd3088260bdc5bf2b10ba753def0b8f3280" 3017 resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.12.3.tgz#acf2913ae85a4d39c13ae4b948307f3dd5506fa8"
3011 integrity sha512-XK2oi1YZkoc1J8fyerNYxyh/yfb+INdrdOW/mOOD5DBLq7jVPxHQuncIhqiREbGOMlY/xMe9CSE7QZ9xIAEf7A== 3018 integrity sha512-gmYdIVXpmBuNjzbJFPZFzxWYrX4lHqwMAlOtjmXBbxApiHjx9QPXKQPJjSpeTeosLKvVbNcKSAAhfxMda0QVNQ==
3012 dependencies: 3019 dependencies:
3013 debug "^4.3.4" 3020 debug "^4.3.4"
3014 fast-glob "^3.2.11" 3021 fast-glob "^3.2.11"
3015 pretty-bytes "^6.0.0" 3022 pretty-bytes "^6.0.0"
3016 rollup "^2.75.5" 3023 rollup "^2.75.7"
3017 workbox-build "^6.5.3" 3024 workbox-build "^6.5.3"
3018 workbox-window "^6.5.3" 3025 workbox-window "^6.5.3"
3019 3026
3020vite@^2.9.9: 3027vite@^2.9.14:
3021 version "2.9.13" 3028 version "2.9.14"
3022 resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.13.tgz#859cb5d4c316c0d8c6ec9866045c0f7858ca6abc" 3029 resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.14.tgz#c438324c6594afd1050df3777da981dee988bb1b"
3023 integrity sha512-AsOBAaT0AD7Mhe8DuK+/kE4aWYFMx/i0ZNi98hJclxb4e0OhQcZYUrvLjIaQ8e59Ui7txcvKMiJC1yftqpQoDw== 3030 integrity sha512-P/UCjSpSMcE54r4mPak55hWAZPlyfS369svib/gpmz8/01L822lMPOJ/RYW6tLCe1RPvMvOsJ17erf55bKp4Hw==
3024 dependencies: 3031 dependencies:
3025 esbuild "^0.14.27" 3032 esbuild "^0.14.27"
3026 postcss "^8.4.13" 3033 postcss "^8.4.13"