diff --git a/bun.lockb b/bun.lockb index 6bf0f06..8be0361 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 496e6e7..be7ec56 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,10 @@ "@tauri-apps/plugin-fs": "~2", "@tauri-apps/plugin-shell": "^2", "@tauri-apps/plugin-sql": "^2.2.0", + "ky": "^1.7.3", "lucide-svelte": "^0.468.0", + "osu-classes": "^3.1.0", + "osu-parsers": "^4.1.7", "radix-icons-svelte": "^1.2.1" }, "devDependencies": { diff --git a/src/app.css b/src/app.css index f6371a4..ccf0544 100644 --- a/src/app.css +++ b/src/app.css @@ -2,6 +2,20 @@ @tailwind components; @tailwind utilities; +* { + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; + + -webkit-user-drag: none; + -khtml-user-drag: none; + -moz-user-drag: none; + -o-user-drag: none; + user-drag: none; +} + @layer base { :root { --background: 0 0% 100%; @@ -24,7 +38,7 @@ --destructive-foreground: 210 20% 98%; --ring: 224 71.4% 4.1%; --radius: 0.5rem; - --sidebar-background: 0 0% 98%; + --sidebar-background: 0 0% 98%; --sidebar-foreground: 240 5.3% 26.1%; --sidebar-primary: 240 5.9% 10%; --sidebar-primary-foreground: 0 0% 98%; @@ -54,7 +68,7 @@ --destructive: 0 62.8% 30.6%; --destructive-foreground: 210 20% 98%; --ring: 216 12.2% 83.9%; - --sidebar-background: 240 5.9% 10%; + --sidebar-background: 240 5.9% 10%; --sidebar-foreground: 240 4.8% 95.9%; --sidebar-primary: 224.3 76.3% 48%; --sidebar-primary-foreground: 0 0% 100%; @@ -72,4 +86,4 @@ body { @apply bg-background text-foreground; } -} \ No newline at end of file +} diff --git a/src/lib/api/osudirect.ts b/src/lib/api/osudirect.ts new file mode 100644 index 0000000..c916921 --- /dev/null +++ b/src/lib/api/osudirect.ts @@ -0,0 +1,13 @@ +import ky from "ky"; + +const API_ENDPOINT = "https://osu.direct/api/"; + +export const osudirect = { + osu: async (mapId: number): Promise => { + try { + return await ky(API_ENDPOINT + `osu/${mapId}?raw`).text(); + } catch { + return undefined; + } + }, +}; diff --git a/src/lib/components/ui/background/background.svelte b/src/lib/components/ui/background/background.svelte index c838acd..660cad9 100644 --- a/src/lib/components/ui/background/background.svelte +++ b/src/lib/components/ui/background/background.svelte @@ -2,10 +2,11 @@ import background from "../../../../assets/background.gif"; -
- background +
+
diff --git a/src/lib/components/ui/logo/logo.svelte b/src/lib/components/ui/logo/logo.svelte index 742c931..312455f 100644 --- a/src/lib/components/ui/logo/logo.svelte +++ b/src/lib/components/ui/logo/logo.svelte @@ -1,5 +1,9 @@
-
- - +
(hovered = true)} + onmouseleave={() => (hovered = false)} + onclick={() => { + if (extended) { + playAudio("/audio/menuBack.wav", 1); + } else { + playAudio("/audio/menuHit.wav", 1); + } + onclick(); + }} + > + +
@@ -42,7 +123,8 @@ } } @keyframes beat-pulse { - 0% { + 0%, + 10% { scale: 0.5; opacity: 0.5; filter: blur(0px); diff --git a/src/lib/components/ui/titlebar/titlebar.svelte b/src/lib/components/ui/titlebar/titlebar.svelte index e2ec8ee..529eaea 100644 --- a/src/lib/components/ui/titlebar/titlebar.svelte +++ b/src/lib/components/ui/titlebar/titlebar.svelte @@ -22,7 +22,7 @@
-
+
diff --git a/src/lib/utils.ts b/src/lib/utils.ts index ac680b3..4f962f8 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -2,5 +2,11 @@ import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)); + return twMerge(clsx(inputs)); } + +export const playAudio = (path: string, volume: number) => { + const audio = new Audio(path); + audio.volume = volume; + audio.play(); +}; diff --git a/static/audio/menuBack.wav b/static/audio/menuBack.wav new file mode 100644 index 0000000..4467dfa Binary files /dev/null and b/static/audio/menuBack.wav differ diff --git a/static/audio/menuHeartbeat.mp3 b/static/audio/menuHeartbeat.mp3 new file mode 100644 index 0000000..5b7c14e Binary files /dev/null and b/static/audio/menuHeartbeat.mp3 differ diff --git a/static/audio/menuHit.wav b/static/audio/menuHit.wav new file mode 100644 index 0000000..7e8843d Binary files /dev/null and b/static/audio/menuHit.wav differ