fix mobile side drawer causing issues
This commit is contained in:
parent
cd7380efe7
commit
666015c9fa
@ -1,3 +1,12 @@
|
|||||||
|
export const USERNAME_ROUTES = new Set([
|
||||||
|
'bookmarks',
|
||||||
|
'dms',
|
||||||
|
'interactions',
|
||||||
|
'notifications',
|
||||||
|
'chat',
|
||||||
|
'chats'
|
||||||
|
])
|
||||||
|
|
||||||
export const TIMELINES = {
|
export const TIMELINES = {
|
||||||
home: {
|
home: {
|
||||||
route: 'friends',
|
route: 'friends',
|
||||||
|
@ -1,18 +1,10 @@
|
|||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faThumbtack } from '@fortawesome/free-solid-svg-icons'
|
import { faThumbtack } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
library.add(faThumbtack)
|
library.add(faThumbtack)
|
||||||
|
|
||||||
const USERNAME_ROUTES = new Set([
|
|
||||||
'bookmarks',
|
|
||||||
'dms',
|
|
||||||
'interactions',
|
|
||||||
'notifications',
|
|
||||||
'chat',
|
|
||||||
'chats'
|
|
||||||
])
|
|
||||||
|
|
||||||
const NavigationEntry = {
|
const NavigationEntry = {
|
||||||
props: ['item', 'showPin'],
|
props: ['item', 'showPin'],
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import { TIMELINES, ROOT_ITEMS } from 'src/components/navigation/navigation.js'
|
import { TIMELINES, ROOT_ITEMS, USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
||||||
import { getListEntries, filterNavigation } from 'src/components/navigation/filter.js'
|
import { getListEntries, filterNavigation } from 'src/components/navigation/filter.js'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
@ -27,15 +27,6 @@ library.add(
|
|||||||
faList
|
faList
|
||||||
)
|
)
|
||||||
|
|
||||||
const USERNAME_ROUTES = new Set([
|
|
||||||
'bookmarks',
|
|
||||||
'dms',
|
|
||||||
'interactions',
|
|
||||||
'notifications',
|
|
||||||
'chat',
|
|
||||||
'chats'
|
|
||||||
])
|
|
||||||
|
|
||||||
const NavPanel = {
|
const NavPanel = {
|
||||||
props: ['limit'],
|
props: ['limit'],
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -2,6 +2,7 @@ import { mapState, mapGetters } from 'vuex'
|
|||||||
import UserCard from '../user_card/user_card.vue'
|
import UserCard from '../user_card/user_card.vue'
|
||||||
import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'
|
import { unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils'
|
||||||
import GestureService from '../../services/gesture_service/gesture_service'
|
import GestureService from '../../services/gesture_service/gesture_service'
|
||||||
|
import { USERNAME_ROUTES } from 'src/components/navigation/navigation.js'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
faSignInAlt,
|
faSignInAlt,
|
||||||
@ -82,10 +83,16 @@ const SideDrawer = {
|
|||||||
return this.$store.state.instance.federating
|
return this.$store.state.instance.federating
|
||||||
},
|
},
|
||||||
timelinesRoute () {
|
timelinesRoute () {
|
||||||
|
let name
|
||||||
if (this.$store.state.interface.lastTimeline) {
|
if (this.$store.state.interface.lastTimeline) {
|
||||||
return this.$store.state.interface.lastTimeline
|
name = this.$store.state.interface.lastTimeline
|
||||||
|
}
|
||||||
|
name = this.currentUser ? 'friends' : 'public-timeline'
|
||||||
|
if (USERNAME_ROUTES.has(name)) {
|
||||||
|
return { name, params: { username: this.currentUser.screen_name }}
|
||||||
|
} else {
|
||||||
|
return { name }
|
||||||
}
|
}
|
||||||
return this.currentUser ? 'friends' : 'public-timeline'
|
|
||||||
},
|
},
|
||||||
...mapState({
|
...mapState({
|
||||||
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable
|
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
v-if="currentUser || !privateMode"
|
v-if="currentUser || !privateMode"
|
||||||
@click="toggleDrawer"
|
@click="toggleDrawer"
|
||||||
>
|
>
|
||||||
<router-link :to="{ name: timelinesRoute }">
|
<router-link :to="timelinesRoute">
|
||||||
<FAIcon
|
<FAIcon
|
||||||
fixed-width
|
fixed-width
|
||||||
class="fa-scale-110 fa-old-padding"
|
class="fa-scale-110 fa-old-padding"
|
||||||
|
Loading…
Reference in New Issue
Block a user