mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
rewrite playlist page to use same layout as the album page
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
<template>
|
||||
<div class="playlist-view">
|
||||
<Header :info="playlist.info" />
|
||||
<div class="separator no-border"></div>
|
||||
|
||||
<div class="songlist rounded">
|
||||
<div v-if="playlist.tracks.length">
|
||||
<SongList
|
||||
:tracks="playlist.tracks"
|
||||
:pname="playlist.info.name"
|
||||
:playlistid="playlist.info.playlistid"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="playlist.tracks.length === 0 && playlist.info.count > 0">
|
||||
<div class="no-results">
|
||||
<div class="text">We can't find your music 🦋</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="playlist.tracks.length === 0 && playlist.info.count == 0">
|
||||
<div class="no-results">
|
||||
<div class="text">Nothing here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="separator no-border"></div>
|
||||
<FeaturedArtists />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Header from "@/components/PlaylistView/Header.vue";
|
||||
import SongList from "@/components/FolderView/SongList.vue";
|
||||
import FeaturedArtists from "@/components/PlaylistView/FeaturedArtists.vue";
|
||||
import usePTrackStore from "@/stores/pages/playlist";
|
||||
|
||||
const playlist = usePTrackStore();
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.playlist-view {
|
||||
height: 100%;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.songlist {
|
||||
min-height: calc(100% - 32rem);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<Header :album="album" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
@@ -151,6 +151,7 @@ function toggleBottom() {
|
||||
overflow: auto;
|
||||
display: grid;
|
||||
grid-template-rows: 18rem 1fr;
|
||||
gap: 1rem;
|
||||
|
||||
.ap-page-content {
|
||||
padding-bottom: 17rem;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div class="songlist rounded">
|
||||
<div v-if="tracks.length">
|
||||
<SongList :tracks="tracks" :pname="name" :playlistid="playlistid" />
|
||||
</div>
|
||||
<div v-else-if="tracks.length === 0 && count > 0">
|
||||
<div class="no-results">
|
||||
<div class="text">We can't find your music 🦋</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="tracks.length === 0 && count == 0">
|
||||
<div class="no-results">
|
||||
<div class="text">Nothing here</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import SongList from "@/components/FolderView/SongList.vue";
|
||||
import { Track } from "@/interfaces";
|
||||
|
||||
defineProps<{
|
||||
tracks: Track[];
|
||||
count: number;
|
||||
name: string;
|
||||
playlistid: string;
|
||||
}>();
|
||||
</script>
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<Page>
|
||||
<template #header>
|
||||
<Header :info="playlist.info" />
|
||||
</template>
|
||||
<template #content>
|
||||
<Content
|
||||
:tracks="playlist.tracks"
|
||||
:count="playlist.info.count"
|
||||
:name="playlist.info.name"
|
||||
:playlistid="playlist.info.playlistid"
|
||||
/>
|
||||
</template>
|
||||
<template #bottom>
|
||||
<FeaturedArtists :artists="[]" />
|
||||
</template>
|
||||
</Page>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Page from "../layouts/HeaderContentBottom.vue";
|
||||
|
||||
import Header from "@/components/PlaylistView/Header.vue";
|
||||
import Content from "./Content.vue";
|
||||
import FeaturedArtists from "@/components/PlaylistView/FeaturedArtists.vue";
|
||||
|
||||
import usePTrackStore from "@/stores/pages/playlist";
|
||||
|
||||
const playlist = usePTrackStore();
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
||||
Reference in New Issue
Block a user