Ver código fonte

Added shift+click to confirm song deletion in edit playlist

Kristian Vos 3 anos atrás
pai
commit
73e5f5b9b7

+ 1 - 2
frontend/src/components/Confirm.vue

@@ -5,9 +5,8 @@
 		theme="confirm"
 		ref="confirm"
 		trigger="click"
-		@click.shift="confirm()"
 	>
-		<template #trigger @click.shift="confirm()">
+		<template #trigger>
 			<slot />
 		</template>
 		<a @click.prevent="confirm()"> Confirm </a>

+ 6 - 1
frontend/src/components/modals/EditPlaylist.vue

@@ -241,7 +241,7 @@
 							>
 								<li
 									v-for="(song, index) in playlist.songs"
-									:key="'key-' + index"
+									:key="'key-' + song._id"
 								>
 									<song-item
 										:song="song"
@@ -281,6 +281,11 @@
 												<i
 													class="material-icons delete-icon"
 													content="Remove Song from Playlist"
+													@click.shift="
+														removeSongFromPlaylist(
+															song.songId
+														)
+													"
 													v-tippy
 													>delete_forever</i
 												>