diff --git a/.circleci/config.yml b/.circleci/config.yml
index 35c603e4..2907dbe5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- - image: node:10-slim
+ - image: node:10.13.0-slim
working_directory: /var/opt/app
steps:
- checkout
diff --git a/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue b/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue
index 43bdd284..11ab5423 100644
--- a/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue
+++ b/src/renderer/components/TimelineSpace/Contents/DirectMessages.vue
@@ -13,6 +13,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
v-for="message in timeline"
:key="message.uri + message.id"
@@ -33,6 +34,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'directmessages',
@@ -83,6 +85,15 @@ export default {
})
}
this.$store.commit('TimelineSpace/changeLoading', false)
+
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
},
beforeUpdate () {
if (this.$store.state.TimelineSpace.SideMenu.unreadDirectMessagesTimeline && this.heading) {
@@ -94,6 +105,7 @@ export default {
this.$store.dispatch('TimelineSpace/stopDirectMessagesStreaming')
this.$store.dispatch('TimelineSpace/unbindDirectMessagesStreaming')
}
+ Event.$off('focus-timeline')
},
destroyed () {
this.$store.commit('TimelineSpace/Contents/DirectMessages/changeHeading', true)
@@ -196,6 +208,9 @@ export default {
focusToot (message) {
this.focusedId = message.uri + message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Favourites.vue b/src/renderer/components/TimelineSpace/Contents/Favourites.vue
index 196992a0..8764ee66 100644
--- a/src/renderer/components/TimelineSpace/Contents/Favourites.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Favourites.vue
@@ -12,6 +12,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
>
@@ -30,6 +31,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'favourites',
@@ -73,6 +75,17 @@ export default {
},
mounted () {
document.getElementById('scrollable').addEventListener('scroll', this.onScroll)
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
+ },
+ beforeDestroy () {
+ Event.$off('focus-timeline')
},
destroyed () {
this.$store.commit('TimelineSpace/Contents/Favourites/updateFavourites', [])
@@ -163,6 +176,9 @@ export default {
focusToot (message) {
this.focusedId = message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue
index d0a196a7..d4c6a5e3 100644
--- a/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Hashtag/Tag.vue
@@ -14,6 +14,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
>
@@ -32,6 +33,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'tag',
@@ -76,6 +78,15 @@ export default {
this.$store.commit('TimelineSpace/changeLoading', false)
})
document.getElementById('scrollable').addEventListener('scroll', this.onScroll)
+
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
},
watch: {
tag: function (newTag, oldTag) {
@@ -106,6 +117,7 @@ export default {
beforeDestroy () {
this.$store.dispatch('TimelineSpace/Contents/Hashtag/Tag/stopStreaming')
this.reset()
+ Event.$off('focus-timeline')
},
methods: {
async load (tag) {
@@ -206,6 +218,9 @@ export default {
focusToot (message) {
this.focusedId = message.uri + message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Home.vue b/src/renderer/components/TimelineSpace/Contents/Home.vue
index 9f5b89ec..5b10415e 100644
--- a/src/renderer/components/TimelineSpace/Contents/Home.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Home.vue
@@ -14,6 +14,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
>
@@ -33,6 +34,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'home',
@@ -85,12 +87,23 @@ export default {
mounted () {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
document.getElementById('scrollable').addEventListener('scroll', this.onScroll)
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
},
beforeUpdate () {
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline && this.heading) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
}
},
+ beforeDestroy () {
+ Event.$off('focus-timeline')
+ },
destroyed () {
this.$store.commit('TimelineSpace/Contents/Home/changeHeading', true)
this.$store.commit('TimelineSpace/Contents/Home/mergeTimeline')
@@ -178,6 +191,9 @@ export default {
focusToot (message) {
this.focusedId = message.uri + message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue b/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue
index 4864a740..b58cf115 100644
--- a/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Lists/Show.vue
@@ -14,6 +14,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
>
@@ -32,6 +33,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'list',
@@ -77,6 +79,16 @@ export default {
})
document.getElementById('scrollable').addEventListener('scroll', this.onScroll)
},
+ mounted () {
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
+ },
watch: {
list_id: function () {
this.$store.commit('TimelineSpace/changeLoading', true)
@@ -205,6 +217,9 @@ export default {
focusToot (message) {
this.focusedId = message.uri + message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Local.vue b/src/renderer/components/TimelineSpace/Contents/Local.vue
index 0013ccd3..343b8b4c 100644
--- a/src/renderer/components/TimelineSpace/Contents/Local.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Local.vue
@@ -14,6 +14,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
>
@@ -33,6 +34,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'local',
@@ -83,6 +85,15 @@ export default {
})
}
this.$store.commit('TimelineSpace/changeLoading', false)
+
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
},
beforeUpdate () {
if (this.$store.state.TimelineSpace.SideMenu.unreadLocalTimeline && this.heading) {
@@ -94,6 +105,7 @@ export default {
this.$store.dispatch('TimelineSpace/stopLocalStreaming')
this.$store.dispatch('TimelineSpace/unbindLocalStreaming')
}
+ Event.$off('focus-timeline')
},
destroyed () {
this.$store.commit('TimelineSpace/Contents/Local/changeHeading', true)
@@ -195,6 +207,9 @@ export default {
focusToot (message) {
this.focusedId = message.uri + message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Notifications.vue b/src/renderer/components/TimelineSpace/Contents/Notifications.vue
index 7d9b80c0..ee38a023 100644
--- a/src/renderer/components/TimelineSpace/Contents/Notifications.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Notifications.vue
@@ -12,6 +12,7 @@
:overlaid="modalOpened"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectNotification="focusNotification(message)"
>
@@ -31,6 +32,7 @@ import { mapState, mapGetters } from 'vuex'
import Notification from '~/src/renderer/components/molecules/Notification'
import scrollTop from '../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'notifications',
@@ -71,12 +73,24 @@ export default {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
this.$store.dispatch('TimelineSpace/Contents/Notifications/resetBadge')
document.getElementById('scrollable').addEventListener('scroll', this.onScroll)
+
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
},
beforeUpdate () {
if (this.$store.state.TimelineSpace.SideMenu.unreadNotifications) {
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
}
},
+ beforeDestroy () {
+ Event.$off('focus-timeline')
+ },
destroyed () {
this.$store.commit('TimelineSpace/Contents/Notifications/changeHeading', true)
this.$store.commit('TimelineSpace/Contents/Notifications/mergeNotifications')
@@ -160,6 +174,9 @@ export default {
focusNotification (notification) {
this.focusedId = notification.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/Public.vue b/src/renderer/components/TimelineSpace/Contents/Public.vue
index 5ee6c1ff..a5b2cb81 100644
--- a/src/renderer/components/TimelineSpace/Contents/Public.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Public.vue
@@ -14,6 +14,7 @@
v-on:delete="deleteToot"
@focusNext="focusNext"
@focusPrev="focusPrev"
+ @focusRight="focusSidebar"
@selectToot="focusToot(message)"
>
@@ -33,6 +34,7 @@ import { mapState, mapGetters } from 'vuex'
import Toot from '~/src/renderer/components/molecules/Toot'
import scrollTop from '../../utils/scroll'
import reloadable from '~/src/renderer/components/mixins/reloadable'
+import { Event } from '~/src/renderer/components/event'
export default {
name: 'public',
@@ -83,6 +85,15 @@ export default {
})
}
this.$store.commit('TimelineSpace/changeLoading', false)
+
+ Event.$on('focus-timeline', () => {
+ // If focusedId does not change, we have to refresh focusedId because Toot component watch change events.
+ const previousFocusedId = this.focusedId
+ this.focusedId = 0
+ this.$nextTick(function () {
+ this.focusedId = previousFocusedId
+ })
+ })
},
beforeUpdate () {
if (this.$store.state.TimelineSpace.SideMenu.unreadPublicTimeline && this.heading) {
@@ -94,6 +105,7 @@ export default {
this.$store.dispatch('TimelineSpace/stopPublicStreaming')
this.$store.dispatch('TimelineSpace/unbindPublicStreaming')
}
+ Event.$off('focus-timeline')
},
destroyed () {
this.$store.commit('TimelineSpace/Contents/Public/changeHeading', true)
@@ -195,6 +207,9 @@ export default {
focusToot (message) {
this.focusedId = message.uri + message.id
},
+ focusSidebar () {
+ Event.$emit('focus-sidebar')
+ },
handleKey (event) {
switch (event.srcKey) {
case 'next':
diff --git a/src/renderer/components/TimelineSpace/Contents/SideBar/TootDetail.vue b/src/renderer/components/TimelineSpace/Contents/SideBar/TootDetail.vue
index 09b7dce2..a5b4cecd 100644
--- a/src/renderer/components/TimelineSpace/Contents/SideBar/TootDetail.vue
+++ b/src/renderer/components/TimelineSpace/Contents/SideBar/TootDetail.vue
@@ -1,39 +1,91 @@