diff --git a/bun.lock b/bun.lock index bbf4cfe..a88c2ef 100644 --- a/bun.lock +++ b/bun.lock @@ -6,6 +6,8 @@ "dependencies": { "@better-fetch/fetch": "^1.1.18", "@elron/svelte-audio-store": "1.0.0", + "@fontsource/sora": "^5.2.6", + "@fontsource/space-mono": "^5.2.8", "@number-flow/svelte": "^0.3.9", "@tailwindcss/typography": "0.5.16", "@tauri-apps/api": "2.6.0", @@ -118,6 +120,10 @@ "@floating-ui/utils": ["@floating-ui/utils@0.2.9", "", {}, "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg=="], + "@fontsource/sora": ["@fontsource/sora@5.2.6", "", {}, "sha512-OPknOmn82HIJg32UGg9iEjEVFdC+xOZBqrmQNUgsem6hFwBBrqXnTwIpro7leq/uFRdupkN42hc0JJKH20j22w=="], + + "@fontsource/space-mono": ["@fontsource/space-mono@5.2.8", "", {}, "sha512-25X0fg1+kxxLes9/c6AozhrrAuBW1uLaOL584IRg4DZxVxNOMzcS3mHS1UtmsyTwtU2HpiIt9Kv23Q+7xQO+hg=="], + "@internationalized/date": ["@internationalized/date@3.8.2", "", { "dependencies": { "@swc/helpers": "^0.5.0" } }, "sha512-/wENk7CbvLbkUvX1tu0mwq49CVkkWpkXubGel6birjRPyo6uQ4nQpnq5xZu823zRCwwn82zgHrvgF1vZyvmVgA=="], "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="], diff --git a/package.json b/package.json index ed13cb5..5f7dbe7 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,8 @@ "dependencies": { "@better-fetch/fetch": "^1.1.18", "@elron/svelte-audio-store": "1.0.0", + "@fontsource/sora": "^5.2.6", + "@fontsource/space-mono": "^5.2.8", "@number-flow/svelte": "^0.3.9", "@tailwindcss/typography": "0.5.16", "@tauri-apps/api": "2.6.0", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2876c7f..5ef27d5 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1085,6 +1085,7 @@ version = "0.1.0" dependencies = [ "hardware-id", "md5", + "open", "reqwest", "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index b33adec..2ea8b10 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -34,6 +34,7 @@ winapi = { version = "0.3", features = ["winuser"] } reqwest = { version = "0.12.22", features = ["json", "stream"] } md5 = "0.8.0" tokio = { version = "1.46.0", features = ["full"] } +open = "5.3.2" [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] tauri-plugin-single-instance = "2.3.0" diff --git a/src/lib/osuUtil.ts b/src/lib/osuUtil.ts index e83f602..8bfe80f 100644 --- a/src/lib/osuUtil.ts +++ b/src/lib/osuUtil.ts @@ -70,7 +70,7 @@ export const getSkin = async (folder: string) => { }; export const runUpdater = async (folder: string) => await invoke('run_osu_updater', { folder }); -export const runOsu = async (folder: string) => await invoke('run_osu', { folder }); +export const runOsu = async (folder: string, patch: boolean) => await invoke('run_osu', { folder, patch }); export const getEZPPLauncherUpdateFiles = async (folder: string) => { const result = await invoke('get_ezpp_launcher_update_files', { folder, updateUrl }); diff --git a/src/lib/userSettings.ts b/src/lib/userSettings.ts index 7a77033..0f63f6e 100644 --- a/src/lib/userSettings.ts +++ b/src/lib/userSettings.ts @@ -7,6 +7,7 @@ export const customCursor = writable(false); export const cursorSmoothening = writable(false); export const cursorSmoothness = writable(180); export const reduceAnimations = writable(false); +export const patch = writable(true); export const osuInstallationPath = writable(''); diff --git a/src/lib/utils.ts b/src/lib/utils.ts index db0b38d..74d9892 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,4 +1,5 @@ import { createAudioStore } from '@elron/svelte-audio-store'; +import { invoke } from '@tauri-apps/api/core'; import { type ClassValue, clsx } from 'clsx'; import { twMerge } from 'tailwind-merge'; @@ -93,3 +94,7 @@ export const formatBytes = (bytes: number, decimals = 2) => { return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))}${sizes[i]}`; }; + +export const openURL = async (url: string) => { + await invoke('open_url_in_browser', { url }); +}; diff --git a/src/pages/Launch.svelte b/src/pages/Launch.svelte index 1590377..517605b 100644 --- a/src/pages/Launch.svelte +++ b/src/pages/Launch.svelte @@ -40,6 +40,7 @@ formatBytes, formatTimeReadable, numberHumanReadable, + openURL, releaseStreamToReadable, } from '@/utils'; import { fade, scale } from 'svelte/transition'; @@ -49,6 +50,7 @@ cursorSmoothening, customCursor, osuInstallationPath, + patch, preferredMode, preferredType, reduceAnimations, @@ -86,6 +88,7 @@ setUserConfigValues, } from '@/osuUtil'; import { getCurrentWindow } from '@tauri-apps/api/window'; + import { Heart } from 'radix-icons-svelte'; let selectedTab = $state('home'); let progress = $state(-1); @@ -296,7 +299,7 @@ await replaceUIFiles(osuPath, false); await new Promise((res) => setTimeout(res, 1000)); await getCurrentWindow().hide(); - await runOsu(osuPath); + await runOsu(osuPath, true); launchInfo = 'Cleaning up...'; await getCurrentWindow().show(); await new Promise((res) => setTimeout(res, 1000)); @@ -776,98 +779,113 @@
EZPPLauncher Settings
-
-
- -
- Enable a custom cursor in the Launcher like in the lazer build of osu! +
+
+
+ +
Shows misses in Relax and Autopilot
+
+ { + patch.set(e); + $userSettings.save(); + }} + class="flex items-center justify-center w-5 h-5" + > + +
+ +
+ Enable a custom cursor in the Launcher like in the lazer build of osu! +
+
+ { + if (!e) { + cursorSmoothening.set(false); + } + customCursor.set(e); + + $userSettings.save(); + }} + class="flex items-center justify-center w-5 h-5" + > + +
+ +
+ Makes the custom cursor movement smoother. +
+
+ { + if (!$customCursor) return; + cursorSmoothening.set(e); + $userSettings.save(); + }} + disabled={!$customCursor} + class="flex items-center justify-center w-5 h-5" + > + +
+ +
+ Disables some animations in the Launcher to improve performance on low-end devices. +
+
+ { + reduceAnimations.set(e); + $userSettings.save(); + }} + disabled={!$customCursor} + class="flex items-center justify-center w-5 h-5" + > +
+
+
+ +
The path to your osu! installation.
+
+
+ +
- { - if (!e) { - cursorSmoothening.set(false); - } - customCursor.set(e); - - $userSettings.save(); - }} - class="flex items-center justify-center w-5 h-5" - > - -
- -
- Makes the custom cursor movement smoother. -
-
- { - if (!$customCursor) return; - cursorSmoothening.set(e); - $userSettings.save(); - }} - disabled={!$customCursor} - class="flex items-center justify-center w-5 h-5" - > - -
- -
- Disables some animations in the Launcher to improve performance on low-end devices. -
-
- { - reduceAnimations.set(e); - $userSettings.save(); - }} - disabled={!$customCursor} - class="flex items-center justify-center w-5 h-5" - >
-
-
- osu! Settings -
-
+ -
-
+ made with + + by horizoncode +
{/if}
diff --git a/src/pages/SetupWizard.svelte b/src/pages/SetupWizard.svelte index 7061263..08f5899 100644 --- a/src/pages/SetupWizard.svelte +++ b/src/pages/SetupWizard.svelte @@ -12,6 +12,7 @@ cursorSmoothening, customCursor, osuInstallationPath, + patch, reduceAnimations, userSettings, } from '@/userSettings'; @@ -250,6 +251,20 @@
+
+ +
Shows misses in Relax and Autopilot
+
+ { + patch.set(e); + $userSettings.save(); + }} + class="flex items-center justify-center w-5 h-5" + > +
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 36cdb66..16e141d 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -8,12 +8,17 @@ cursorSmoothening, customCursor, osuInstallationPath, + patch, reduceAnimations, userSettings, } from '@/userSettings'; import { Buffer } from 'buffer'; import { Toaster } from '@/components/ui/sonner'; import { userAuth } from '@/userAuthentication'; + + import '@fontsource/sora'; + import '@fontsource/space-mono'; + let { children } = $props(); function disableReload() { @@ -72,16 +77,19 @@ $userAuth.init(); currentLoadingInfo.set('Loading config...'); + const config_patching = $userSettings.value('patching'); const config_custom_cursor = $userSettings.value('custom_cursor'); const config_cursor_smoothening = $userSettings.value('cursor_smoothening'); const config_reduce_animations = $userSettings.value('reduce_animations'); const config_osu_installation_path = $userSettings.value('osu_installation_path'); + patch.set(config_patching.get(true)); customCursor.set(config_custom_cursor.get(true)); cursorSmoothening.set(config_cursor_smoothening.get(true)); reduceAnimations.set(config_reduce_animations.get(false)); osuInstallationPath.set(config_osu_installation_path.get('')); + patch.subscribe((val) => config_patching.set(val)); customCursor.subscribe((val) => config_custom_cursor.set(val)); cursorSmoothening.subscribe((val) => config_cursor_smoothening.set(val)); reduceAnimations.subscribe((val) => config_reduce_animations.set(val)); diff --git a/tailwind.config.ts b/tailwind.config.ts index 89025e7..9be24a8 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,117 +1,118 @@ -import { fontFamily } from "tailwindcss/defaultTheme"; -import type { Config } from "tailwindcss"; -import tailwindcssAnimate from "tailwindcss-animate"; +import { fontFamily } from 'tailwindcss/defaultTheme'; +import type { Config } from 'tailwindcss'; +import tailwindcssAnimate from 'tailwindcss-animate'; const config: Config = { - darkMode: "class", - content: ["./src/**/*.{html,js,svelte,ts}"], - safelist: ["dark"], + darkMode: 'class', + content: ['./src/**/*.{html,js,svelte,ts}'], + safelist: ['dark'], theme: { container: { center: true, - padding: "2rem", + padding: '2rem', screens: { - "2xl": "1400px", + '2xl': '1400px', }, }, extend: { colors: { theme: { - DEFAULT: "#181825", - 50: "#E9E9F1", - 100: "#DBDBE8", - 200: "#BFBFD6", - 300: "#A4A4C4", - 400: "#8888B2", - 500: "#6C6CA0", - 600: "#575786", - 700: "#45456B", - 800: "#33334F", - 900: "#212133", - 950: "#181825", + DEFAULT: '#181825', + 50: '#E9E9F1', + 100: '#DBDBE8', + 200: '#BFBFD6', + 300: '#A4A4C4', + 400: '#8888B2', + 500: '#6C6CA0', + 600: '#575786', + 700: '#45456B', + 800: '#33334F', + 900: '#212133', + 950: '#181825', }, - border: "hsl(var(--border) / )", - input: "hsl(var(--input) / )", - ring: "hsl(var(--ring) / )", - background: "hsl(var(--background) / )", - foreground: "hsl(var(--foreground) / )", + border: 'hsl(var(--border) / )', + input: 'hsl(var(--input) / )', + ring: 'hsl(var(--ring) / )', + background: 'hsl(var(--background) / )', + foreground: 'hsl(var(--foreground) / )', primary: { - DEFAULT: "hsl(var(--primary) / )", - 50: "#FEFDFF", - 100: "#FAF6FE", - 200: "#F2E9FC", - 300: "#E9DBFA", - 400: "#E1CEF9", - 500: "#D9C0F7", - 600: "#C6A0F3", - 700: "#B381EF", - 800: "#A061EB", - 900: "#8D41E7", - 950: "#8331E5", - foreground: "hsl(var(--primary-foreground) / )", + DEFAULT: 'hsl(var(--primary) / )', + 50: '#FEFDFF', + 100: '#FAF6FE', + 200: '#F2E9FC', + 300: '#E9DBFA', + 400: '#E1CEF9', + 500: '#D9C0F7', + 600: '#C6A0F3', + 700: '#B381EF', + 800: '#A061EB', + 900: '#8D41E7', + 950: '#8331E5', + foreground: 'hsl(var(--primary-foreground) / )', }, secondary: { - DEFAULT: "hsl(var(--secondary) / )", - foreground: "hsl(var(--secondary-foreground) / )", + DEFAULT: 'hsl(var(--secondary) / )', + foreground: 'hsl(var(--secondary-foreground) / )', }, destructive: { - DEFAULT: "hsl(var(--destructive) / )", - foreground: "hsl(var(--destructive-foreground) / )", + DEFAULT: 'hsl(var(--destructive) / )', + foreground: 'hsl(var(--destructive-foreground) / )', }, muted: { - DEFAULT: "hsl(var(--muted) / )", - foreground: "hsl(var(--muted-foreground) / )", + DEFAULT: 'hsl(var(--muted) / )', + foreground: 'hsl(var(--muted-foreground) / )', }, accent: { - DEFAULT: "hsl(var(--accent) / )", - foreground: "hsl(var(--accent-foreground) / )", + DEFAULT: 'hsl(var(--accent) / )', + foreground: 'hsl(var(--accent-foreground) / )', }, popover: { - DEFAULT: "hsl(var(--popover) / )", - foreground: "hsl(var(--popover-foreground) / )", + DEFAULT: 'hsl(var(--popover) / )', + foreground: 'hsl(var(--popover-foreground) / )', }, card: { - DEFAULT: "hsl(var(--card) / )", - foreground: "hsl(var(--card-foreground) / )", + DEFAULT: 'hsl(var(--card) / )', + foreground: 'hsl(var(--card-foreground) / )', }, sidebar: { - DEFAULT: "hsl(var(--sidebar-background))", - foreground: "hsl(var(--sidebar-foreground))", - primary: "hsl(var(--sidebar-primary))", - "primary-foreground": "hsl(var(--sidebar-primary-foreground))", - accent: "hsl(var(--sidebar-accent))", - "accent-foreground": "hsl(var(--sidebar-accent-foreground))", - border: "hsl(var(--sidebar-border))", - ring: "hsl(var(--sidebar-ring))", + DEFAULT: 'hsl(var(--sidebar-background))', + foreground: 'hsl(var(--sidebar-foreground))', + primary: 'hsl(var(--sidebar-primary))', + 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))', + accent: 'hsl(var(--sidebar-accent))', + 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))', + border: 'hsl(var(--sidebar-border))', + ring: 'hsl(var(--sidebar-ring))', }, }, borderRadius: { - xl: "calc(var(--radius) + 4px)", - lg: "var(--radius)", - md: "calc(var(--radius) - 2px)", - sm: "calc(var(--radius) - 4px)", + xl: 'calc(var(--radius) + 4px)', + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)', }, fontFamily: { - sans: [...fontFamily.sans], + sans: ['"Sora"', ...fontFamily.sans], + mono: ['"Space Mono"', ...fontFamily.mono], }, keyframes: { - "accordion-down": { - from: { height: "0" }, - to: { height: "var(--bits-accordion-content-height)" }, + 'accordion-down': { + from: { height: '0' }, + to: { height: 'var(--bits-accordion-content-height)' }, }, - "accordion-up": { - from: { height: "var(--bits-accordion-content-height)" }, - to: { height: "0" }, + 'accordion-up': { + from: { height: 'var(--bits-accordion-content-height)' }, + to: { height: '0' }, }, - "caret-blink": { - "0%,70%,100%": { opacity: "1" }, - "20%,50%": { opacity: "0" }, + 'caret-blink': { + '0%,70%,100%': { opacity: '1' }, + '20%,50%': { opacity: '0' }, }, }, animation: { - "accordion-down": "accordion-down 0.2s ease-out", - "accordion-up": "accordion-up 0.2s ease-out", - "caret-blink": "caret-blink 1.25s ease-out infinite", + 'accordion-down': 'accordion-down 0.2s ease-out', + 'accordion-up': 'accordion-up 0.2s ease-out', + 'caret-blink': 'caret-blink 1.25s ease-out infinite', }, }, },