From 543604fd2d107d3c6b7123e5713ac923eb76f23c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 14 May 2019 22:38:16 +0300 Subject: removed unused masto api, added initial version of interactions timeline --- src/components/interactions/interactions.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/components/interactions/interactions.js (limited to 'src/components/interactions/interactions.js') diff --git a/src/components/interactions/interactions.js b/src/components/interactions/interactions.js new file mode 100644 index 00000000..4c56a931 --- /dev/null +++ b/src/components/interactions/interactions.js @@ -0,0 +1,25 @@ +import Notifications from '../notifications/notifications.vue' + +const tabModeDict = { + mentions: ['mention'], + 'likes+repeats': ['repeat', 'like'], + follows: ['follow'] +} + +const Interactions = { + data () { + return { + filterMode: tabModeDict['mentions'] + } + }, + methods: { + onModeSwitch(index, dataset) { + this.filterMode = tabModeDict[dataset.filter] + } + }, + components: { + Notifications + } +} + +export default Interactions -- cgit v1.2.3-70-g09d2 From aa24ac7ea6bfa4c37152137aabf84f45cee63a2e Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 15 May 2019 20:49:46 +0300 Subject: fix lint --- src/components/interactions/interactions.js | 2 +- src/components/notifications/notifications.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/interactions/interactions.js') diff --git a/src/components/interactions/interactions.js b/src/components/interactions/interactions.js index 4c56a931..d4e3cc17 100644 --- a/src/components/interactions/interactions.js +++ b/src/components/interactions/interactions.js @@ -13,7 +13,7 @@ const Interactions = { } }, methods: { - onModeSwitch(index, dataset) { + onModeSwitch (index, dataset) { this.filterMode = tabModeDict[dataset.filter] } }, diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 3a6e3b94..8c97eb04 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -15,7 +15,7 @@ const Notifications = { minimalMode: Boolean, // Custom filter mode, an array of strings, possible values 'mention', 'repeat', 'like', 'follow', used to override global filter for use in "Interactions" timeline filterMode: Array - }, + }, data () { return { bottomedOut: false -- cgit v1.2.3-70-g09d2 From cd14566a34013e65b603a71208d058871e992956 Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 9 Aug 2019 23:28:46 -0400 Subject: remove useless index param of onSwitch --- src/components/interactions/interactions.js | 2 +- src/components/search/search.js | 2 +- src/components/tab_switcher/tab_switcher.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/interactions/interactions.js') diff --git a/src/components/interactions/interactions.js b/src/components/interactions/interactions.js index d4e3cc17..90dbd76b 100644 --- a/src/components/interactions/interactions.js +++ b/src/components/interactions/interactions.js @@ -13,7 +13,7 @@ const Interactions = { } }, methods: { - onModeSwitch (index, dataset) { + onModeSwitch (dataset) { this.filterMode = tabModeDict[dataset.filter] } }, diff --git a/src/components/search/search.js b/src/components/search/search.js index b434e127..37940f34 100644 --- a/src/components/search/search.js +++ b/src/components/search/search.js @@ -75,7 +75,7 @@ const Search = { const length = this[tabName].length return length === 0 ? '' : ` (${length})` }, - onResultTabSwitch (_index, dataset) { + onResultTabSwitch (dataset) { this.currenResultTab = dataset.filter }, getActiveTab () { diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js index a5fe019c..ff99e3e7 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, index, this.$slots.default[index].elm.dataset) + this.onSwitch.call(null, this.$slots.default[index].elm.dataset) } this.active = index } -- cgit v1.2.3-70-g09d2 From df3e80b7c3fc91cbd62764be467d1dfe28b4b299 Mon Sep 17 00:00:00 2001 From: taehoon 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.js') 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" > 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" > 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 From b4acbf5311b5f8db21bc2e32a9e5246425edcec4 Mon Sep 17 00:00:00 2001 From: kPherox Date: Wed, 11 Dec 2019 18:25:52 +0900 Subject: Add user migrates filter to interactions --- src/components/interactions/interactions.js | 3 ++- src/components/interactions/interactions.vue | 4 ++++ src/i18n/en.json | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/components/interactions/interactions.js') diff --git a/src/components/interactions/interactions.js b/src/components/interactions/interactions.js index 1f8a9de9..cc31ff20 100644 --- a/src/components/interactions/interactions.js +++ b/src/components/interactions/interactions.js @@ -3,7 +3,8 @@ import Notifications from '../notifications/notifications.vue' const tabModeDict = { mentions: ['mention'], 'likes+repeats': ['repeat', 'like'], - follows: ['follow'] + follows: ['follow'], + moves: ['move'] } const Interactions = { diff --git a/src/components/interactions/interactions.vue b/src/components/interactions/interactions.vue index 08cee343..a2e252ab 100644 --- a/src/components/interactions/interactions.vue +++ b/src/components/interactions/interactions.vue @@ -21,6 +21,10 @@ key="follows" :label="$t('interactions.follows')" /> +