This commit is contained in:
+14
-4
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user