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); } +