fix(style): track row
This commit is contained in:
parent
08fae09a6d
commit
7e268a748d
|
@ -15,6 +15,7 @@ import PlayButton from '~/components/audio/PlayButton.vue'
|
||||||
|
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
|
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
|
||||||
interface Props extends PlayOptionsProps {
|
interface Props extends PlayOptionsProps {
|
||||||
|
@ -66,15 +67,15 @@ const hover = ref(false)
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
:class="[{ active }, 'track-row row', $style.row]"
|
:class="[{ active }, 'track-row row', $style.row]"
|
||||||
style="display: contents;"
|
|
||||||
@dblclick="activateTrack(track, index)"
|
@dblclick="activateTrack(track, index)"
|
||||||
@mousemove="hover = true"
|
@mousemove="hover = true"
|
||||||
@mouseout="hover = false"
|
@mouseout="hover = false"
|
||||||
|
style="display: contents;"
|
||||||
>
|
>
|
||||||
<!-- 1. column: Play button or track position -->
|
<!-- 1. column: Play button or track position -->
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="one wide column"
|
class="actions one wide left floated column"
|
||||||
role="button"
|
role="button"
|
||||||
@click.prevent.exact="activateTrack(track, index)"
|
@click.prevent.exact="activateTrack(track, index)"
|
||||||
>
|
>
|
||||||
|
@ -92,8 +93,8 @@ const hover = ref(false)
|
||||||
active &&
|
active &&
|
||||||
!hover
|
!hover
|
||||||
"
|
"
|
||||||
:icon="isPlaying && active && hover ? 'bi-play-fill' : 'bi-pause-fill'"
|
ghost
|
||||||
:class="[{ paused: isPlaying && active && hover }, 'ui', 'play-button']"
|
icon="bi-play-fill"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
v-else-if="
|
v-else-if="
|
||||||
|
@ -101,13 +102,13 @@ const hover = ref(false)
|
||||||
active &&
|
active &&
|
||||||
hover
|
hover
|
||||||
"
|
"
|
||||||
|
ghost
|
||||||
icon="bi-pause-fill"
|
icon="bi-pause-fill"
|
||||||
class="ui play-button"
|
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
v-else-if="hover"
|
v-else-if="hover"
|
||||||
|
ghost
|
||||||
icon="bi-play-fill"
|
icon="bi-play-fill"
|
||||||
class="ui play-button"
|
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
v-else-if="showPosition"
|
v-else-if="showPosition"
|
||||||
|
@ -117,10 +118,8 @@ const hover = ref(false)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 2. column: Cover art or nothing -->
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="image column"
|
class="image left floated column"
|
||||||
role="button"
|
role="button"
|
||||||
@click.prevent.exact="activateTrack(track, index)"
|
@click.prevent.exact="activateTrack(track, index)"
|
||||||
>
|
>
|
||||||
|
@ -144,10 +143,9 @@ const hover = ref(false)
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- third column: title ! -->
|
|
||||||
<div
|
<div
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
class="content ellipsis column"
|
class="content ellipsis column left floated column"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
@click="activateTrack(track, index)"
|
@click="activateTrack(track, index)"
|
||||||
|
@ -156,10 +154,8 @@ const hover = ref(false)
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 4. column: album link -->
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="content ellipsis column"
|
class="content ellipsis left floated column"
|
||||||
>
|
>
|
||||||
<router-link
|
<router-link
|
||||||
v-if="showAlbum"
|
v-if="showAlbum"
|
||||||
|
@ -169,13 +165,12 @@ const hover = ref(false)
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 5. column: artist link -->
|
|
||||||
<div
|
<div
|
||||||
class="content ellipsis column"
|
class="content ellipsis left floated column"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-for="ac in track.artist_credit"
|
|
||||||
v-if="showArtist"
|
v-if="showArtist"
|
||||||
|
v-for="ac in track.artist_credit"
|
||||||
:key="ac.artist.id"
|
:key="ac.artist.id"
|
||||||
>
|
>
|
||||||
<router-link
|
<router-link
|
||||||
|
@ -191,9 +186,9 @@ const hover = ref(false)
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 6. column: favorite icon -->
|
|
||||||
<div
|
<div
|
||||||
class="meta column"
|
class="meta right floated column"
|
||||||
>
|
>
|
||||||
<track-favorite-icon
|
<track-favorite-icon
|
||||||
v-if="store.state.auth.authenticated"
|
v-if="store.state.auth.authenticated"
|
||||||
|
@ -202,9 +197,8 @@ const hover = ref(false)
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 7. column: duration -->
|
|
||||||
<div
|
<div
|
||||||
class="meta column"
|
class="meta right floated column"
|
||||||
>
|
>
|
||||||
<human-duration
|
<human-duration
|
||||||
v-if="showDuration && track.uploads[0] && track.uploads[0].duration"
|
v-if="showDuration && track.uploads[0] && track.uploads[0].duration"
|
||||||
|
@ -212,15 +206,16 @@ const hover = ref(false)
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 8. column: play button dropdown menu -->
|
|
||||||
<div
|
<div
|
||||||
v-if="displayActions"
|
v-if="displayActions"
|
||||||
class="meta column"
|
class="meta right floated column"
|
||||||
>
|
>
|
||||||
<PlayButton
|
<PlayButton
|
||||||
:dropdown-only="true"
|
:dropdown-only="true"
|
||||||
:is-playable="track.is_playable"
|
:is-playable="track.is_playable"
|
||||||
:track="track"
|
:track="track"
|
||||||
|
class="ui floating dropdown"
|
||||||
|
ghost
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
.meta.column > time {
|
||||||
|
position: relative;
|
||||||
|
top: 14px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.track-row,
|
.track-row,
|
||||||
|
@ -68,9 +72,6 @@
|
||||||
.track_image {
|
.track_image {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
.image.left.floated.column {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.track-row {
|
.track-row {
|
||||||
|
@ -88,6 +89,10 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgba(155, 155, 155, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
margin-right: 0.25em;
|
margin-right: 0.25em;
|
||||||
}
|
}
|
||||||
|
@ -170,15 +175,14 @@
|
||||||
|
|
||||||
.track-position {
|
.track-position {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: contents;
|
display: inline;
|
||||||
min-height: 1em;
|
min-height: 1em;
|
||||||
outline: none;
|
outline: none;
|
||||||
border: none;
|
border: none;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
font-family: var(--font-family);
|
font-family: var(--font-family);
|
||||||
margin: 0 0.25em 0 0;
|
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
padding: 0.5rem;
|
padding: 12px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
.mobile span {
|
.mobile span {
|
||||||
|
|
|
@ -244,7 +244,7 @@ const deletePlaylist = async () => {
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="tracks.length > 0">
|
<template v-else-if="tracks.length > 0">
|
||||||
<track-table
|
<track-table
|
||||||
:display-position="true"
|
:show-position="true"
|
||||||
:tracks="tracks"
|
:tracks="tracks"
|
||||||
:unique="false"
|
:unique="false"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue