mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
remove remaining traces of hard coded Routes enum
+ fix play from album card
This commit is contained in:
committed by
Mungai Njoroge
parent
7f344b51db
commit
fd863d188c
@@ -2,7 +2,11 @@
|
|||||||
<div class="artist-albums">
|
<div class="artist-albums">
|
||||||
<h3>
|
<h3>
|
||||||
<span>{{ title }} </span>
|
<span>{{ title }} </span>
|
||||||
<span class="see-more" v-if="maxAbumCards <= albums.length">SEE ALL</span>
|
<span class="see-more" v-if="maxAbumCards <= albums.length">
|
||||||
|
<RouterLink :to="{ name: Routes.artistDiscography }"
|
||||||
|
>SEE ALL</RouterLink
|
||||||
|
>
|
||||||
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
<div class="cards">
|
<div class="cards">
|
||||||
<AlbumCard v-for="a in albums.slice(0, maxAbumCards)" :album="a" />
|
<AlbumCard v-for="a in albums.slice(0, maxAbumCards)" :album="a" />
|
||||||
@@ -15,6 +19,7 @@ import AlbumCard from "../shared/AlbumCard.vue";
|
|||||||
import { Album } from "@/interfaces";
|
import { Album } from "@/interfaces";
|
||||||
|
|
||||||
import { maxAbumCards } from "@/stores/content-width";
|
import { maxAbumCards } from "@/stores/content-width";
|
||||||
|
import { Routes } from "@/router/routes";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
title: string;
|
title: string;
|
||||||
@@ -35,6 +40,11 @@ defineProps<{
|
|||||||
|
|
||||||
.see-more {
|
.see-more {
|
||||||
font-size: $medium;
|
font-size: $medium;
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,10 @@ import { useRoute } from "vue-router";
|
|||||||
|
|
||||||
import Input from "@/components/shared/NavSearchInput.vue";
|
import Input from "@/components/shared/NavSearchInput.vue";
|
||||||
import PlayBtn from "@/components/shared/PlayBtn.vue";
|
import PlayBtn from "@/components/shared/PlayBtn.vue";
|
||||||
import { playSources, Routes } from "@/composables/enums";
|
import { playSources } from "@/composables/enums";
|
||||||
import useAlbumStore from "@/stores/pages/album";
|
import useAlbumStore from "@/stores/pages/album";
|
||||||
import usePStore from "@/stores/pages/playlist";
|
import usePStore from "@/stores/pages/playlist";
|
||||||
|
import { Routes } from "@/router/routes";
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
header_shown: boolean;
|
header_shown: boolean;
|
||||||
|
|||||||
@@ -17,8 +17,9 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import QueueActions from "@/components/RightSideBar/Queue/QueueActions.vue";
|
import QueueActions from "@/components/RightSideBar/Queue/QueueActions.vue";
|
||||||
import { FromOptions, Routes } from "@/composables/enums";
|
import { FromOptions } from "@/composables/enums";
|
||||||
import useQueueStore from "@/stores/queue";
|
import useQueueStore from "@/stores/queue";
|
||||||
|
import {Routes} from "@/router/routes";
|
||||||
|
|
||||||
import AlbumSvg from "@/assets/icons/album.svg";
|
import AlbumSvg from "@/assets/icons/album.svg";
|
||||||
import FolderSvg from "@/assets/icons/folder.svg";
|
import FolderSvg from "@/assets/icons/folder.svg";
|
||||||
|
|||||||
@@ -44,8 +44,9 @@ import { paths } from "../../config";
|
|||||||
import { Album } from "../../interfaces";
|
import { Album } from "../../interfaces";
|
||||||
import PlayBtn from "./PlayBtn.vue";
|
import PlayBtn from "./PlayBtn.vue";
|
||||||
|
|
||||||
import { playSources, Routes } from "@/composables/enums";
|
import { playSources } from "@/composables/enums";
|
||||||
import useAlbumStore from "@/stores/pages/album";
|
import useAlbumStore from "@/stores/pages/album";
|
||||||
|
import { Routes } from "@/router/routes";
|
||||||
|
|
||||||
const imguri = paths.images.thumb.large;
|
const imguri = paths.images.thumb.large;
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import { Routes } from "@/router/routes";
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
artists: Artist[] | null;
|
artists: Artist[] | null;
|
||||||
albumartists: string | null;
|
albumartists: Artist[] | null;
|
||||||
small?: boolean;
|
small?: boolean;
|
||||||
smaller?: boolean;
|
smaller?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|||||||
@@ -30,20 +30,6 @@ export enum ContextSrc {
|
|||||||
FHeader = "FHeader",
|
FHeader = "FHeader",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Routes {
|
|
||||||
home = "Home",
|
|
||||||
folder = "FolderView",
|
|
||||||
playlists = "PlaylistList",
|
|
||||||
playlist = "PlaylistView",
|
|
||||||
albums = "AlbumsView",
|
|
||||||
artist = "ArtistView",
|
|
||||||
album = "AlbumView",
|
|
||||||
artists = "ArtistsView",
|
|
||||||
settings = "SettingsView",
|
|
||||||
search = "SearchView",
|
|
||||||
queue = "QueueView",
|
|
||||||
}
|
|
||||||
|
|
||||||
export const FuseTrackOptions = {
|
export const FuseTrackOptions = {
|
||||||
keys: [
|
keys: [
|
||||||
{ name: "title", weight: 1 },
|
{ name: "title", weight: 1 },
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ const getAlbumsFromArtist = async (
|
|||||||
|
|
||||||
async function getAlbumTracks(albumhash: string): Promise<Track[]> {
|
async function getAlbumTracks(albumhash: string): Promise<Track[]> {
|
||||||
const { data } = await useAxios({
|
const { data } = await useAxios({
|
||||||
url: albumUrl + `/${albumhash}a/` + "tracks",
|
url: albumUrl + `/${albumhash}/` + "tracks",
|
||||||
get: true,
|
get: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ onMounted(() => {
|
|||||||
// artist.getArtistAlbums(route.params.hash);
|
// artist.getArtistAlbums(route.params.hash);
|
||||||
getArtistAlbums(route.params.hash as string).then((res) => {
|
getArtistAlbums(route.params.hash as string).then((res) => {
|
||||||
albums.value = res.appearances;
|
albums.value = res.appearances;
|
||||||
console.log(albums.value);
|
// console.log(albums.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user