biome format --write

This commit is contained in:
Henry Jameson 2026-01-06 16:22:52 +02:00
commit 9262e803ec
415 changed files with 54076 additions and 17419 deletions

View file

@ -6,9 +6,7 @@ import BookmarkFoldersMenuContent from '../bookmark_folders_menu/bookmark_folder
import { library } from '@fortawesome/fontawesome-svg-core'
import { TIMELINES } from 'src/components/navigation/navigation.js'
import { filterNavigation } from 'src/components/navigation/filter.js'
import {
faChevronDown
} from '@fortawesome/free-solid-svg-icons'
import { faChevronDown } from '@fortawesome/free-solid-svg-icons'
import { useInterfaceStore } from 'src/stores/interface'
import { useListsStore } from 'src/stores/lists'
import { useBookmarkFoldersStore } from 'src/stores/bookmark_folders'
@ -25,7 +23,7 @@ export const timelineNames = (supportsBookmarkFolders) => {
'public-timeline': 'nav.public_tl',
'public-external-timeline': 'nav.twkn',
quotes: 'nav.quotes',
bubble: 'nav.bubble'
bubble: 'nav.bubble',
}
}
@ -34,35 +32,39 @@ const TimelineMenu = {
Popover,
NavigationEntry,
ListsMenuContent,
BookmarkFoldersMenuContent
BookmarkFoldersMenuContent,
},
data () {
data() {
return {
isOpen: false
isOpen: false,
}
},
created () {
created() {
if (timelineNames(this.bookmarkFolders)[this.$route.name]) {
useInterfaceStore().setLastTimeline(this.$route.name)
}
},
computed: {
useListsMenu () {
useListsMenu() {
const route = this.$route.name
return route === 'lists-timeline'
},
useBookmarkFoldersMenu () {
useBookmarkFoldersMenu() {
const route = this.$route.name
return this.bookmarkFolders && (route === 'bookmark-folder' || route === 'bookmarks')
return (
this.bookmarkFolders &&
(route === 'bookmark-folder' || route === 'bookmarks')
)
},
...mapState({
currentUser: state => state.users.currentUser,
privateMode: state => state.instance.private,
federating: state => state.instance.federating,
bookmarkFolders: state => state.instance.pleromaBookmarkFoldersAvailable,
bubbleTimeline: state => state.instance.localBubbleInstances.length > 0
currentUser: (state) => state.users.currentUser,
privateMode: (state) => state.instance.private,
federating: (state) => state.instance.federating,
bookmarkFolders: (state) =>
state.instance.pleromaBookmarkFoldersAvailable,
bubbleTimeline: (state) => state.instance.localBubbleInstances.length > 0,
}),
timelinesList () {
timelinesList() {
return filterNavigation(
Object.entries(TIMELINES).map(([k, v]) => ({ ...v, name: k })),
{
@ -71,13 +73,13 @@ const TimelineMenu = {
isPrivate: this.privateMode,
currentUser: this.currentUser,
supportsBookmarkFolders: this.bookmarkFolders,
supportsBubbleTimeline: this.bubbleTimeline
}
supportsBubbleTimeline: this.bubbleTimeline,
},
)
}
},
},
methods: {
openMenu () {
openMenu() {
// $nextTick is too fast, animation won't play back but
// instead starts in fully open position. Low values
// like 1-5 work on fast machines but not on mobile, 25
@ -87,7 +89,7 @@ const TimelineMenu = {
this.isOpen = true
}, 25)
},
blockOpen (event) {
blockOpen(event) {
// For the blank area inside the button element.
// Just setting @click.stop="" makes unintuitive behavior when
// menu is open and clicking on the blank area doesn't close it.
@ -95,7 +97,7 @@ const TimelineMenu = {
event.stopPropagation()
}
},
timelineName () {
timelineName() {
const route = this.$route.name
if (route === 'tag-timeline') {
return '#' + this.$route.params.tag
@ -104,12 +106,14 @@ const TimelineMenu = {
return useListsStore().findListTitle(this.$route.params.id)
}
if (route === 'bookmark-folder') {
return useBookmarkFoldersStore().findBookmarkFolderName(this.$route.params.id)
return useBookmarkFoldersStore().findBookmarkFolderName(
this.$route.params.id,
)
}
const i18nkey = timelineNames(this.bookmarkFolders)[this.$route.name]
return i18nkey ? this.$t(i18nkey) : route
}
}
},
},
}
export default TimelineMenu