From 41f8fcf2cd534238ed0c432b780433f6ef14ebb4 Mon Sep 17 00:00:00 2001 From: Steven Bontenbal Date: Sun, 21 Jan 2024 15:40:05 +0100 Subject: [PATCH] Fix build issues --- frontend/package.json | 1 + frontend/src/components/SetlistDetail.vue | 10 ++++---- frontend/src/components/Song.vue | 26 ++++++++++----------- frontend/src/views/Profile.vue | 10 ++++---- frontend/src/views/Setlist.vue | 2 +- frontend/{vite.config.js => vite.config.ts} | 0 6 files changed, 25 insertions(+), 24 deletions(-) rename frontend/{vite.config.js => vite.config.ts} (100%) diff --git a/frontend/package.json b/frontend/package.json index d5695fa..edeaf8e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -2,6 +2,7 @@ "name": "client", "version": "0.1.0", "private": true, + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/frontend/src/components/SetlistDetail.vue b/frontend/src/components/SetlistDetail.vue index 522bf48..d433bd4 100644 --- a/frontend/src/components/SetlistDetail.vue +++ b/frontend/src/components/SetlistDetail.vue @@ -3,26 +3,26 @@

{{ setlist?.name }}

-
+
- +
-
+
- +
@@ -68,7 +68,7 @@

-
{{ setlist?.date }}
+
{{ setlist.date }}
diff --git a/frontend/src/components/Song.vue b/frontend/src/components/Song.vue index 62c0f30..b285c79 100644 --- a/frontend/src/components/Song.vue +++ b/frontend/src/components/Song.vue @@ -25,7 +25,7 @@
- @@ -42,7 +42,7 @@
- {{ song?.composer }} @@ -59,8 +59,7 @@
- {{ song?.songbook?.title }} @@ -78,7 +77,7 @@ static: !editing, }">
- @@ -93,14 +92,14 @@
-
+
-
@@ -189,8 +188,8 @@
-
- +
@@ -314,12 +313,11 @@ onMounted(() => { const songId = Number(route.params.id); const songLoaded = songStore.get(songId) .then((value) => { - if (!value.songbook) { - value.songbook = {}; + if (value) { + song.value = value; + const content = value.text; + editor.value!.commands.setContent(content) } - song.value = value; - const content = value.text; - editor.value!.commands.setContent(content) }); scoreStore.fetchForSong(songId).then((value) => scores.value = value); const songCategoriesLoaded = categoryStore.getForSong(songId); diff --git a/frontend/src/views/Profile.vue b/frontend/src/views/Profile.vue index b719b3a..ca28aa2 100644 --- a/frontend/src/views/Profile.vue +++ b/frontend/src/views/Profile.vue @@ -14,14 +14,14 @@
- +
- + @@ -70,9 +70,11 @@ onMounted(() => { const save = () => { saving.value = true; user.value = draftValues.value; - userStore.save(draftValues.value) - .finally(() => saving.value = false); + if (draftValues.value) + userStore.save(draftValues.value) + .finally(() => saving.value = false); } +