Bläddra i källkod

fix: Continued attempting to fix edit songs in production and other minor tweaks

Owen Diffey 2 år sedan
förälder
incheckning
800fb6d305

+ 1 - 0
frontend/Dockerfile

@@ -2,6 +2,7 @@ FROM node:16.15 AS musare_frontend
 
 ARG FRONTEND_MODE=prod
 ENV FRONTEND_MODE=${FRONTEND_MODE}
+ENV SUPPRESS_NO_CONFIG_WARNING=1
 
 RUN apt-get update
 RUN apt-get install nginx -y

+ 6 - 2
frontend/src/components/modals/EditSong/index.vue

@@ -231,7 +231,11 @@
 							@loadError="onThumbnailLoadError"
 						/>
 						<img
-							v-if="!isYoutubeThumbnail && !songDeleted"
+							v-if="
+								!isYoutubeThumbnail &&
+								songDataLoaded &&
+								!songDeleted
+							"
 							class="thumbnail-dummy"
 							:src="song.thumbnail"
 							ref="thumbnailElement"
@@ -1873,9 +1877,9 @@ export default {
 				this.song.tags.splice(this.song.tags.indexOf(value), 1);
 		},
 		drawCanvas() {
-			if (!this.songDataLoaded) return;
 			const canvasElement =
 				this.$refs[`durationCanvas-${this.modalUuid}`];
+			if (!this.songDataLoaded || !canvasElement) return;
 			const ctx = canvasElement.getContext("2d");
 
 			const videoDuration = Number(this.youtubeVideoDuration);

+ 1 - 1
frontend/src/pages/Admin/YouTube/Videos.vue

@@ -18,7 +18,7 @@
 			data-action="youtube.getVideos"
 			name="admin-youtube-videos"
 			:max-width="1140"
-			:bulk-actions="{ width: 150 }"
+			:bulk-actions="{ width: 200 }"
 		>
 			<template #column-options="slotProps">
 				<div class="row-options">

+ 1 - 1
frontend/src/store/modules/modals/editSong.js

@@ -59,7 +59,7 @@ export default {
 		},
 		editSong(state, song) {
 			state.newSong = !!song.newSong || !song._id;
-			state.youtubeId = song.newSong ? null : song.youtubeId;
+			state.youtubeId = song.youtubeId || null;
 			state.prefillData = song.prefill ? song.prefill : {};
 		},
 		setSong(state, song) {