Browse Source

fix(EditSong): when picking a different YouTube ID, video player should be reloaded

Signed-off-by: Jonathan Graham <theflametrooper@gmail.com>
Jonathan Graham 3 years ago
parent
commit
21ac336ad2

+ 1 - 2
frontend/src/components/modals/ViewReport.vue

@@ -269,11 +269,10 @@ export default {
 
 	.report-sub-items {
 		.report-sub-item {
-			border: 0.5px solid var(--black);
+			border: 1px solid var(--light-grey-3);
 			margin-top: -1px;
 			line-height: 24px;
 			display: flex;
-			// padding: 4px;
 			padding: 8px;
 			display: flex;
 

+ 2 - 0
frontend/src/store/modules/modals/editSong.js

@@ -37,6 +37,7 @@ export default {
 			commit("resolveReport", reportId),
 		updateYoutubeId: ({ commit }, youtubeId) => {
 			commit("updateYoutubeId", youtubeId);
+			commit("loadVideoById", youtubeId, 0);
 		}
 	},
 	mutations: {
@@ -52,6 +53,7 @@ export default {
 			state.video.player.stopVideo();
 		},
 		loadVideoById(state, id, skipDuration) {
+			state.song.duration = -1;
 			state.video.player.loadVideoById(id, skipDuration);
 		},
 		pauseVideo(state, status) {