Chore: cleanup settings view
release-tag / release-image (push) Successful in 35s

This commit is contained in:
2024-05-19 22:25:17 +02:00
parent 221935faae
commit 125bb0e894
2 changed files with 47 additions and 21 deletions
+14 -4
View File
@@ -1,14 +1,24 @@
import { defineStore } from "pinia";
const CARDS_COOKIE_NAME = 'cards_type';
const CARDS_DEFAULT_VALUE = 'heron';
enum CardStyles {
HERON = "heron",
ORIGINAL = "original"
}
export const useSettingsStore = defineStore("settingstore", {
state: () => ({
cardStyle: "heron",
cardStyle: CardStyles.HERON,
shaderQuality: 0,
shaderFramerate: 10,
}),
actions: {
switchCardStyles() {
if (this.cardStyle === CardStyles.HERON) {
this.cardStyle = CardStyles.ORIGINAL
} else {
this.cardStyle = CardStyles.HERON
}
}
},
persist: true
});