diff --git a/helpers/settingsCookies.ts b/helpers/settingsCookies.ts deleted file mode 100644 index 85eb841..0000000 --- a/helpers/settingsCookies.ts +++ /dev/null @@ -1,10 +0,0 @@ -const CARDS_COOKIE_NAME = 'cards_type'; -const CARDS_DEFAULT_VALUE = 'heron'; - -export function getCardsType(): CookieRef { - const cookie = useCookie(CARDS_COOKIE_NAME) - if (!cookie.value) { - cookie.value = CARDS_DEFAULT_VALUE; - } - return cookie; -} \ No newline at end of file diff --git a/stores/settingsStore.ts b/stores/settingsStore.ts index aa9353f..876f28f 100644 --- a/stores/settingsStore.ts +++ b/stores/settingsStore.ts @@ -3,24 +3,12 @@ import { defineStore } from "pinia"; const CARDS_COOKIE_NAME = 'cards_type'; const CARDS_DEFAULT_VALUE = 'heron'; -export function getCardsType(): ReturnType{ - const cookie = useCookie(CARDS_COOKIE_NAME) - if (!cookie.value) { - cookie.value = CARDS_DEFAULT_VALUE; - } - return cookie; -} export const useSettingsStore = defineStore("settingstore", { state: () => ({ - cardStyle: "heron" as string, + cardStyle: "heron", + shaderQuality: 6, + shaderFramerate: 60, }), - - actions: { - changeCardStyle(style: string) { - this.cardStyle = style; - getCardsType().value = style; - } - }, persist: true });