-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/design-tokens
# Conflicts: # components/ContentSection.vue # components/DropdownMenu.vue # components/MediaPlayer.vue # components/sidebar/SidebarItem.vue # pnpm-lock.yaml
- Loading branch information
Showing
19 changed files
with
626 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<script lang="ts" setup> | ||
const props = defineProps<{ | ||
id: number; | ||
active: boolean; | ||
}>(); | ||
const { data: album } = useAlbum({ id: props.id }); | ||
const emit = defineEmits(["expand"]); | ||
function expand() { | ||
emit("expand"); | ||
} | ||
</script> | ||
|
||
<template> | ||
<section | ||
class="group gap-2 relative mr-3 my-4 cursor-pointer" | ||
:class=" | ||
active | ||
? 'p-5 border-2 rounded-3xl active:scale-110 duration-150 shadow-lg' | ||
: '' | ||
" | ||
@click="expand" | ||
> | ||
<div | ||
:class=" | ||
active | ||
? '' | ||
: 'opacity-0 group-hover:opacity-100 absolute -inset-y-2 -inset-x-3 rounded-xl bg-slate-100' | ||
" | ||
></div> | ||
<section | ||
v-if="album" | ||
class="flex gap-2 items-center justify-between relative" | ||
> | ||
<ProtectedImage | ||
v-if="album.cover" | ||
:src="album.cover" | ||
alt="" | ||
class="rounded-md w-20 aspect-square bg-slate-100" | ||
/> | ||
<p class="text-2xl font-bold">{{ album.title }}</p> | ||
<p class="ml-auto">{{ album?.children?.length }} tracks</p> | ||
</section> | ||
<section | ||
:class="active ? 'active max-h-fit relative' : 'h-0 overflow-hidden'" | ||
> | ||
<div v-for="(track, i) in album?.children" :key="i"> | ||
<p class="p-2 hover:bg-slate-100 rounded-md"> | ||
{{ track.id }} | ||
</p> | ||
</div> | ||
</section> | ||
</section> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { AlbumApi, AlbumModel } from "@bcc-code/bmm-sdk-fetch"; | ||
|
||
interface UseAlbumOptions { | ||
id: number; | ||
} | ||
|
||
/** | ||
* Get playlist with the specified id | ||
*/ | ||
export function useAlbum(options: UseAlbumOptions) { | ||
const { id } = options; | ||
|
||
return useAsyncData<AlbumModel>(`album-${id}`, () => | ||
new AlbumApi().albumIdGet({ id }) | ||
); | ||
} | ||
|
||
/** | ||
* Get all albums | ||
*/ | ||
export function useAlbums() { | ||
return useAsyncData<AlbumModel[]>("albums", () => new AlbumApi().albumGet()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.