feat: cube transparency toggle
All checks were successful
Deploy to Production / deploy (push) Successful in 6s

This commit is contained in:
2026-02-22 20:48:29 +00:00
parent a75c148a5b
commit 4aea776207
3 changed files with 34 additions and 4 deletions

View File

@@ -10,6 +10,16 @@ try {
const showProjections = ref(initialShowProjections);
let initialCubeTranslucent = false;
try {
const stored = localStorage.getItem('cubeTranslucent');
if (stored !== null) {
initialCubeTranslucent = stored === 'true';
}
} catch (e) {}
const isCubeTranslucent = ref(initialCubeTranslucent);
export function useSettings() {
const toggleProjections = () => {
showProjections.value = !showProjections.value;
@@ -18,8 +28,17 @@ export function useSettings() {
} catch (e) {}
};
const toggleCubeTranslucent = () => {
isCubeTranslucent.value = !isCubeTranslucent.value;
try {
localStorage.setItem('cubeTranslucent', String(isCubeTranslucent.value));
} catch (e) {}
};
return {
showProjections,
toggleProjections
toggleProjections,
isCubeTranslucent,
toggleCubeTranslucent
};
}