diff --git a/src/components/show_category.vue b/src/components/show_category.vue index 0c82001..6dd51dd 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -12,6 +12,9 @@ axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'show-category/'+event.target.value).then((response)=>{ this.categorySessions = response.data; }) + }, + copy(event){ + navigator.clipboard.writeText(event.target.innerHTML); } }, mounted() { @@ -36,21 +39,21 @@ id - description - seconds - comments - created at - category id - category - instrument - + description + seconds + comments + created at + category id + category + instrument + {{session.id}} - {{session.description}} - {{session.seconds}} - {{session.comments}} + {{session.description}} + {{session.seconds}} + {{session.comments}} {{session.created_at}} {{session.category_id}} {{session.category}} diff --git a/src/components/songs.vue b/src/components/songs.vue index 2b8167f..7a38803 100644 --- a/src/components/songs.vue +++ b/src/components/songs.vue @@ -11,7 +11,12 @@ axios.get(import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'songs').then((response)=>{ this.songs = response.data }) - } + }, + methods: { + copy(event){ + navigator.clipboard.writeText(event.target.innerHTML); + } + }, } @@ -28,7 +33,7 @@ {{song.id}} - {{song.title}} + {{song.title}} {{song.notes}}