Update CI and cube projections
Some checks failed
Deploy to Production / deploy (push) Failing after 5s
Some checks failed
Deploy to Production / deploy (push) Failing after 5s
This commit is contained in:
25
src/composables/useSettings.js
Normal file
25
src/composables/useSettings.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ref } from 'vue';
|
||||
|
||||
let initialShowProjections = false;
|
||||
try {
|
||||
const stored = localStorage.getItem('showProjections');
|
||||
if (stored !== null) {
|
||||
initialShowProjections = stored === 'true';
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
const showProjections = ref(initialShowProjections);
|
||||
|
||||
export function useSettings() {
|
||||
const toggleProjections = () => {
|
||||
showProjections.value = !showProjections.value;
|
||||
try {
|
||||
localStorage.setItem('showProjections', String(showProjections.value));
|
||||
} catch (e) {}
|
||||
};
|
||||
|
||||
return {
|
||||
showProjections,
|
||||
toggleProjections
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user