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 @@
Show Category
diff --git a/src/components/summary.vue b/src/components/summary.vue
index 87842a0..409f6e3 100644
--- a/src/components/summary.vue
+++ b/src/components/summary.vue
@@ -1,8 +1,7 @@