aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components
diff options
context:
space:
mode:
authorBastien Wirtz <bwirtz@genymobile.com>2020-10-23 18:29:06 -0700
committerGitHub <noreply@github.com>2020-10-23 18:29:06 -0700
commit5b727eee020b9d734f60fd37f840ea47f83fb23e (patch)
treed4137914a4bf76bd60ff4af940dc0fd33fee04f1 /src/components
parent9a14de007e7c8d04ce708f8df1300ac8070d85df (diff)
parent37dfd2a132d883482b330b22a7c19d86948a391c (diff)
downloadhomer-5b727eee020b9d734f60fd37f840ea47f83fb23e.tar.gz
homer-5b727eee020b9d734f60fd37f840ea47f83fb23e.tar.zst
homer-5b727eee020b9d734f60fd37f840ea47f83fb23e.zip
Merge branch 'main' into dynamic-services
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ConnectivityChecker.vue2
-rw-r--r--src/components/Navbar.vue2
-rw-r--r--src/components/SearchInput.vue8
-rw-r--r--src/components/SettingToggle.vue7
4 files changed, 9 insertions, 10 deletions
diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue
index a91a809..d5f8f80 100644
--- a/src/components/ConnectivityChecker.vue
+++ b/src/components/ConnectivityChecker.vue
@@ -44,7 +44,7 @@ export default {
44 that.offline = true; 44 that.offline = true;
45 }) 45 })
46 .finally(function () { 46 .finally(function () {
47 that.$emit("network:status-update", that.offline); 47 that.$emit("network-status-update", that.offline);
48 }); 48 });
49 }, 49 },
50 }, 50 },
diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
index ae84166..dea7049 100644
--- a/src/components/Navbar.vue
+++ b/src/components/Navbar.vue
@@ -9,7 +9,7 @@
9 aria-expanded="false" 9 aria-expanded="false"
10 class="navbar-burger" 10 class="navbar-burger"
11 :class="{ 'is-active': showMenu }" 11 :class="{ 'is-active': showMenu }"
12 v-on:click="$emit('navbar:toggle')" 12 v-on:click="$emit('navbar-toggle')"
13 > 13 >
14 <span aria-hidden="true"></span> 14 <span aria-hidden="true"></span>
15 <span aria-hidden="true"></span> 15 <span aria-hidden="true"></span>
diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue
index 22b5eef..9419db3 100644
--- a/src/components/SearchInput.vue
+++ b/src/components/SearchInput.vue
@@ -6,8 +6,8 @@
6 ref="search" 6 ref="search"
7 :value="value" 7 :value="value"
8 @input="$emit('input', $event.target.value.toLowerCase())" 8 @input="$emit('input', $event.target.value.toLowerCase())"
9 @keyup.enter.exact="$emit('search:open')" 9 @keyup.enter.exact="$emit('search-open')"
10 @keyup.alt.enter="$emit('search:open', '_blank')" 10 @keyup.alt.enter="$emit('search-open', '_blank')"
11 /> 11 />
12 </div> 12 </div>
13</template> 13</template>
@@ -20,7 +20,7 @@ export default {
20 this._keyListener = function (event) { 20 this._keyListener = function (event) {
21 if (event.key === "/") { 21 if (event.key === "/") {
22 event.preventDefault(); 22 event.preventDefault();
23 this.$emit("search:focus"); 23 this.$emit("search-focus");
24 this.$nextTick(() => { 24 this.$nextTick(() => {
25 this.$refs.search.focus(); 25 this.$refs.search.focus();
26 }); 26 });
@@ -28,7 +28,7 @@ export default {
28 if (event.key === "Escape") { 28 if (event.key === "Escape") {
29 this.$refs.search.value = ""; 29 this.$refs.search.value = "";
30 this.$refs.search.blur(); 30 this.$refs.search.blur();
31 this.$emit("search:cancel"); 31 this.$emit("search-cancel");
32 } 32 }
33 }; 33 };
34 document.addEventListener("keydown", this._keyListener.bind(this)); 34 document.addEventListener("keydown", this._keyListener.bind(this));
diff --git a/src/components/SettingToggle.vue b/src/components/SettingToggle.vue
index ffc91a1..985ca84 100644
--- a/src/components/SettingToggle.vue
+++ b/src/components/SettingToggle.vue
@@ -1,6 +1,6 @@
1<template> 1<template>
2 <a v-on:click="toggleSetting()" class="navbar-item is-inline-block-mobile"> 2 <a v-on:click="toggleSetting()" class="navbar-item is-inline-block-mobile">
3 <span><i :class="['fas', 'fa-fw', value ? icon : iconAlt]"></i></span> 3 <span><i :class="['fas', 'fa-fw', value ? icon : secondaryIcon]"></i></span>
4 <slot></slot> 4 <slot></slot>
5 </a> 5 </a>
6</template> 6</template>
@@ -15,13 +15,12 @@ export default {
15 }, 15 },
16 data: function () { 16 data: function () {
17 return { 17 return {
18 secondaryIcon: null,
18 value: true, 19 value: true,
19 }; 20 };
20 }, 21 },
21 created: function () { 22 created: function () {
22 if (!this.iconAlt) { 23 this.secondaryIcon = this.iconAlt || this.icon;
23 this.iconAlt = this.icon;
24 }
25 24
26 if (this.name in localStorage) { 25 if (this.name in localStorage) {
27 this.value = JSON.parse(localStorage[this.name]); 26 this.value = JSON.parse(localStorage[this.name]);