From 1efb99d2a00779c5bc25e7fdebab1b54f97fbd69 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 5 Jul 2025 16:22:38 -0400 Subject: [PATCH 1/5] show songs practiced --- src/components/show_category.vue | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/show_category.vue b/src/components/show_category.vue index 788a565..0c597b5 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -31,26 +31,26 @@ - - + + - - - - + - - - - +
id descriptionsecondsdurationsongs comments created atcategory idcategoryinstrument
{{session.id}} {{session.description}} {{formatSeconds(session.seconds)}} +
    +
  • + {{song.title}} +
  • +
+
{{session.comments}}{{session.created_at}}{{session.category_id}}{{session.category}}{{session.instrument}}{{new Date(session.created_at).toLocaleString("en-US")}}
From c628a7ebb5b7db0c30d7317aff0e61e413d99db2 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 5 Jul 2025 16:55:41 -0400 Subject: [PATCH 2/5] link from show category to songs --- src/components/show_category.vue | 4 +++- src/components/songs.vue | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/show_category.vue b/src/components/show_category.vue index 0c597b5..8f18805 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -45,7 +45,9 @@ diff --git a/src/components/songs.vue b/src/components/songs.vue index 66bd7e4..907fb23 100644 --- a/src/components/songs.vue +++ b/src/components/songs.vue @@ -31,7 +31,9 @@ {{song.id}} - {{song.title}} + + {{song.title}} +
From 3bc4f41f4853f71229aa0a3e7fef345e336c71e4 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 5 Jul 2025 18:05:09 -0400 Subject: [PATCH 3/5] send songs in request body, not description --- src/components/songs.vue | 8 ++++---- src/components/timer.vue | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/songs.vue b/src/components/songs.vue index 907fb23..ee19c7e 100644 --- a/src/components/songs.vue +++ b/src/components/songs.vue @@ -11,9 +11,9 @@ const copy = (title) => { navigator.clipboard.writeText(title); } - const paste = (title) => { - if(copiedSongs.value.indexOf(title) === -1){ - copiedSongs.value.push(title) + const paste = (song) => { + if(copiedSongs.value.findIndex(copiedSong=>copiedSong.id === song.id) === -1){ + copiedSongs.value.push(song) } } @@ -36,7 +36,7 @@
- + {{song.notes}} diff --git a/src/components/timer.vue b/src/components/timer.vue index 4b7966f..2314a88 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -40,7 +40,7 @@ } from '../libs/state.js' const removeSong = (song) => { - copiedSongs.value = copiedSongs.value.filter(curr => curr !== song) + copiedSongs.value = copiedSongs.value.filter(curr => curr.id !== song.id) } export default { @@ -71,13 +71,11 @@ const reqBody = { description:description.value, seconds: this.totalSeconds, - practice_category_id: currentWorkingCategory.value.id + practice_category_id: currentWorkingCategory.value.id, } - if(reqBody.description && copiedSongs.value.length > 0){ - reqBody.description += `: ${copiedSongs.value.join(', ')}` - } else if (copiedSongs.value.length > 0){ - reqBody.description = `${copiedSongs.value.join(', ')}` + if(copiedSongs.value.length > 0){ + reqBody.songs = copiedSongs.value } if(this.comments){ @@ -230,8 +228,9 @@ +
    -
  • {{song}}
  • +
  • {{song.title}}
From ba8a12b081d3188de14e9e6c72b3fe9b809ffc2a Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 5 Jul 2025 18:45:47 -0400 Subject: [PATCH 4/5] use song id for links between show category and songs --- src/components/show_category.vue | 2 +- src/components/songs.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/show_category.vue b/src/components/show_category.vue index 8f18805..cbbd08a 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -45,7 +45,7 @@
  • - + {{song.title}}
  • diff --git a/src/components/songs.vue b/src/components/songs.vue index ee19c7e..01b9818 100644 --- a/src/components/songs.vue +++ b/src/components/songs.vue @@ -31,7 +31,7 @@ {{song.id}} - + {{song.title}}
    From 4628d0a686f70649e5d9f42d6d802e0f5d4b8049 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 5 Jul 2025 23:13:18 -0400 Subject: [PATCH 5/5] link colors in dark mode --- public/app.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/app.css b/public/app.css index b6067ef..505288b 100644 --- a/public/app.css +++ b/public/app.css @@ -10,6 +10,11 @@ body { a { color:white; } + + tbody tr:nth-child(even) td, + tbody tr:nth-child(even) td a { + color:black; + } } td,th {