rebuild search route with custom pages for tracks, album, and artists

This commit is contained in:
geoffrey45
2022-10-01 01:30:14 +03:00
committed by Mungai Njoroge
parent 264406aef4
commit 8e258eaf24
20 changed files with 240 additions and 60 deletions
@@ -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>