@ -13,8 +13,8 @@ const Interactions = {
}
},
methods: {
onModeSwitch (dataset) {
this.filterMode = tabModeDict[dataset.filter]
onModeSwitch (key) {
this.filterMode = tabModeDict[key]
components: {
@ -10,18 +10,15 @@
:on-switch="onModeSwitch"
>
<span
data-tab-dummy
data-filter="mentions"
key="mentions"
:label="$t('nav.mentions')"
/>
data-filter="likes+repeats"
key="likes+repeats"
:label="$t('interactions.favs_repeats')"
data-filter="follows"
key="follows"
:label="$t('interactions.follows')"
</tab-switcher>
@ -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) {
@ -34,18 +34,15 @@
:custom-active="currenResultTab"
data-filter="statuses"
key="statuses"
:label="$t('user_card.statuses') + resultCount('visibleStatuses')"
data-filter="people"
key="people"
:label="$t('search.people') + resultCount('users')"
data-filter="hashtags"
key="hashtags"
:label="$t('search.hashtags') + resultCount('hashtags')"
@ -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