mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
rebuild search route with custom pages for tracks, album, and artists
This commit is contained in:
committed by
Mungai Njoroge
parent
264406aef4
commit
8e258eaf24
@@ -1,14 +1,12 @@
|
||||
<template>
|
||||
<div class="artists-results" v-auto-animate>
|
||||
<div
|
||||
v-auto-animate
|
||||
class="search-results-grid"
|
||||
v-if="album_grid == true && search.albums.value.length"
|
||||
>
|
||||
<AlbumCard v-for="a in search.albums.value" :key="a.albumid" :album="a" />
|
||||
</div>
|
||||
<div
|
||||
v-auto-animate
|
||||
class="search-results-grid"
|
||||
v-else-if="!album_grid && search.artists.value.length"
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="tracks-results" class="noscroll">
|
||||
<div v-if="search.tracks.value.length" v-auto-animate>
|
||||
<div v-if="search.tracks.value.length">
|
||||
<TrackComponent
|
||||
v-for="(track, index) in search.tracks.value"
|
||||
:key="track.trackid"
|
||||
@@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { computed, onMounted } from "vue";
|
||||
|
||||
import SongItem from "@/components/shared/SongItem.vue";
|
||||
import TrackItem from "@/components/shared/TrackItem.vue";
|
||||
@@ -51,4 +51,8 @@ let use_song_item: boolean = false;
|
||||
if (props.isOnSearchPage) {
|
||||
use_song_item = true;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
search.switchTab("tracks");
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user