feat: add utility function to format URLs and create new CSS file for styling
This commit is contained in:
@@ -74,6 +74,7 @@ import { usePlayerStore } from '../stores/playerStore.js'
|
||||
import { useQueueStore } from '../stores/queueStore.js'
|
||||
import { useAuthStore } from '../stores/authStore.js'
|
||||
import api from '../lib/api.js'
|
||||
import { formatUrl } from '../lib/utils.js'
|
||||
|
||||
const playerStore = usePlayerStore()
|
||||
const queueStore = useQueueStore()
|
||||
@@ -84,11 +85,6 @@ const allTracks = ref([])
|
||||
const loading = ref(true)
|
||||
const allLoading = ref(true)
|
||||
|
||||
function formatUrl(url) {
|
||||
if (!url) return ''
|
||||
return url.startsWith('http') ? url : `http://localhost:3001${url}`
|
||||
}
|
||||
|
||||
function isCurrentTrack(track) {
|
||||
return playerStore.currentTrack?._id === track._id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user