kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fix some glitchtip errors
rodzic
2f2409f9f2
commit
e6bc1ab655
|
@ -2,7 +2,7 @@
|
|||
import type { BackendError } from '~/types'
|
||||
import type { RouteLocationRaw } from 'vue-router'
|
||||
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { ref, reactive, computed, onMounted, nextTick } from 'vue'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
import { useStore } from '~/store'
|
||||
|
||||
|
@ -34,7 +34,10 @@ const labels = computed(() => ({
|
|||
}))
|
||||
|
||||
const username = ref()
|
||||
onMounted(() => username.value.focus())
|
||||
onMounted(async () => {
|
||||
await nextTick()
|
||||
username.value?.focus()
|
||||
})
|
||||
|
||||
const isLoading = ref(false)
|
||||
const errors = ref([] as string[])
|
||||
|
|
|
@ -38,9 +38,9 @@ export default (props: PlayOptionsProps) => {
|
|||
return props.track.uploads?.length > 0
|
||||
} else if (props.artist) {
|
||||
return props.artist.tracks_count > 0
|
||||
|| props.artist?.albums.some((album) => album.is_playable === true)
|
||||
|| props.artist?.albums?.some((album) => album.is_playable === true)
|
||||
} else if (props.tracks) {
|
||||
return props.tracks.some((track) => (track.uploads?.length ?? 0) > 0)
|
||||
return props.tracks?.some((track) => (track.uploads?.length ?? 0) > 0)
|
||||
}
|
||||
|
||||
return false
|
||||
|
|
|
@ -16,7 +16,7 @@ const bodyIsActive = computed(() => activeElement.value === document.body)
|
|||
|
||||
const current = new Set()
|
||||
useEventListener(window, 'keydown', (event) => {
|
||||
if (!bodyIsActive.value) return
|
||||
if (!bodyIsActive.value && !event.key) return
|
||||
current.add(event.key.toLowerCase())
|
||||
|
||||
const currentArray = [...current]
|
||||
|
@ -29,7 +29,9 @@ useEventListener(window, 'keydown', (event) => {
|
|||
})
|
||||
|
||||
useEventListener(window, 'keyup', (event) => {
|
||||
current.delete(event.key.toLowerCase())
|
||||
if (!event.key) {
|
||||
current.delete(event.key.toLowerCase())
|
||||
}
|
||||
})
|
||||
|
||||
export default (key: KeyFilter, handler: () => unknown, prevent = false) => {
|
||||
|
|
Ładowanie…
Reference in New Issue