fix: Fix unhandled errors
This commit is contained in:
parent
18b3a6dcb2
commit
6e740d6fda
|
@ -31,7 +31,7 @@ const equalizerFilters = [
|
||||||
let lastNode: IAudioNode<IAudioContext> | null = null
|
let lastNode: IAudioNode<IAudioContext> | null = null
|
||||||
export const connectAudioSource = (sourceNode: IAudioNode<IAudioContext>) => {
|
export const connectAudioSource = (sourceNode: IAudioNode<IAudioContext>) => {
|
||||||
for (const filter of equalizerFilters) {
|
for (const filter of equalizerFilters) {
|
||||||
if (lastNode !== null) filter.disconnect(lastNode)
|
lastNode?.disconnect(filter)
|
||||||
sourceNode.connect(filter)
|
sourceNode.connect(filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,7 @@ export const useTracks = createGlobalState(() => {
|
||||||
whenever(track, () => {
|
whenever(track, () => {
|
||||||
createTrack(currentIndex.value)
|
createTrack(currentIndex.value)
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
|
|
||||||
syncRef(track, currentTrack, {
|
syncRef(track, currentTrack, {
|
||||||
direction: 'ltr'
|
direction: 'ltr'
|
||||||
})
|
})
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { ContentFilter } from '~/store/moderation'
|
||||||
|
|
||||||
import { useCurrentElement } from '@vueuse/core'
|
import { useCurrentElement } from '@vueuse/core'
|
||||||
import { computed, markRaw, ref } from 'vue'
|
import { computed, markRaw, ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { i18n } from '~/init/locale'
|
||||||
import { useStore } from '~/store'
|
import { useStore } from '~/store'
|
||||||
|
|
||||||
import { usePlayer } from '~/composables/audio/player'
|
import { usePlayer } from '~/composables/audio/player'
|
||||||
|
@ -54,7 +54,7 @@ export default (props: PlayOptionsProps) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = i18n.global
|
||||||
store.commit('ui/addMessage', {
|
store.commit('ui/addMessage', {
|
||||||
content: t('composables.audio.usePlayOptions.addToQueueMessage', tracks.length),
|
content: t('composables.audio.usePlayOptions.addToQueueMessage', tracks.length),
|
||||||
date: new Date()
|
date: new Date()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import type { Album, Artist, Content, Track, Actor } from '~/types'
|
import type { Album, Artist, Content, Track, Actor } from '~/types'
|
||||||
|
|
||||||
import { useI18n } from 'vue-i18n'
|
import { i18n } from '~/init/locale'
|
||||||
|
|
||||||
export interface ConfigField {
|
export interface ConfigField {
|
||||||
id: string
|
id: string
|
||||||
|
@ -24,7 +24,7 @@ const getContentValueRepr = (val: Content) => val.text
|
||||||
|
|
||||||
// TODO: Get params from typescript type somehow?
|
// TODO: Get params from typescript type somehow?
|
||||||
export default (): Configs => {
|
export default (): Configs => {
|
||||||
const { t } = useI18n()
|
const { t } = i18n.global
|
||||||
|
|
||||||
const description: ConfigField = {
|
const description: ConfigField = {
|
||||||
id: 'description',
|
id: 'description',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import type { EntityObjectType } from '~/types'
|
import type { EntityObjectType } from '~/types'
|
||||||
import type { RouteLocationRaw } from 'vue-router'
|
import type { RouteLocationRaw } from 'vue-router'
|
||||||
|
|
||||||
import { useI18n } from 'vue-i18n'
|
import { i18n } from '~/init/locale'
|
||||||
|
|
||||||
interface ModeratedField {
|
interface ModeratedField {
|
||||||
id: string
|
id: string
|
||||||
|
@ -23,7 +23,7 @@ export interface Entity {
|
||||||
type Configs = Record<EntityObjectType, Entity>
|
type Configs = Record<EntityObjectType, Entity>
|
||||||
|
|
||||||
export default (): Configs => {
|
export default (): Configs => {
|
||||||
const { t } = useI18n()
|
const { t } = i18n.global
|
||||||
|
|
||||||
const tags: ModeratedField = {
|
const tags: ModeratedField = {
|
||||||
id: 'tags',
|
id: 'tags',
|
||||||
|
|
Loading…
Reference in New Issue