remove unnecessary logic

This commit is contained in:
bytedream 2023-11-30 00:15:06 +01:00
parent 5aa429d7eb
commit 3f6913ef5f
4 changed files with 0 additions and 22 deletions

13
package-lock.json generated
View File

@ -35,7 +35,6 @@
"svelte": "^4.2.7", "svelte": "^4.2.7",
"svelte-check": "^3.6.2", "svelte-check": "^3.6.2",
"svelte-heros-v2": "^0.10.12", "svelte-heros-v2": "^0.10.12",
"svelte-local-storage-store": "^0.6.4",
"svelte-multicssclass": "^2.1.1", "svelte-multicssclass": "^2.1.1",
"svelte-preprocess": "^5.1.1", "svelte-preprocess": "^5.1.1",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",
@ -4938,18 +4937,6 @@
"svelte": "^3.19.0 || ^4.0.0" "svelte": "^3.19.0 || ^4.0.0"
} }
}, },
"node_modules/svelte-local-storage-store": {
"version": "0.6.4",
"resolved": "https://registry.npmjs.org/svelte-local-storage-store/-/svelte-local-storage-store-0.6.4.tgz",
"integrity": "sha512-45WoY2vSGPQM1sIQJ9jTkPPj20hYeqm+af6mUGRFSPP5WglZf36YYoZqwmZZ8Dt/2SU8lem+BTA8/Z/8TkqNLg==",
"dev": true,
"engines": {
"node": ">=0.14"
},
"peerDependencies": {
"svelte": "^3.48.0 || >4.0.0"
}
},
"node_modules/svelte-multicssclass": { "node_modules/svelte-multicssclass": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/svelte-multicssclass/-/svelte-multicssclass-2.1.1.tgz", "resolved": "https://registry.npmjs.org/svelte-multicssclass/-/svelte-multicssclass-2.1.1.tgz",

View File

@ -32,7 +32,6 @@
"svelte": "^4.2.7", "svelte": "^4.2.7",
"svelte-check": "^3.6.2", "svelte-check": "^3.6.2",
"svelte-heros-v2": "^0.10.12", "svelte-heros-v2": "^0.10.12",
"svelte-local-storage-store": "^0.6.4",
"svelte-multicssclass": "^2.1.1", "svelte-multicssclass": "^2.1.1",
"svelte-preprocess": "^5.1.1", "svelte-preprocess": "^5.1.1",
"tailwindcss": "^3.3.5", "tailwindcss": "^3.3.5",

View File

@ -1,9 +1,6 @@
import { persisted } from 'svelte-local-storage-store';
import type { Writable } from 'svelte/store'; import type { Writable } from 'svelte/store';
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
export const playAudio: Writable<boolean> = persisted('playAudio', false);
export const errorMessage: Writable<string | null> = (() => { export const errorMessage: Writable<string | null> = (() => {
const store: Writable<string | null> = writable(null); const store: Writable<string | null> = writable(null);
return { return {

View File

@ -2,7 +2,6 @@
import '../app.css'; import '../app.css';
import { env } from '$env/dynamic/public'; import { env } from '$env/dynamic/public';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { playAudio } from '$lib/stores';
import { page } from '$app/stores'; import { page } from '$app/stores';
let navPaths = [ let navPaths = [
@ -93,10 +92,6 @@
let activePath = navPaths.find((path) => path.active); let activePath = navPaths.find((path) => path.active);
if (activePath !== undefined) { if (activePath !== undefined) {
goto(activePath.href); goto(activePath.href);
} else if ($playAudio) {
new Audio(
`${env.PUBLIC_BASE_PATH}/aud/chest-${showMenuPermanent ? 'close' : 'open'}.mp3`
).play();
} }
showMenuPermanent = !showMenuPermanent; showMenuPermanent = !showMenuPermanent;
} }