chore(frontend): reduce redundancies

This commit is contained in:
Shivering Ocelot committed 2026-09-21 15:18:22 -05:00
1 parent dac5d201cd
commit 75dac1e459
8 files changed
+65 -97

No files matched your search

+10
View File
@@ -1,5 +1,6 @@
// Global utility functions related with UI functionality
import { ref } from 'vue';
import router from './router'
export function goto (path) {
@@ -33,6 +34,15 @@ export function contextMenu (entries) {
});
}
// Helper object to manage track toggable ui elements
export function useToggleSet () {
const state = ref({});
return {
has(key) { return Boolean(state.value[key]); },
toggle(key) { state.value[key] = !state.value[key]; },
};
}
// === Events === //