From c7e780f716ad4c0f94ead3fa7dfd3a58914c2544 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Thu, 30 Jan 2025 17:25:12 -0500 Subject: [PATCH] moving instruments/categories to global state --- src/App.vue | 17 +++++++---------- src/components/category_chooser.vue | 16 ++++++++++------ src/components/show_category.vue | 11 +++++------ src/components/summary.vue | 12 ++++++++---- src/components/timer.vue | 6 +----- src/libs/state.js | 2 ++ 6 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/App.vue b/src/App.vue index 39b546b..d2712a4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,15 +7,18 @@ import Timer from './components/timer.vue' import Status from './components/status.vue' - import { currentWorkingCategory, currentWorkingInstrument } from './libs/state.js' + import { + currentWorkingCategory, + currentWorkingInstrument, + instruments, + categories + } from './libs/state.js' const timerRunning = ref(false) const micThresholdExceeded = ref(false) const summaryRef = ref(null) const statusRef = ref(null) const showCategoryRef = ref(null) - const instruments = ref([]) - const categories = ref([]) const refreshPage = (session) => { summaryRef.value.loadData() @@ -64,18 +67,12 @@ />
- +
diff --git a/src/components/category_chooser.vue b/src/components/category_chooser.vue index 871955b..345e6c7 100644 --- a/src/components/category_chooser.vue +++ b/src/components/category_chooser.vue @@ -1,23 +1,27 @@