timeline visiblity stuff etc etc
This commit is contained in:
parent
084fe71903
commit
958dfaa960
8 changed files with 63 additions and 3 deletions
|
@ -24,6 +24,7 @@ import ListEdit from 'components/list_edit/list_edit.vue'
|
|||
import AnnouncementsPage from 'components/announcements_page/announcements_page.vue'
|
||||
import RegistrationRequestSent from 'components/registration_request_sent/registration_request_sent.vue'
|
||||
import AwaitingEmailConfirmation from 'components/awaiting_email_confirmation/awaiting_email_confirmation.vue'
|
||||
import SocialTimeline from '../components/social_timeline/social_timeline'
|
||||
|
||||
export default (store) => {
|
||||
const validateAuthenticatedRoute = (to, from, next) => {
|
||||
|
@ -46,6 +47,7 @@ export default (store) => {
|
|||
{ name: 'public-external-timeline', path: '/main/all', component: PublicAndExternalTimeline },
|
||||
{ name: 'public-timeline', path: '/main/public', component: PublicTimeline },
|
||||
{ name: 'bubble-timeline', path: '/main/bubble', component: BubbleTimeline },
|
||||
{ name: 'social-timeline', path: '/main/social', component: BubbleTimeline },
|
||||
{ name: 'friends', path: '/main/friends', component: FriendsTimeline, beforeEnter: validateAuthenticatedRoute },
|
||||
{ name: 'tag-timeline', path: '/tag/:tag', component: TagTimeline },
|
||||
{ name: 'bookmarks', path: '/bookmarks', component: BookmarkTimeline },
|
||||
|
|
18
src/components/social_timeline/social_timeline.js
Normal file
18
src/components/social_timeline/social_timeline.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import Timeline from '../timeline/timeline.vue'
|
||||
const SocialTimeline = {
|
||||
components: {
|
||||
Timeline
|
||||
},
|
||||
computed: {
|
||||
timeline () { return this.$store.state.statuses.timelines.bubble }
|
||||
},
|
||||
created () {
|
||||
this.$store.dispatch('startFetchingTimeline', { timeline: 'social' })
|
||||
},
|
||||
unmounted () {
|
||||
this.$store.dispatch('stopFetchingTimeline', 'bubble')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default SocialTimeline
|
9
src/components/social_timeline/social_timeline.vue
Normal file
9
src/components/social_timeline/social_timeline.vue
Normal file
|
@ -0,0 +1,9 @@
|
|||
<template>
|
||||
<Timeline
|
||||
:title="$t('nav.social_timeline')"
|
||||
:timeline="timeline"
|
||||
:timeline-name="'social'"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script src="./social_timeline.js"></script>
|
|
@ -16,7 +16,8 @@ export const timelineNames = () => {
|
|||
'dms': 'nav.dms',
|
||||
'public-timeline': 'nav.public_tl',
|
||||
'public-external-timeline': 'nav.twkn',
|
||||
'bubble-timeline': 'nav.bubble_timeline'
|
||||
'bubble-timeline': 'nav.bubble_timeline',
|
||||
'social-timeline': 'nav.social_timeline',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,22 @@
|
|||
>{{ $t("nav.bubble_timeline") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="bubbleTimelineVisible">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
:to="{ name: 'social-timeline' }"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
class="fa-scale-110 fa-old-padding "
|
||||
:icon="['far', 'circle']"
|
||||
/>
|
||||
<span
|
||||
:title="$t('nav.bubble_timeline_description')"
|
||||
:aria-label="$t('nav.bubble_timeline_description')"
|
||||
>{{ $t("nav.social_timeline") }}</span>
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if="publicTimelineVisible">
|
||||
<router-link
|
||||
class="menu-item"
|
||||
|
|
|
@ -39,6 +39,18 @@
|
|||
:title="$t('nav.bubble_timeline_description')"
|
||||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="bubbleTimelineVisible"
|
||||
:to="{ name: 'social-timeline' }"
|
||||
class="nav-icon"
|
||||
>
|
||||
<FAIcon
|
||||
fixed-width
|
||||
class="fa-scale-110 fa-old-padding"
|
||||
:icon="['far', 'circle']"
|
||||
:title="$t('nav.bubble_timeline_description')"
|
||||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="federatedTimelineVisible"
|
||||
:to="{ name: 'public-external-timeline' }"
|
||||
|
|
|
@ -320,7 +320,8 @@
|
|||
"search": "Search",
|
||||
"timeline": "Timeline",
|
||||
"timelines": "Timelines",
|
||||
"twkn": "Known Network",
|
||||
"twkn": "Global timeline",
|
||||
"social": "Social timeline",
|
||||
"twkn_timeline_description": "Posts from the entire network",
|
||||
"user_search": "User Search",
|
||||
"who_to_follow": "Who to follow"
|
||||
|
|
|
@ -11,7 +11,8 @@ const currentUserOrTimelineVisibleUnauthenticated = (state, timeline) => (
|
|||
const federatedTimelineAvailable = (state) => state.instance.federatedTimelineAvailable;
|
||||
|
||||
export const federatedTimelineVisible = (state) => (
|
||||
federatedTimelineAvailable(state) && currentUserOrTimelineVisibleUnauthenticated(state, 'federated')
|
||||
//federatedTimelineAvailable(state) && should always be available?
|
||||
currentUserOrTimelineVisibleUnauthenticated(state, 'federated')
|
||||
);
|
||||
|
||||
export const publicTimelineVisible = (state) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue