Browse Source

fix: setJob undefined and eslint fixes

Owen Diffey 1 year ago
parent
commit
9b214dbd77

+ 0 - 2
frontend/src/components/modals/ImportAlbum.vue

@@ -111,7 +111,6 @@ const init = () => {
 
 const startEditingSongs = () => {
 	songsToEdit.value = [];
-	console.log(100, trackSongs.value);
 	trackSongs.value.forEach((songs, index) => {
 		songs.forEach(song => {
 			const album = JSON.parse(JSON.stringify(discogsAlbum.value));
@@ -140,7 +139,6 @@ const startEditingSongs = () => {
 			}
 
 			songsToEdit.value.push(songToEdit);
-			console.log(111, songsToEdit.value, songToEdit);
 		});
 	});
 

+ 3 - 3
frontend/src/pages/Admin/Songs/index.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { ref, computed, onMounted } from "vue";
+import { ref, onMounted } from "vue";
 import { useStore } from "vuex";
 import { useRoute } from "vue-router";
 
@@ -11,6 +11,8 @@ import RunJobDropdown from "@/components/RunJobDropdown.vue";
 const store = useStore();
 const route = useRoute();
 
+const setJob = payload => store.dispatch("longJobs/setJob", payload);
+
 const { socket } = store.state.websockets;
 
 const columnDefault = ref({
@@ -288,8 +290,6 @@ const jobs = ref([
 	}
 ]);
 
-const song = computed(() => store.state.modals.editSong.song);
-
 const openModal = payload =>
 	store.dispatch("modalVisibility/openModal", payload);
 

+ 2 - 0
frontend/src/pages/Admin/YouTube/Videos.vue

@@ -9,6 +9,8 @@ import RunJobDropdown from "@/components/RunJobDropdown.vue";
 
 const store = useStore();
 
+const setJob = payload => store.dispatch("longJobs/setJob", payload);
+
 const { socket } = store.state.websockets;
 
 const columnDefault = ref({

+ 7 - 7
frontend/src/pages/Admin/index.vue

@@ -27,6 +27,13 @@ const childrenActive = computed(() => store.state.admin.childrenActive);
 const toggleChildren = payload =>
 	store.dispatch("admin/toggleChildren", payload);
 
+const getTabFromPath = (path?) => {
+	const localPath = path || route.path;
+	return localPath.substr(0, 7) === "/admin/"
+		? localPath.substr(7, localPath.length)
+		: null;
+};
+
 const onRouteChange = () => {
 	if (currentTab.value.startsWith("songs")) {
 		toggleChildren({ child: "songs", force: false });
@@ -63,13 +70,6 @@ const toggleSidebar = () => {
 	localStorage.setItem("admin-sidebar-active", sidebarActive.value);
 };
 
-const getTabFromPath = path => {
-	const localPath = path || route.path;
-	return localPath.substr(0, 7) === "/admin/"
-		? localPath.substr(7, localPath.length)
-		: null;
-};
-
 const calculateSidebarPadding = () => {
 	const scrollTop =
 		document.documentElement.scrollTop || document.scrollTop || 0;

+ 1 - 1
frontend/src/types/global.d.ts

@@ -4,4 +4,4 @@ declare global {
 	var YT: any;
 }
 
-export { };
+export {};