mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 13:03:02 +00:00
fix artist and album page is_favorite reactivity
+ remove nav components for playlist and album page
This commit is contained in:
committed by
Mungai Njoroge
parent
905fff04b4
commit
4d08ebedb6
@@ -1,86 +0,0 @@
|
||||
<template>
|
||||
<div
|
||||
class="title grid albumnavtitle"
|
||||
:class="{
|
||||
hide_play: header_shown,
|
||||
}"
|
||||
v-if="album.info.albumhash"
|
||||
>
|
||||
<div class="first grid">
|
||||
<PlayBtn :source="things.source" :store="things.store" />
|
||||
<div class="ellip">
|
||||
{{ things.text }}
|
||||
</div>
|
||||
</div>
|
||||
<Input :page="($route.name as string)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from "@vue/reactivity";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import Input from "@/components/shared/NavSearchInput.vue";
|
||||
import PlayBtn from "@/components/shared/PlayBtn.vue";
|
||||
import { playSources } from "@/composables/enums";
|
||||
import useAlbumStore from "@/stores/pages/album";
|
||||
import usePStore from "@/stores/pages/playlist";
|
||||
import { Routes } from "@/router/routes";
|
||||
|
||||
defineProps<{
|
||||
header_shown: boolean;
|
||||
}>();
|
||||
|
||||
const album = useAlbumStore();
|
||||
const playlist = usePStore();
|
||||
|
||||
const things = computed(() => {
|
||||
const route = useRoute();
|
||||
let thing = {
|
||||
text: "",
|
||||
store: null as any,
|
||||
source: playSources.album,
|
||||
};
|
||||
|
||||
switch (route.name) {
|
||||
case Routes.album:
|
||||
thing = {
|
||||
source: playSources.album,
|
||||
text: useAlbumStore().info.title,
|
||||
store: useAlbumStore,
|
||||
};
|
||||
break;
|
||||
case Routes.playlist:
|
||||
thing = {
|
||||
source: playSources.playlist,
|
||||
text: usePStore().info.name,
|
||||
store: usePStore,
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
return thing;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.albumnavtitle {
|
||||
grid-template-columns: max-content 1fr;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: $small;
|
||||
height: 100%;
|
||||
|
||||
.first {
|
||||
grid-template-columns: max-content 1fr;
|
||||
gap: $small;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.albumnavtitle.hide_play {
|
||||
.first {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user