fix: prod build

This commit is contained in:
Phan An 2022-05-13 13:46:03 +02:00
parent 7ddd0f9c09
commit d616e00265
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC
3 changed files with 8 additions and 10 deletions

View file

@ -2,10 +2,10 @@
<div class="middle-pane" data-testid="footer-middle-pane">
<div id="progressPane" class="progress">
<template v-if="song">
<h3 class="title">{{ song.title }}</h3>
<h3 class="title">{{ song?.title }}</h3>
<p class="meta">
<a :href="`/#!/artist/${song.artist.id}`" class="artist">{{ song.artist.name }}</a>
<a :href="`/#!/album/${song.album.id}`" class="album">{{ song.album.name }}</a>
<a :href="`/#!/artist/${song?.artist.id}`" class="artist">{{ song?.artist.name }}</a>
<a :href="`/#!/album/${song?.album.id}`" class="album">{{ song?.album.name }}</a>
</p>
</template>

View file

@ -5,13 +5,17 @@
@dblclick.prevent="makeEditable"
>
<a
v-koel-droppable:[contentEditable]="handleDrop"
v-if="contentEditable"
v-koel-droppable="handleDrop"
:class="{ active }"
:href="url"
@contextmenu.prevent="openContextMenu"
>
{{ playlist.name }}
</a>
<a v-else :class="{ active }" :href="url" @contextmenu.prevent="openContextMenu">
{{ playlist.name }}
</a>
<NameEditor
v-if="nameEditable && editing"

View file

@ -3,12 +3,6 @@ import { $ } from '@/utils'
export const droppable: Directive = {
created: (el: HTMLElement, binding) => {
const acceptsDrops = binding.arg === undefined || Boolean(binding.arg)
if (!acceptsDrops) {
return
}
el.addEventListener('dragenter', (event: DragEvent) => {
event.preventDefault()
$.addClass(el, 'droppable')