Files
front/stores/settingsStore.ts
T
2024-05-24 17:49:08 +02:00

26 lines
593 B
TypeScript

import { defineStore } from "pinia";
enum CardStyles {
HERON = "heron",
ORIGINAL = "original"
}
export const useSettingsStore = defineStore("settingstore", {
state: () => ({
cardStyle: CardStyles.HERON,
shaderQuality: 3,
shaderFramerate: 0,
shaderPixelated: true
}),
actions: {
switchCardStyles() {
if (this.cardStyle === CardStyles.HERON) {
this.cardStyle = CardStyles.ORIGINAL
} else {
this.cardStyle = CardStyles.HERON
}
}
},
persist: true
});