audopplayer-adapted
This commit is contained in:
parent
180f4eaa72
commit
0c406e904d
|
@ -255,6 +255,7 @@ $vendors-thumb: ('::-webkit-slider-thumb', '::-moz-moz-range-thumb', '::-ms-thum
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
max-width: calc(50% - 16px);
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
|
|
|
@ -34,12 +34,6 @@ export const PlayerPlaylist = (props: Props) => {
|
||||||
const handleMediaItemFieldChange = (field: keyof MediaItem, value: string) => {
|
const handleMediaItemFieldChange = (field: keyof MediaItem, value: string) => {
|
||||||
props.onMediaItemFieldChange(activeEditIndex(), field, value)
|
props.onMediaItemFieldChange(activeEditIndex(), field, value)
|
||||||
}
|
}
|
||||||
const titleStyle = (mi: MediaItem) => {
|
|
||||||
let portion = 0
|
|
||||||
if (mi.artist) portion += 5
|
|
||||||
if (mi.title) portion += 5
|
|
||||||
return { 'max-width': `calc(${portion}0% - 16px)` }
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<ul class={styles.playlist}>
|
<ul class={styles.playlist}>
|
||||||
<For each={props.media}>
|
<For each={props.media}>
|
||||||
|
@ -59,14 +53,8 @@ export const PlayerPlaylist = (props: Props) => {
|
||||||
when={activeEditIndex() === index() && props.editorMode}
|
when={activeEditIndex() === index() && props.editorMode}
|
||||||
fallback={
|
fallback={
|
||||||
<>
|
<>
|
||||||
<div class={styles.title} style={titleStyle(mi)}>
|
<div class={styles.title}>{mi.title || index()}</div>
|
||||||
{mi.title || index()}
|
<div class={styles.artist}>{mi.artist || ''}</div>
|
||||||
</div>
|
|
||||||
<Show when={mi.artist}>
|
|
||||||
<div class={styles.artist} style={titleStyle(mi)}>
|
|
||||||
{mi.artist}
|
|
||||||
</div>
|
|
||||||
</Show>
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user