Compare commits

..

No commits in common. "109882a68eb27b5c44613e3a7e4e7f78fc72ddc7" and "a2391a11cf700a30b9ab2dc834b0113cafa88e9b" have entirely different histories.

7 changed files with 9 additions and 28 deletions

View file

@ -117,8 +117,6 @@ const NavPanel = {
return filterNavigation(
Object
.entries({ ...TIMELINES })
// do not show in timeliens list since it's in a better place now
.filter(([key]) => key !== 'bookmarks')
.map(([k, v]) => ({ ...v, name: k })),
{
hasChats: this.pleromaChatMessagesAvailable,
@ -126,6 +124,7 @@ const NavPanel = {
isFederating: this.federating,
isPrivate: this.privateMode,
currentUser: this.currentUser,
supportsBookmarkFolders: this.bookmarkFolders,
supportsBubbleTimeline: this.bubbleTimeline
}
)
@ -141,8 +140,8 @@ const NavPanel = {
isFederating: this.federating,
isPrivate: this.privateMode,
currentUser: this.currentUser,
supportsBubbleTimeline: this.bubbleTimeline,
supportsBookmarkFolders: this.bookmarkFolders
supportsBookmarkFolders: this.bookmarkFolders,
supportsBubbleTimeline: this.bubbleTimeline
}
)
},

View file

@ -15,9 +15,8 @@ export const filterNavigation = (list = [], {
if ((!currentUser || !currentUser.locked) && set.has('lockedUser')) return false
if (!hasChats && set.has('chats')) return false
if (!hasAnnouncements && set.has('announcements')) return false
if (!supportsBubbleTimeline && set.has('supportsBubbleTimeline')) return false
if (!supportsBookmarkFolders && set.has('supportsBookmarkFolders')) return false
if (supportsBookmarkFolders && set.has('!supportsBookmarkFolders')) return false
if (!supportsBubbleTimeline && set.has('supportsBubbleTimeline')) return false
return true
})
}

View file

@ -41,11 +41,11 @@ export const TIMELINES = {
label: 'nav.twkn',
criteria: ['!private', 'federating']
},
// bookmarks are still technically a timeline so we should show it in the dropdown
bookmarks: {
route: 'bookmarks',
icon: 'bookmark',
label: 'nav.bookmarks',
criteria: ['supportsBookmarkFolders']
},
favorites: {
routeObject: { name: 'user-profile', query: { tab: 'favorites' } },
@ -60,15 +60,6 @@ export const TIMELINES = {
}
export const ROOT_ITEMS = {
bookmarks: {
route: 'bookmarks',
icon: 'bookmark',
label: 'nav.bookmarks',
// shows bookmarks entry in a better suited location
// hides it when bookmark folders are supported since
// we show custom component instead of it
criteria: ['!supportsBookmarkFolders']
},
interactions: {
route: 'interactions',
icon: 'bell',

View file

@ -9,7 +9,6 @@ import { library } from '@fortawesome/fontawesome-svg-core'
import {
faUsers,
faGlobe,
faCity,
faBookmark,
faEnvelope,
faComments,
@ -26,7 +25,6 @@ import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
library.add(
faUsers,
faGlobe,
faCity,
faBookmark,
faEnvelope,
faComments,
@ -67,8 +65,7 @@ const NavPanel = {
followRequestCount: state => state.api.followRequests.length,
privateMode: state => state.instance.private,
federating: state => state.instance.federating,
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable,
bubbleTimeline: state => state.instance.localBubbleInstances.length > 0
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable
}),
pinnedList () {
if (!this.currentUser) {
@ -82,9 +79,7 @@ const NavPanel = {
hasAnnouncements: this.supportsAnnouncements,
isFederating: this.federating,
isPrivate: this.privateMode,
currentUser: this.currentUser,
supportsBubbleTimeline: this.bubbleTimeline,
supportsBookmarkFolders: this.bookmarks
currentUser: this.currentUser
})
}
return filterNavigation(
@ -103,8 +98,6 @@ const NavPanel = {
{
hasChats: this.pleromaChatMessagesAvailable,
hasAnnouncements: this.supportsAnnouncements,
supportsBubbleTimeline: this.bubbleTimeline,
supportsBookmarkFolders: this.bookmarks,
isFederating: this.federating,
isPrivate: this.privateMode,
currentUser: this.currentUser

View file

@ -18,7 +18,7 @@ const NotificationsTab = {
},
canReceiveReports () {
if (!this.user) { return false }
return this.user.privileges.includes('reports_manage_reports')
return this.user.privileges?.includes('reports_manage_reports')
},
...SharedComputedObject()
},

View file

@ -136,7 +136,7 @@ export default {
const privileges = this.loggedIn.privileges
return this.loggedIn.role === 'admin' ||
privileges.includes('users_manage_activation_state') ||
privileges.includes('users_delete') ||
privileges.includes('users_delete')||
privileges.includes('users_manage_tags')
},
hasNote () {

View file

@ -163,7 +163,6 @@ const defaultState = {
suggestionsWeb: '',
quotingAvailable: false,
groupActorAvailable: false,
localBubbleInstances: [], // Akkoma
// Html stuff
instanceSpecificPanelContent: '',