Merge branch 'akkoma' into shigusegubu-themes3
This commit is contained in:
commit
109882a68e
7 changed files with 28 additions and 9 deletions
|
|
@ -117,6 +117,8 @@ const NavPanel = {
|
||||||
return filterNavigation(
|
return filterNavigation(
|
||||||
Object
|
Object
|
||||||
.entries({ ...TIMELINES })
|
.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 })),
|
.map(([k, v]) => ({ ...v, name: k })),
|
||||||
{
|
{
|
||||||
hasChats: this.pleromaChatMessagesAvailable,
|
hasChats: this.pleromaChatMessagesAvailable,
|
||||||
|
|
@ -124,7 +126,6 @@ const NavPanel = {
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.privateMode,
|
||||||
currentUser: this.currentUser,
|
currentUser: this.currentUser,
|
||||||
supportsBookmarkFolders: this.bookmarkFolders,
|
|
||||||
supportsBubbleTimeline: this.bubbleTimeline
|
supportsBubbleTimeline: this.bubbleTimeline
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -140,8 +141,8 @@ const NavPanel = {
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.privateMode,
|
||||||
currentUser: this.currentUser,
|
currentUser: this.currentUser,
|
||||||
supportsBookmarkFolders: this.bookmarkFolders,
|
supportsBubbleTimeline: this.bubbleTimeline,
|
||||||
supportsBubbleTimeline: this.bubbleTimeline
|
supportsBookmarkFolders: this.bookmarkFolders
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,9 @@ export const filterNavigation = (list = [], {
|
||||||
if ((!currentUser || !currentUser.locked) && set.has('lockedUser')) return false
|
if ((!currentUser || !currentUser.locked) && set.has('lockedUser')) return false
|
||||||
if (!hasChats && set.has('chats')) return false
|
if (!hasChats && set.has('chats')) return false
|
||||||
if (!hasAnnouncements && set.has('announcements')) return false
|
if (!hasAnnouncements && set.has('announcements')) return false
|
||||||
if (!supportsBookmarkFolders && set.has('supportsBookmarkFolders')) return false
|
|
||||||
if (!supportsBubbleTimeline && set.has('supportsBubbleTimeline')) return false
|
if (!supportsBubbleTimeline && set.has('supportsBubbleTimeline')) return false
|
||||||
|
if (!supportsBookmarkFolders && set.has('supportsBookmarkFolders')) return false
|
||||||
|
if (supportsBookmarkFolders && set.has('!supportsBookmarkFolders')) return false
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,11 +41,11 @@ export const TIMELINES = {
|
||||||
label: 'nav.twkn',
|
label: 'nav.twkn',
|
||||||
criteria: ['!private', 'federating']
|
criteria: ['!private', 'federating']
|
||||||
},
|
},
|
||||||
|
// bookmarks are still technically a timeline so we should show it in the dropdown
|
||||||
bookmarks: {
|
bookmarks: {
|
||||||
route: 'bookmarks',
|
route: 'bookmarks',
|
||||||
icon: 'bookmark',
|
icon: 'bookmark',
|
||||||
label: 'nav.bookmarks',
|
label: 'nav.bookmarks',
|
||||||
criteria: ['supportsBookmarkFolders']
|
|
||||||
},
|
},
|
||||||
favorites: {
|
favorites: {
|
||||||
routeObject: { name: 'user-profile', query: { tab: 'favorites' } },
|
routeObject: { name: 'user-profile', query: { tab: 'favorites' } },
|
||||||
|
|
@ -60,6 +60,15 @@ export const TIMELINES = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ROOT_ITEMS = {
|
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: {
|
interactions: {
|
||||||
route: 'interactions',
|
route: 'interactions',
|
||||||
icon: 'bell',
|
icon: 'bell',
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
faUsers,
|
faUsers,
|
||||||
faGlobe,
|
faGlobe,
|
||||||
|
faCity,
|
||||||
faBookmark,
|
faBookmark,
|
||||||
faEnvelope,
|
faEnvelope,
|
||||||
faComments,
|
faComments,
|
||||||
|
|
@ -25,6 +26,7 @@ import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||||
library.add(
|
library.add(
|
||||||
faUsers,
|
faUsers,
|
||||||
faGlobe,
|
faGlobe,
|
||||||
|
faCity,
|
||||||
faBookmark,
|
faBookmark,
|
||||||
faEnvelope,
|
faEnvelope,
|
||||||
faComments,
|
faComments,
|
||||||
|
|
@ -65,7 +67,8 @@ const NavPanel = {
|
||||||
followRequestCount: state => state.api.followRequests.length,
|
followRequestCount: state => state.api.followRequests.length,
|
||||||
privateMode: state => state.instance.private,
|
privateMode: state => state.instance.private,
|
||||||
federating: state => state.instance.federating,
|
federating: state => state.instance.federating,
|
||||||
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable
|
pleromaChatMessagesAvailable: state => state.instance.pleromaChatMessagesAvailable,
|
||||||
|
bubbleTimeline: state => state.instance.localBubbleInstances.length > 0
|
||||||
}),
|
}),
|
||||||
pinnedList () {
|
pinnedList () {
|
||||||
if (!this.currentUser) {
|
if (!this.currentUser) {
|
||||||
|
|
@ -79,7 +82,9 @@ const NavPanel = {
|
||||||
hasAnnouncements: this.supportsAnnouncements,
|
hasAnnouncements: this.supportsAnnouncements,
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.privateMode,
|
||||||
currentUser: this.currentUser
|
currentUser: this.currentUser,
|
||||||
|
supportsBubbleTimeline: this.bubbleTimeline,
|
||||||
|
supportsBookmarkFolders: this.bookmarks
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return filterNavigation(
|
return filterNavigation(
|
||||||
|
|
@ -98,6 +103,8 @@ const NavPanel = {
|
||||||
{
|
{
|
||||||
hasChats: this.pleromaChatMessagesAvailable,
|
hasChats: this.pleromaChatMessagesAvailable,
|
||||||
hasAnnouncements: this.supportsAnnouncements,
|
hasAnnouncements: this.supportsAnnouncements,
|
||||||
|
supportsBubbleTimeline: this.bubbleTimeline,
|
||||||
|
supportsBookmarkFolders: this.bookmarks,
|
||||||
isFederating: this.federating,
|
isFederating: this.federating,
|
||||||
isPrivate: this.privateMode,
|
isPrivate: this.privateMode,
|
||||||
currentUser: this.currentUser
|
currentUser: this.currentUser
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const NotificationsTab = {
|
||||||
},
|
},
|
||||||
canReceiveReports () {
|
canReceiveReports () {
|
||||||
if (!this.user) { return false }
|
if (!this.user) { return false }
|
||||||
return this.user.privileges?.includes('reports_manage_reports')
|
return this.user.privileges.includes('reports_manage_reports')
|
||||||
},
|
},
|
||||||
...SharedComputedObject()
|
...SharedComputedObject()
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ export default {
|
||||||
const privileges = this.loggedIn.privileges
|
const privileges = this.loggedIn.privileges
|
||||||
return this.loggedIn.role === 'admin' ||
|
return this.loggedIn.role === 'admin' ||
|
||||||
privileges.includes('users_manage_activation_state') ||
|
privileges.includes('users_manage_activation_state') ||
|
||||||
privileges.includes('users_delete')||
|
privileges.includes('users_delete') ||
|
||||||
privileges.includes('users_manage_tags')
|
privileges.includes('users_manage_tags')
|
||||||
},
|
},
|
||||||
hasNote () {
|
hasNote () {
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,7 @@ const defaultState = {
|
||||||
suggestionsWeb: '',
|
suggestionsWeb: '',
|
||||||
quotingAvailable: false,
|
quotingAvailable: false,
|
||||||
groupActorAvailable: false,
|
groupActorAvailable: false,
|
||||||
|
localBubbleInstances: [], // Akkoma
|
||||||
|
|
||||||
// Html stuff
|
// Html stuff
|
||||||
instanceSpecificPanelContent: '',
|
instanceSpecificPanelContent: '',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue