diff --git a/src/components/show_category.vue b/src/components/show_category.vue index 938a85c..788a565 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -3,6 +3,7 @@ import CategoryChooser from './category_chooser.vue' import { onMounted, ref, watch, defineProps } from 'vue' import { + description, currentWorkingCategory, currentWorkingInstrument } from '../libs/state.js' @@ -10,7 +11,7 @@ const categorySessions = ref([]) const copy = (event) => { - navigator.clipboard.writeText(event.target.innerText) + description.value = event.target.innerText } const loadCategory = async () => { diff --git a/src/components/timer.vue b/src/components/timer.vue index 8b504ba..e277de9 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -23,9 +23,7 @@ import CategoryChooser from './category_chooser.vue' import { getHours, getMinutes, createTimeObj, getAccumulatedSeconds, formatSeconds } from '../libs/time.js' - import { copiedSongs, currentWorkingCategory, currentWorkingInstrument } from '../libs/state.js' - - const description = ref('') + import { copiedSongs, currentWorkingCategory, currentWorkingInstrument, description } from '../libs/state.js' const removeSong = (song) => { copiedSongs.value = copiedSongs.value.filter(curr => curr !== song) diff --git a/src/libs/state.js b/src/libs/state.js index 09a5f85..7a8469a 100644 --- a/src/libs/state.js +++ b/src/libs/state.js @@ -4,3 +4,4 @@ export const currentWorkingCategory = ref(null) export const currentWorkingInstrument = ref(null) export const instruments = ref([]) export const categories = ref([]) +export const description = ref('')