From 04fa2aefb3a7c21c64fd0be25237bf266b6444df Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 14 May 2019 19:49:03 +0300 Subject: [PATCH 01/59] get rid of reply-left, we decided it should go long time ago --- src/components/status/status.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 490e167bc..e8c1a8743 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -168,7 +168,6 @@
-
@@ -618,11 +617,6 @@ a.unmute { margin-left: auto; } -.reply-left { - flex: 0; - min-width: 48px; -} - .reply-body { flex: 1; } From 543604fd2d107d3c6b7123e5713ac923eb76f23c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 14 May 2019 22:38:16 +0300 Subject: [PATCH 02/59] removed unused masto api, added initial version of interactions timeline --- src/boot/routes.js | 4 +-- src/components/interactions/interactions.js | 25 +++++++++++++++++++ src/components/interactions/interactions.vue | 25 +++++++++++++++++++ src/components/mentions/mentions.vue | 2 +- src/components/nav_panel/nav_panel.vue | 2 +- src/components/notifications/notifications.js | 8 ++++-- .../notifications/notifications.vue | 4 +-- src/components/tab_switcher/tab_switcher.js | 13 +++++++--- src/services/api/api.service.js | 11 -------- .../backend_interactor_service.js | 5 ---- .../notification_utils/notification_utils.js | 6 +++-- 11 files changed, 76 insertions(+), 29 deletions(-) create mode 100644 src/components/interactions/interactions.js create mode 100644 src/components/interactions/interactions.vue diff --git a/src/boot/routes.js b/src/boot/routes.js index 7e54a98bc..508c76df6 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -3,7 +3,7 @@ import PublicAndExternalTimeline from 'components/public_and_external_timeline/p import FriendsTimeline from 'components/friends_timeline/friends_timeline.vue' import TagTimeline from 'components/tag_timeline/tag_timeline.vue' import ConversationPage from 'components/conversation-page/conversation-page.vue' -import Mentions from 'components/mentions/mentions.vue' +import Interactions from 'components/interactions/interactions.vue' import DMs from 'components/dm_timeline/dm_timeline.vue' import UserProfile from 'components/user_profile/user_profile.vue' import Settings from 'components/settings/settings.vue' @@ -34,7 +34,7 @@ export default (store) => { { name: 'tag-timeline', path: '/tag/:tag', component: TagTimeline }, { name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } }, { name: 'external-user-profile', path: '/users/:id', component: UserProfile }, - { name: 'mentions', path: '/users/:username/mentions', component: Mentions }, + { name: 'mentions', path: '/users/:username/interactions', component: Interactions }, { name: 'dms', path: '/users/:username/dms', component: DMs }, { name: 'settings', path: '/settings', component: Settings }, { name: 'registration', path: '/registration', component: Registration }, diff --git a/src/components/interactions/interactions.js b/src/components/interactions/interactions.js new file mode 100644 index 000000000..4c56a931a --- /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 diff --git a/src/components/interactions/interactions.vue b/src/components/interactions/interactions.vue new file mode 100644 index 000000000..751e5d402 --- /dev/null +++ b/src/components/interactions/interactions.vue @@ -0,0 +1,25 @@ + + + diff --git a/src/components/mentions/mentions.vue b/src/components/mentions/mentions.vue index bba06da62..6b4e96e0b 100644 --- a/src/components/mentions/mentions.vue +++ b/src/components/mentions/mentions.vue @@ -1,5 +1,5 @@ diff --git a/src/components/nav_panel/nav_panel.vue b/src/components/nav_panel/nav_panel.vue index 7a7212fb1..05097c453 100644 --- a/src/components/nav_panel/nav_panel.vue +++ b/src/components/nav_panel/nav_panel.vue @@ -9,7 +9,7 @@
  • - {{ $t("nav.mentions") }} + {{ $t("nav.interactions") }}
  • diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 5b13b98ea..acc31986a 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -8,7 +8,7 @@ import { const Notifications = { props: [ - 'noHeading' + 'noHeading', 'minimalMode', 'filterMode' ], data () { return { @@ -16,6 +16,9 @@ const Notifications = { } }, computed: { + mainClass () { + return this.minimalMode ? '' : 'panel panel-default' + }, notifications () { return notificationsFromStore(this.$store) }, @@ -26,7 +29,8 @@ const Notifications = { return unseenNotificationsFromStore(this.$store) }, visibleNotifications () { - return visibleNotificationsFromStore(this.$store) + console.log(this.filterMode) + return visibleNotificationsFromStore(this.$store, this.filterMode) }, unseenCount () { return this.unseenNotifications.length diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 88775be16..3c3ae1912 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -1,6 +1,6 @@