Add buttons to the cover art
This commit is contained in:
parent
5eff89920a
commit
8306eaaff6
|
@ -147,6 +147,13 @@ const hideArtist = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum CoverType {
|
||||||
|
COVER_ART,
|
||||||
|
MILK_DROP
|
||||||
|
}
|
||||||
|
|
||||||
|
const coverType = ref(CoverType.COVER_ART)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -165,12 +172,19 @@ const hideArtist = () => {
|
||||||
<template v-if="currentTrack">
|
<template v-if="currentTrack">
|
||||||
<div class="cover-container">
|
<div class="cover-container">
|
||||||
<div class="cover">
|
<div class="cover">
|
||||||
<milk-drop />
|
|
||||||
<img
|
<img
|
||||||
|
v-if="coverType === CoverType.COVER_ART"
|
||||||
ref="cover"
|
ref="cover"
|
||||||
alt=""
|
alt=""
|
||||||
:src="$store.getters['instance/absoluteUrl'](currentTrack.coverUrl)"
|
:src="$store.getters['instance/absoluteUrl'](currentTrack.coverUrl)"
|
||||||
>
|
>
|
||||||
|
<milk-drop v-else-if="coverType === CoverType.MILK_DROP" />
|
||||||
|
|
||||||
|
<div class="cover-buttons">
|
||||||
|
<button class="ui secondary button">
|
||||||
|
<i class="icon ellipsis vertical" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="ui header">
|
<h1 class="ui header">
|
||||||
|
|
|
@ -36,13 +36,16 @@ onScopeDispose(() => {
|
||||||
ref="canvas"
|
ref="canvas"
|
||||||
@click="loadRandomPreset()"
|
@click="loadRandomPreset()"
|
||||||
/>
|
/>
|
||||||
<button
|
|
||||||
v-if="!fullscreen"
|
<Teleport to=".cover > .cover-buttons">
|
||||||
class="ui secondary button"
|
<button
|
||||||
@click="enter"
|
v-if="!fullscreen"
|
||||||
>
|
class="ui secondary button"
|
||||||
<i class="icon expand arrows alternate" />
|
@click="enter"
|
||||||
</button>
|
>
|
||||||
|
<i class="icon expand arrows alternate" />
|
||||||
|
</button>
|
||||||
|
</Teleport>
|
||||||
|
|
||||||
<Transition name="slide-down">
|
<Transition name="slide-down">
|
||||||
<div
|
<div
|
||||||
|
@ -77,27 +80,6 @@ onScopeDispose(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
|
||||||
z-index: 2;
|
|
||||||
position: absolute;
|
|
||||||
right: 1em;
|
|
||||||
bottom: 1em;
|
|
||||||
padding: 0.78571429em;
|
|
||||||
margin-right: 0 !important;
|
|
||||||
|
|
||||||
i.icon {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 0 !important;
|
|
||||||
display: contents;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
width: 1em;
|
|
||||||
height: 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.track-info {
|
.track-info {
|
||||||
|
|
|
@ -307,6 +307,45 @@
|
||||||
canvas {
|
canvas {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover .cover-buttons {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-buttons {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 1em;
|
||||||
|
right: 1em;
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(0.5em);
|
||||||
|
|
||||||
|
button {
|
||||||
|
z-index: 2;
|
||||||
|
padding: 0.78571429em;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.icon {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 0 !important;
|
||||||
|
display: contents;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue