From 8d6750d9c2816e33a0444cd978f94009d8b85d47 Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Fri, 5 Jul 2019 10:17:44 +0300
Subject: eslint --fix --ext .js,.vue src

---
 src/components/interactions/interactions.vue | 30 +++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

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

diff --git a/src/components/interactions/interactions.vue b/src/components/interactions/interactions.vue
index 38b2670d..d71c99d5 100644
--- a/src/components/interactions/interactions.vue
+++ b/src/components/interactions/interactions.vue
@@ -7,18 +7,30 @@
     </div>
     <tab-switcher
       ref="tabSwitcher"
-      :onSwitch="onModeSwitch"
-      >
-      <span data-tab-dummy data-filter="mentions" :label="$t('nav.mentions')"/>
-      <span data-tab-dummy data-filter="likes+repeats" :label="$t('interactions.favs_repeats')"/>
-      <span data-tab-dummy data-filter="follows" :label="$t('interactions.follows')"/>
+      :on-switch="onModeSwitch"
+    >
+      <span
+        data-tab-dummy
+        data-filter="mentions"
+        :label="$t('nav.mentions')"
+      />
+      <span
+        data-tab-dummy
+        data-filter="likes+repeats"
+        :label="$t('interactions.favs_repeats')"
+      />
+      <span
+        data-tab-dummy
+        data-filter="follows"
+        :label="$t('interactions.follows')"
+      />
     </tab-switcher>
     <Notifications
       ref="notifications"
-      :noHeading="true"
-      :minimalMode="true"
-      :filterMode="filterMode"
-      />
+      :no-heading="true"
+      :minimal-mode="true"
+      :filter-mode="filterMode"
+    />
   </div>
 </template>
 
-- 
cgit v1.2.3-70-g09d2


From df3e80b7c3fc91cbd62764be467d1dfe28b4b299 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Fri, 9 Aug 2019 23:48:08 -0400
Subject: use key prop instead of dataset to identify active tab

---
 src/components/interactions/interactions.js  | 4 ++--
 src/components/interactions/interactions.vue | 9 +++------
 src/components/search/search.js              | 4 ++--
 src/components/search/search.vue             | 9 +++------
 src/components/tab_switcher/tab_switcher.js  | 2 +-
 5 files changed, 11 insertions(+), 17 deletions(-)

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

diff --git a/src/components/interactions/interactions.js b/src/components/interactions/interactions.js
index 90dbd76b..1f8a9de9 100644
--- a/src/components/interactions/interactions.js
+++ b/src/components/interactions/interactions.js
@@ -13,8 +13,8 @@ const Interactions = {
     }
   },
   methods: {
-    onModeSwitch (dataset) {
-      this.filterMode = tabModeDict[dataset.filter]
+    onModeSwitch (key) {
+      this.filterMode = tabModeDict[key]
     }
   },
   components: {
diff --git a/src/components/interactions/interactions.vue b/src/components/interactions/interactions.vue
index d71c99d5..08cee343 100644
--- a/src/components/interactions/interactions.vue
+++ b/src/components/interactions/interactions.vue
@@ -10,18 +10,15 @@
       :on-switch="onModeSwitch"
     >
       <span
-        data-tab-dummy
-        data-filter="mentions"
+        key="mentions"
         :label="$t('nav.mentions')"
       />
       <span
-        data-tab-dummy
-        data-filter="likes+repeats"
+        key="likes+repeats"
         :label="$t('interactions.favs_repeats')"
       />
       <span
-        data-tab-dummy
-        data-filter="follows"
+        key="follows"
         :label="$t('interactions.follows')"
       />
     </tab-switcher>
diff --git a/src/components/search/search.js b/src/components/search/search.js
index 37940f34..8e903052 100644
--- a/src/components/search/search.js
+++ b/src/components/search/search.js
@@ -75,8 +75,8 @@ const Search = {
       const length = this[tabName].length
       return length === 0 ? '' : ` (${length})`
     },
-    onResultTabSwitch (dataset) {
-      this.currenResultTab = dataset.filter
+    onResultTabSwitch (key) {
+      this.currenResultTab = key
     },
     getActiveTab () {
       if (this.visibleStatuses.length > 0) {
diff --git a/src/components/search/search.vue b/src/components/search/search.vue
index 4350e672..eb20973b 100644
--- a/src/components/search/search.vue
+++ b/src/components/search/search.vue
@@ -34,18 +34,15 @@
           :custom-active="currenResultTab"
         >
           <span
-            data-tab-dummy
-            data-filter="statuses"
+            key="statuses"
             :label="$t('user_card.statuses') + resultCount('visibleStatuses')"
           />
           <span
-            data-tab-dummy
-            data-filter="people"
+            key="people"
             :label="$t('search.people') + resultCount('users')"
           />
           <span
-            data-tab-dummy
-            data-filter="hashtags"
+            key="hashtags"
             :label="$t('search.hashtags') + resultCount('hashtags')"
           />
         </tab-switcher>
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index ff99e3e7..b26040ff 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -20,7 +20,7 @@ export default Vue.component('tab-switcher', {
     activateTab (index, dataset) {
       return () => {
         if (typeof this.onSwitch === 'function') {
-          this.onSwitch.call(null, this.$slots.default[index].elm.dataset)
+          this.onSwitch.call(null, this.$slots.default[index].key)
         }
         this.active = index
       }
-- 
cgit v1.2.3-70-g09d2

