diff --git a/.gitpod/gitpod.env b/.gitpod/gitpod.env index cda36d82a..8353ea258 100644 --- a/.gitpod/gitpod.env +++ b/.gitpod/gitpod.env @@ -21,5 +21,6 @@ DEBUG=true # Django Environment Variables DATABASE_URL=postgresql://postgres@localhost:5432/postgres DJANGO_SECRET_KEY=gitpod +THROTTLING_ENABLED=False # Gitpod Environment Variables diff --git a/front/src/api/player.ts b/front/src/api/player.ts index 89e311e28..a043f5fa8 100644 --- a/front/src/api/player.ts +++ b/front/src/api/player.ts @@ -1,9 +1,8 @@ import type { IAudioContext, IAudioNode } from 'standardized-audio-context' +import { createEventHook, refDefault, type EventHookOn, useEventListener } from '@vueuse/core' import { createAudioSource } from '~/composables/audio/audio-api' import { reactive, ref, type Ref } from 'vue' -import { createEventHook, refDefault, type EventHookOn } from '@vueuse/shared' -import { useEventListener } from '@vueuse/core' export interface SoundSource { uuid: string diff --git a/front/src/components/Queue.vue b/front/src/components/Queue.vue index 680034e8a..a6e2c1490 100644 --- a/front/src/components/Queue.vue +++ b/front/src/components/Queue.vue @@ -8,6 +8,9 @@ import { useGettext } from 'vue3-gettext' import { useRouter } from 'vue-router' import { useStore } from '~/store' +import { usePlayer } from '~/composables/audio/player' +import { useQueue } from '~/composables/audio/queue' + import time from '~/utils/time' // import TrackFavoriteIcon from '~/components/favorites/TrackFavoriteIcon.vue' @@ -16,18 +19,18 @@ import PlayerControls from '~/components/audio/PlayerControls.vue' import VirtualList from '~/components/vui/list/VirtualList.vue' import QueueItem from '~/components/QueueItem.vue' -import { +const { isPlaying, currentTime, duration, progress, bufferProgress, seekTo, - loading as isLoadingAudio, + loading: isLoadingAudio, errored -} from '~/composables/audio/player' +} = usePlayer() -import { +const { hasNext, currentTrack, currentIndex, @@ -36,8 +39,8 @@ import { dequeue, playTrack, reorder, - endsIn as timeLeft -} from '~/composables/audio/queue' + endsIn: timeLeft +} = useQueue() const queueModal = ref() const { activate, deactivate } = useFocusTrap(queueModal, { allowOutsideClick: true, preventScroll: true }) @@ -48,6 +51,7 @@ const store = useStore() const labels = computed(() => ({ queue: $pgettext('*/*/*', 'Queue'), + populating: $pgettext('*/*/*', 'Fetching radio track'), duration: $pgettext('*/*/*', 'Duration'), addArtistContentFilter: $pgettext('Sidebar/Player/Icon.Tooltip/Verb', 'Hide content from this artist…'), restart: $pgettext('*/*/*', 'Restart track'), @@ -332,32 +336,41 @@ const reorderTracks = async (from: number, to: number) => { @remove="dequeue" /> - -
-
-

- - You have a radio playing - -

-

- - New tracks will be appended here automatically. - -

- -
-
+ + {{ labels.populating }} + +
+
+

+ + You have a radio playing + +

+

+ + New tracks will be appended here automatically. + +

+ +
+
+ + diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index 927d2a199..f0dce6054 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -1,29 +1,6 @@