From 7d9f05a7581cff4531ba55d99cb5d37cffe4a7ca Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 25 Jan 2025 22:39:17 -0500 Subject: [PATCH] diff --- src/App.vue | 13 +++++-------- src/components/category_chooser.vue | 3 +-- src/components/show_category.vue | 5 +---- src/components/summary.vue | 3 +-- src/components/timer.vue | 10 +++------- src/libs/state.js | 2 ++ 6 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/App.vue b/src/App.vue index 19a72e5..39b546b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,8 +7,8 @@ import Timer from './components/timer.vue' import Status from './components/status.vue' - const currentWorkingCategory = ref(null) - const currentWorkingInstrument = ref(null) + import { currentWorkingCategory, currentWorkingInstrument } from './libs/state.js' + const timerRunning = ref(false) const micThresholdExceeded = ref(false) const summaryRef = ref(null) @@ -61,16 +61,14 @@ :categories="categories" v-model:timerRunning="timerRunning" v-model:micThresholdExceeded="micThresholdExceeded" - v-model:currentWorkingInstrument="currentWorkingInstrument" - v-model:currentWorkingCategory="currentWorkingCategory"/> + />
+ />
+ />
diff --git a/src/components/category_chooser.vue b/src/components/category_chooser.vue index dc8c4de..871955b 100644 --- a/src/components/category_chooser.vue +++ b/src/components/category_chooser.vue @@ -2,8 +2,7 @@ import { defineProps } from 'vue'; const props = defineProps(['instruments', 'categories']) - const currentWorkingCategory = defineModel('currentWorkingCategory') - const currentWorkingInstrument = defineModel('currentWorkingInstrument') + import { currentWorkingCategory, currentWorkingInstrument } from '../libs/state.js' const selectFirstInstrumentOfCategory = () => { currentWorkingCategory.value = props.categories.find(category => category.instrument === currentWorkingInstrument.value.name) diff --git a/src/components/show_category.vue b/src/components/show_category.vue index e1febfd..b49377b 100644 --- a/src/components/show_category.vue +++ b/src/components/show_category.vue @@ -2,10 +2,9 @@ import { formatSeconds } from '../libs/time.js' import CategoryChooser from './category_chooser.vue' import { onMounted, ref, watch, defineProps } from 'vue' + import { currentWorkingCategory, currentWorkingInstrument } from '../libs/state.js' const props = defineProps(['categories', 'instruments']) - const currentWorkingCategory = defineModel('currentWorkingCategory') - const currentWorkingInstrument = defineModel('currentWorkingInstrument') const categorySessions = ref([]) @@ -27,8 +26,6 @@