From 5b600017d5c17e74918a1b97d9ecc5b4a9f3aad5 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Fri, 4 Jul 2025 22:24:20 +0200 Subject: [PATCH] chore: format --- .prettierrc | 1 - README.md | 2 +- components.json | 28 ++--- postcss.config.js | 4 +- src-tauri/capabilities/default.json | 6 +- src-tauri/tauri.conf.json | 2 +- src/app.html | 22 ++-- src/lib/api/osudirect.ts | 2 +- .../alert-dialog/alert-dialog-action.svelte | 16 +-- .../alert-dialog/alert-dialog-cancel.svelte | 22 ++-- .../alert-dialog/alert-dialog-content.svelte | 40 +++--- .../alert-dialog-description.svelte | 20 +-- .../alert-dialog/alert-dialog-footer.svelte | 26 ++-- .../alert-dialog/alert-dialog-header.svelte | 26 ++-- .../alert-dialog/alert-dialog-overlay.svelte | 26 ++-- .../ui/alert-dialog/alert-dialog-title.svelte | 24 ++-- src/lib/components/ui/alert-dialog/index.ts | 64 +++++----- .../ui/avatar/avatar-fallback.svelte | 20 +-- .../components/ui/avatar/avatar-image.svelte | 20 +-- src/lib/components/ui/avatar/avatar.svelte | 20 +-- src/lib/components/ui/avatar/index.ts | 20 +-- .../ui/background/background.svelte | 6 +- src/lib/components/ui/badge/badge.svelte | 75 ++++++----- src/lib/components/ui/badge/index.ts | 4 +- src/lib/components/ui/button/button.svelte | 116 +++++++++--------- src/lib/components/ui/button/index.ts | 26 ++-- .../components/ui/checkbox/checkbox.svelte | 56 ++++----- src/lib/components/ui/checkbox/index.ts | 8 +- .../dropdown-menu-checkbox-item.svelte | 66 +++++----- .../dropdown-menu-content.svelte | 40 +++--- .../dropdown-menu-group-heading.svelte | 26 ++-- .../dropdown-menu/dropdown-menu-item.svelte | 34 ++--- .../dropdown-menu/dropdown-menu-label.svelte | 32 ++--- .../dropdown-menu-radio-item.svelte | 46 +++---- .../dropdown-menu-separator.svelte | 20 +-- .../dropdown-menu-shortcut.svelte | 26 ++-- .../dropdown-menu-sub-content.svelte | 26 ++-- .../dropdown-menu-sub-trigger.svelte | 42 +++---- src/lib/components/ui/dropdown-menu/index.ts | 82 ++++++------- src/lib/components/ui/input/index.ts | 8 +- src/lib/components/ui/input/input.svelte | 32 ++--- src/lib/components/ui/label/index.ts | 8 +- src/lib/components/ui/label/label.svelte | 26 ++-- src/lib/components/ui/logo/logo.svelte | 31 +++-- .../components/ui/osu-cursor/OsuCursor.svelte | 4 +- src/lib/components/ui/progress/index.ts | 8 +- .../components/ui/progress/progress.svelte | 12 +- src/lib/components/ui/select/index.ts | 54 ++++---- .../ui/select/select-content.svelte | 66 +++++----- .../ui/select/select-group-heading.svelte | 20 +-- .../components/ui/select/select-item.svelte | 60 ++++----- .../select/select-scroll-down-button.svelte | 24 ++-- .../ui/select/select-scroll-up-button.svelte | 24 ++-- .../ui/select/select-separator.svelte | 18 +-- .../ui/select/select-trigger.svelte | 34 ++--- src/lib/components/ui/separator/index.ts | 8 +- .../components/ui/separator/separator.svelte | 32 ++--- src/lib/components/ui/sonner/index.ts | 2 +- src/lib/config.ts | 1 + src/lib/displayUtils.ts | 2 +- src/lib/global.ts | 2 +- src/lib/osuUtil.ts | 3 +- src/lib/userAuthentication.ts | 2 +- src/pages/Launch.svelte | 10 +- src/routes/+layout.ts | 2 +- svelte.config.js | 12 +- tsconfig.json | 4 +- vite.config.js | 8 +- 68 files changed, 822 insertions(+), 837 deletions(-) diff --git a/.prettierrc b/.prettierrc index d910eb3..18dae0c 100644 --- a/.prettierrc +++ b/.prettierrc @@ -9,7 +9,6 @@ "tabWidth": 2, "useTabs": false, "bracketSpacing": true, - "svelteBracketNewLine": true, "plugins": ["prettier-plugin-svelte"], "overrides": [ { diff --git a/README.md b/README.md index 94b719a..a68a70d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # EZPPLauncher Tauri -Trying to recode this shit with tauri, kms \ No newline at end of file +Trying to recode this shit with tauri, kms diff --git a/components.json b/components.json index f822e81..44c93df 100644 --- a/components.json +++ b/components.json @@ -1,16 +1,16 @@ { - "$schema": "https://next.shadcn-svelte.com/schema.json", - "tailwind": { - "css": "src\\app.css", - "baseColor": "gray" - }, - "aliases": { - "components": "$lib/components", - "utils": "$lib/utils", - "ui": "$lib/components/ui", - "hooks": "$lib/hooks", - "lib": "$lib" - }, - "typescript": true, - "registry": "https://tw3.shadcn-svelte.com/registry/default" + "$schema": "https://next.shadcn-svelte.com/schema.json", + "tailwind": { + "css": "src\\app.css", + "baseColor": "gray" + }, + "aliases": { + "components": "$lib/components", + "utils": "$lib/utils", + "ui": "$lib/components/ui", + "hooks": "$lib/hooks", + "lib": "$lib" + }, + "typescript": true, + "registry": "https://tw3.shadcn-svelte.com/registry/default" } diff --git a/postcss.config.js b/postcss.config.js index ba80730..2aa7205 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { plugins: { tailwindcss: {}, - autoprefixer: {} - } + autoprefixer: {}, + }, }; diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index ef9c2c1..786384c 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -2,9 +2,7 @@ "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", "description": "Capability for the main window", - "windows": [ - "main" - ], + "windows": ["main"], "permissions": [ "core:default", "shell:allow-open", @@ -75,4 +73,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 3a901b9..cc511c4 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -36,4 +36,4 @@ "icons/icon.ico" ] } -} \ No newline at end of file +} diff --git a/src/app.html b/src/app.html index 934dd18..175adf5 100644 --- a/src/app.html +++ b/src/app.html @@ -1,15 +1,13 @@ + + + + EZPPLauncher + %sveltekit.head% + - - - - EZPPLauncher - %sveltekit.head% - - - -
%sveltekit.body%
- - - \ No newline at end of file + +
%sveltekit.body%
+ + diff --git a/src/lib/api/osudirect.ts b/src/lib/api/osudirect.ts index e95f468..bb5b161 100644 --- a/src/lib/api/osudirect.ts +++ b/src/lib/api/osudirect.ts @@ -1,4 +1,4 @@ -const API_ENDPOINT = "https://osu.direct/api/"; +const API_ENDPOINT = 'https://osu.direct/api/'; export const osudirect = { osu: async (mapId: number): Promise => { diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte index 95ccd3b..cf0f97b 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte @@ -1,13 +1,13 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte index 7015a89..4e15156 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte @@ -1,17 +1,17 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte index 858b8bc..b2dce5a 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-content.svelte @@ -1,26 +1,26 @@ - - + + diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte index 3e136da..6e6dd7d 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte @@ -1,16 +1,16 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte index 91ecaba..f4bf1eb 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte @@ -1,20 +1,20 @@
- {@render children?.()} + {@render children?.()}
diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte index 44a7b08..304b397 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte @@ -1,20 +1,20 @@
- {@render children?.()} + {@render children?.()}
diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte index bb76e7a..9fd432a 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte @@ -1,19 +1,19 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte index c7811db..19adf2a 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte @@ -1,18 +1,18 @@ diff --git a/src/lib/components/ui/alert-dialog/index.ts b/src/lib/components/ui/alert-dialog/index.ts index d06201d..ef139f1 100644 --- a/src/lib/components/ui/alert-dialog/index.ts +++ b/src/lib/components/ui/alert-dialog/index.ts @@ -1,39 +1,39 @@ -import { AlertDialog as AlertDialogPrimitive } from "bits-ui"; -import Title from "./alert-dialog-title.svelte"; -import Action from "./alert-dialog-action.svelte"; -import Cancel from "./alert-dialog-cancel.svelte"; -import Footer from "./alert-dialog-footer.svelte"; -import Header from "./alert-dialog-header.svelte"; -import Overlay from "./alert-dialog-overlay.svelte"; -import Content from "./alert-dialog-content.svelte"; -import Description from "./alert-dialog-description.svelte"; +import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'; +import Title from './alert-dialog-title.svelte'; +import Action from './alert-dialog-action.svelte'; +import Cancel from './alert-dialog-cancel.svelte'; +import Footer from './alert-dialog-footer.svelte'; +import Header from './alert-dialog-header.svelte'; +import Overlay from './alert-dialog-overlay.svelte'; +import Content from './alert-dialog-content.svelte'; +import Description from './alert-dialog-description.svelte'; const Root = AlertDialogPrimitive.Root; const Trigger = AlertDialogPrimitive.Trigger; const Portal = AlertDialogPrimitive.Portal; export { - Root, - Title, - Action, - Cancel, - Portal, - Footer, - Header, - Trigger, - Overlay, - Content, - Description, - // - Root as AlertDialog, - Title as AlertDialogTitle, - Action as AlertDialogAction, - Cancel as AlertDialogCancel, - Portal as AlertDialogPortal, - Footer as AlertDialogFooter, - Header as AlertDialogHeader, - Trigger as AlertDialogTrigger, - Overlay as AlertDialogOverlay, - Content as AlertDialogContent, - Description as AlertDialogDescription, + Root, + Title, + Action, + Cancel, + Portal, + Footer, + Header, + Trigger, + Overlay, + Content, + Description, + // + Root as AlertDialog, + Title as AlertDialogTitle, + Action as AlertDialogAction, + Cancel as AlertDialogCancel, + Portal as AlertDialogPortal, + Footer as AlertDialogFooter, + Header as AlertDialogHeader, + Trigger as AlertDialogTrigger, + Overlay as AlertDialogOverlay, + Content as AlertDialogContent, + Description as AlertDialogDescription, }; diff --git a/src/lib/components/ui/avatar/avatar-fallback.svelte b/src/lib/components/ui/avatar/avatar-fallback.svelte index 4f97379..60cca66 100644 --- a/src/lib/components/ui/avatar/avatar-fallback.svelte +++ b/src/lib/components/ui/avatar/avatar-fallback.svelte @@ -1,16 +1,16 @@ diff --git a/src/lib/components/ui/avatar/avatar-image.svelte b/src/lib/components/ui/avatar/avatar-image.svelte index c7511ea..ee2d17e 100644 --- a/src/lib/components/ui/avatar/avatar-image.svelte +++ b/src/lib/components/ui/avatar/avatar-image.svelte @@ -1,16 +1,16 @@ diff --git a/src/lib/components/ui/avatar/avatar.svelte b/src/lib/components/ui/avatar/avatar.svelte index 3849344..b459275 100644 --- a/src/lib/components/ui/avatar/avatar.svelte +++ b/src/lib/components/ui/avatar/avatar.svelte @@ -1,16 +1,16 @@ diff --git a/src/lib/components/ui/avatar/index.ts b/src/lib/components/ui/avatar/index.ts index d06457b..591ea32 100644 --- a/src/lib/components/ui/avatar/index.ts +++ b/src/lib/components/ui/avatar/index.ts @@ -1,13 +1,13 @@ -import Root from "./avatar.svelte"; -import Image from "./avatar-image.svelte"; -import Fallback from "./avatar-fallback.svelte"; +import Root from './avatar.svelte'; +import Image from './avatar-image.svelte'; +import Fallback from './avatar-fallback.svelte'; export { - Root, - Image, - Fallback, - // - Root as Avatar, - Image as AvatarImage, - Fallback as AvatarFallback, + Root, + Image, + Fallback, + // + Root as Avatar, + Image as AvatarImage, + Fallback as AvatarFallback, }; diff --git a/src/lib/components/ui/background/background.svelte b/src/lib/components/ui/background/background.svelte index 8875c44..793aa3b 100644 --- a/src/lib/components/ui/background/background.svelte +++ b/src/lib/components/ui/background/background.svelte @@ -1,10 +1,8 @@ -
+
- import { type VariantProps, tv } from "tailwind-variants"; + import { type VariantProps, tv } from 'tailwind-variants'; - export const badgeVariants = tv({ - base: "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", - variants: { - variant: { - default: - "bg-primary text-primary-foreground hover:bg-primary/80 border-transparent", - secondary: - "bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent", - destructive: - "bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent", - outline: "text-foreground", - }, - }, - defaultVariants: { - variant: "default", - }, - }); + export const badgeVariants = tv({ + base: 'focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2', + variants: { + variant: { + default: 'bg-primary text-primary-foreground hover:bg-primary/80 border-transparent', + secondary: + 'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent', + destructive: + 'bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent', + outline: 'text-foreground', + }, + }, + defaultVariants: { + variant: 'default', + }, + }); - export type BadgeVariant = VariantProps["variant"]; + export type BadgeVariant = VariantProps['variant']; - {@render children?.()} + {@render children?.()} diff --git a/src/lib/components/ui/badge/index.ts b/src/lib/components/ui/badge/index.ts index 64e0aa9..f05fb87 100644 --- a/src/lib/components/ui/badge/index.ts +++ b/src/lib/components/ui/badge/index.ts @@ -1,2 +1,2 @@ -export { default as Badge } from "./badge.svelte"; -export { badgeVariants, type BadgeVariant } from "./badge.svelte"; +export { default as Badge } from './badge.svelte'; +export { badgeVariants, type BadgeVariant } from './badge.svelte'; diff --git a/src/lib/components/ui/button/button.svelte b/src/lib/components/ui/button/button.svelte index 8f44d5c..4282943 100644 --- a/src/lib/components/ui/button/button.svelte +++ b/src/lib/components/ui/button/button.svelte @@ -1,74 +1,68 @@ {#if href} - - {@render children?.()} - + + {@render children?.()} + {:else} - + {/if} diff --git a/src/lib/components/ui/button/index.ts b/src/lib/components/ui/button/index.ts index fb585d7..66c1087 100644 --- a/src/lib/components/ui/button/index.ts +++ b/src/lib/components/ui/button/index.ts @@ -1,17 +1,17 @@ import Root, { - type ButtonProps, - type ButtonSize, - type ButtonVariant, - buttonVariants, -} from "./button.svelte"; + type ButtonProps, + type ButtonSize, + type ButtonVariant, + buttonVariants, +} from './button.svelte'; export { - Root, - type ButtonProps as Props, - // - Root as Button, - buttonVariants, - type ButtonProps, - type ButtonSize, - type ButtonVariant, + Root, + type ButtonProps as Props, + // + Root as Button, + buttonVariants, + type ButtonProps, + type ButtonSize, + type ButtonVariant, }; diff --git a/src/lib/components/ui/checkbox/checkbox.svelte b/src/lib/components/ui/checkbox/checkbox.svelte index 2395094..45b21be 100644 --- a/src/lib/components/ui/checkbox/checkbox.svelte +++ b/src/lib/components/ui/checkbox/checkbox.svelte @@ -1,35 +1,35 @@ - {#snippet children({ checked, indeterminate })} -
- {#if indeterminate} - - {:else} - - {/if} -
- {/snippet} + {#snippet children({ checked, indeterminate })} +
+ {#if indeterminate} + + {:else} + + {/if} +
+ {/snippet}
diff --git a/src/lib/components/ui/checkbox/index.ts b/src/lib/components/ui/checkbox/index.ts index 6d92d94..ba3b7d7 100644 --- a/src/lib/components/ui/checkbox/index.ts +++ b/src/lib/components/ui/checkbox/index.ts @@ -1,6 +1,6 @@ -import Root from "./checkbox.svelte"; +import Root from './checkbox.svelte'; export { - Root, - // - Root as Checkbox, + Root, + // + Root as Checkbox, }; diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte index 20e3777..5f485ab 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte @@ -1,40 +1,40 @@ - {#snippet children({ checked, indeterminate })} - - {#if indeterminate} - - {:else} - - {/if} - - {@render childrenProp?.()} - {/snippet} + {#snippet children({ checked, indeterminate })} + + {#if indeterminate} + + {:else} + + {/if} + + {@render childrenProp?.()} + {/snippet} diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte index fdbaa47..3db10ab 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte @@ -1,26 +1,26 @@ - + diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte index 84d5cca..c5e9549 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte @@ -1,19 +1,19 @@ diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte index 70a5236..fab7df0 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte @@ -1,23 +1,23 @@ diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte index 9837d5a..f1ac565 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte @@ -1,23 +1,23 @@
- {@render children?.()} + {@render children?.()}
diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte index 0f219da..634c5a0 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte @@ -1,30 +1,30 @@ - {#snippet children({ checked })} - - {#if checked} - - {/if} - - {@render childrenProp?.({ checked })} - {/snippet} + {#snippet children({ checked })} + + {#if checked} + + {/if} + + {@render childrenProp?.({ checked })} + {/snippet} diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte index 32fac4b..73f21c2 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte @@ -1,16 +1,16 @@ diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte index 053e2a2..e09c776 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte @@ -1,20 +1,20 @@ - {@render children?.()} + {@render children?.()} diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte index 0bb6eea..af840bb 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte @@ -1,19 +1,19 @@ diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte index c2dcd32..3aea16f 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte @@ -1,28 +1,28 @@ - {@render children?.()} - + {@render children?.()} + diff --git a/src/lib/components/ui/dropdown-menu/index.ts b/src/lib/components/ui/dropdown-menu/index.ts index 40c4502..d3fe7c9 100644 --- a/src/lib/components/ui/dropdown-menu/index.ts +++ b/src/lib/components/ui/dropdown-menu/index.ts @@ -1,14 +1,14 @@ -import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui"; -import CheckboxItem from "./dropdown-menu-checkbox-item.svelte"; -import Content from "./dropdown-menu-content.svelte"; -import GroupHeading from "./dropdown-menu-group-heading.svelte"; -import Item from "./dropdown-menu-item.svelte"; -import Label from "./dropdown-menu-label.svelte"; -import RadioItem from "./dropdown-menu-radio-item.svelte"; -import Separator from "./dropdown-menu-separator.svelte"; -import Shortcut from "./dropdown-menu-shortcut.svelte"; -import SubContent from "./dropdown-menu-sub-content.svelte"; -import SubTrigger from "./dropdown-menu-sub-trigger.svelte"; +import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'; +import CheckboxItem from './dropdown-menu-checkbox-item.svelte'; +import Content from './dropdown-menu-content.svelte'; +import GroupHeading from './dropdown-menu-group-heading.svelte'; +import Item from './dropdown-menu-item.svelte'; +import Label from './dropdown-menu-label.svelte'; +import RadioItem from './dropdown-menu-radio-item.svelte'; +import Separator from './dropdown-menu-separator.svelte'; +import Shortcut from './dropdown-menu-shortcut.svelte'; +import SubContent from './dropdown-menu-sub-content.svelte'; +import SubTrigger from './dropdown-menu-sub-trigger.svelte'; const Sub = DropdownMenuPrimitive.Sub; const Root = DropdownMenuPrimitive.Root; @@ -17,34 +17,34 @@ const Group = DropdownMenuPrimitive.Group; const RadioGroup = DropdownMenuPrimitive.RadioGroup; export { - CheckboxItem, - Content, - Root as DropdownMenu, - CheckboxItem as DropdownMenuCheckboxItem, - Content as DropdownMenuContent, - Group as DropdownMenuGroup, - GroupHeading as DropdownMenuGroupHeading, - Item as DropdownMenuItem, - Label as DropdownMenuLabel, - RadioGroup as DropdownMenuRadioGroup, - RadioItem as DropdownMenuRadioItem, - Separator as DropdownMenuSeparator, - Shortcut as DropdownMenuShortcut, - Sub as DropdownMenuSub, - SubContent as DropdownMenuSubContent, - SubTrigger as DropdownMenuSubTrigger, - Trigger as DropdownMenuTrigger, - Group, - GroupHeading, - Item, - Label, - RadioGroup, - RadioItem, - Root, - Separator, - Shortcut, - Sub, - SubContent, - SubTrigger, - Trigger, + CheckboxItem, + Content, + Root as DropdownMenu, + CheckboxItem as DropdownMenuCheckboxItem, + Content as DropdownMenuContent, + Group as DropdownMenuGroup, + GroupHeading as DropdownMenuGroupHeading, + Item as DropdownMenuItem, + Label as DropdownMenuLabel, + RadioGroup as DropdownMenuRadioGroup, + RadioItem as DropdownMenuRadioItem, + Separator as DropdownMenuSeparator, + Shortcut as DropdownMenuShortcut, + Sub as DropdownMenuSub, + SubContent as DropdownMenuSubContent, + SubTrigger as DropdownMenuSubTrigger, + Trigger as DropdownMenuTrigger, + Group, + GroupHeading, + Item, + Label, + RadioGroup, + RadioItem, + Root, + Separator, + Shortcut, + Sub, + SubContent, + SubTrigger, + Trigger, }; diff --git a/src/lib/components/ui/input/index.ts b/src/lib/components/ui/input/index.ts index f47b6d3..0888f0e 100644 --- a/src/lib/components/ui/input/index.ts +++ b/src/lib/components/ui/input/index.ts @@ -1,7 +1,7 @@ -import Root from "./input.svelte"; +import Root from './input.svelte'; export { - Root, - // - Root as Input, + Root, + // + Root as Input, }; diff --git a/src/lib/components/ui/input/input.svelte b/src/lib/components/ui/input/input.svelte index 598829f..5afeab9 100644 --- a/src/lib/components/ui/input/input.svelte +++ b/src/lib/components/ui/input/input.svelte @@ -1,22 +1,22 @@ diff --git a/src/lib/components/ui/label/index.ts b/src/lib/components/ui/label/index.ts index 8bfca0b..36fb393 100644 --- a/src/lib/components/ui/label/index.ts +++ b/src/lib/components/ui/label/index.ts @@ -1,7 +1,7 @@ -import Root from "./label.svelte"; +import Root from './label.svelte'; export { - Root, - // - Root as Label, + Root, + // + Root as Label, }; diff --git a/src/lib/components/ui/label/label.svelte b/src/lib/components/ui/label/label.svelte index 247d23c..79d5e04 100644 --- a/src/lib/components/ui/label/label.svelte +++ b/src/lib/components/ui/label/label.svelte @@ -1,19 +1,19 @@ diff --git a/src/lib/components/ui/logo/logo.svelte b/src/lib/components/ui/logo/logo.svelte index e68dc07..7ecfd49 100644 --- a/src/lib/components/ui/logo/logo.svelte +++ b/src/lib/components/ui/logo/logo.svelte @@ -1,9 +1,9 @@ - - - - {@render children?.()} - - - + + + + {@render children?.()} + + + diff --git a/src/lib/components/ui/select/select-group-heading.svelte b/src/lib/components/ui/select/select-group-heading.svelte index 7984bef..45df535 100644 --- a/src/lib/components/ui/select/select-group-heading.svelte +++ b/src/lib/components/ui/select/select-group-heading.svelte @@ -1,16 +1,16 @@ diff --git a/src/lib/components/ui/select/select-item.svelte b/src/lib/components/ui/select/select-item.svelte index 2616090..c8c3fc3 100644 --- a/src/lib/components/ui/select/select-item.svelte +++ b/src/lib/components/ui/select/select-item.svelte @@ -1,37 +1,37 @@ - {#snippet children({ selected, highlighted })} - - {#if selected} - - {/if} - - {#if childrenProp} - {@render childrenProp({ selected, highlighted })} - {:else} - {label || value} - {/if} - {/snippet} + {#snippet children({ selected, highlighted })} + + {#if selected} + + {/if} + + {#if childrenProp} + {@render childrenProp({ selected, highlighted })} + {:else} + {label || value} + {/if} + {/snippet} diff --git a/src/lib/components/ui/select/select-scroll-down-button.svelte b/src/lib/components/ui/select/select-scroll-down-button.svelte index c17d5d1..044bb5f 100644 --- a/src/lib/components/ui/select/select-scroll-down-button.svelte +++ b/src/lib/components/ui/select/select-scroll-down-button.svelte @@ -1,19 +1,19 @@ - + diff --git a/src/lib/components/ui/select/select-scroll-up-button.svelte b/src/lib/components/ui/select/select-scroll-up-button.svelte index 8ba08c0..40b8bd5 100644 --- a/src/lib/components/ui/select/select-scroll-up-button.svelte +++ b/src/lib/components/ui/select/select-scroll-up-button.svelte @@ -1,19 +1,19 @@ - + diff --git a/src/lib/components/ui/select/select-separator.svelte b/src/lib/components/ui/select/select-separator.svelte index 38a3ab0..5a601ac 100644 --- a/src/lib/components/ui/select/select-separator.svelte +++ b/src/lib/components/ui/select/select-separator.svelte @@ -1,13 +1,13 @@ - + diff --git a/src/lib/components/ui/select/select-trigger.svelte b/src/lib/components/ui/select/select-trigger.svelte index a8c0da2..aa2922d 100644 --- a/src/lib/components/ui/select/select-trigger.svelte +++ b/src/lib/components/ui/select/select-trigger.svelte @@ -1,24 +1,24 @@ span]:line-clamp-1", - className - )} - {...restProps} + bind:ref + class={cn( + 'border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', + className + )} + {...restProps} > - {@render children?.()} - + {@render children?.()} + diff --git a/src/lib/components/ui/separator/index.ts b/src/lib/components/ui/separator/index.ts index 82442d2..56b2767 100644 --- a/src/lib/components/ui/separator/index.ts +++ b/src/lib/components/ui/separator/index.ts @@ -1,7 +1,7 @@ -import Root from "./separator.svelte"; +import Root from './separator.svelte'; export { - Root, - // - Root as Separator, + Root, + // + Root as Separator, }; diff --git a/src/lib/components/ui/separator/separator.svelte b/src/lib/components/ui/separator/separator.svelte index 839494d..3d6d320 100644 --- a/src/lib/components/ui/separator/separator.svelte +++ b/src/lib/components/ui/separator/separator.svelte @@ -1,22 +1,22 @@ diff --git a/src/lib/components/ui/sonner/index.ts b/src/lib/components/ui/sonner/index.ts index 1ad9f4a..fcaf06b 100644 --- a/src/lib/components/ui/sonner/index.ts +++ b/src/lib/components/ui/sonner/index.ts @@ -1 +1 @@ -export { default as Toaster } from "./sonner.svelte"; +export { default as Toaster } from './sonner.svelte'; diff --git a/src/lib/config.ts b/src/lib/config.ts index d5f8028..9af522d 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -45,6 +45,7 @@ export class Config { ) as Record; this.config = decryptedJSON; } catch (err) { + console.log(err); this.config = {}; await this.save(); } diff --git a/src/lib/displayUtils.ts b/src/lib/displayUtils.ts index 8810852..2645e97 100644 --- a/src/lib/displayUtils.ts +++ b/src/lib/displayUtils.ts @@ -1,6 +1,6 @@ export function estimateRefreshRate(): Promise { return new Promise((resolve) => { - let last = performance.now(); + const last = performance.now(); let frames = 0; function loop() { diff --git a/src/lib/global.ts b/src/lib/global.ts index b58f550..2969333 100644 --- a/src/lib/global.ts +++ b/src/lib/global.ts @@ -22,7 +22,7 @@ export const skins = writable(undefined); export const osuStream = writable(undefined); export const osuBuild = writable(undefined); -export const currentSkin = writable(""); +export const currentSkin = writable(''); let updateValues = true; launching.subscribe((val) => (updateValues = !val)); diff --git a/src/lib/osuUtil.ts b/src/lib/osuUtil.ts index 8bfe80f..110ed94 100644 --- a/src/lib/osuUtil.ts +++ b/src/lib/osuUtil.ts @@ -70,7 +70,8 @@ export const getSkin = async (folder: string) => { }; export const runUpdater = async (folder: string) => await invoke('run_osu_updater', { folder }); -export const runOsu = async (folder: string, patch: boolean) => await invoke('run_osu', { folder, patch }); +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/userAuthentication.ts b/src/lib/userAuthentication.ts index 3d2a068..1d7b470 100644 --- a/src/lib/userAuthentication.ts +++ b/src/lib/userAuthentication.ts @@ -2,5 +2,5 @@ import { writable } from 'svelte/store'; import { Config } from './config'; import type { EZPPUser } from './types'; -export const userAuth = writable(new Config("user_auth", true)); +export const userAuth = writable(new Config('user_auth', true)); export const currentUser = writable(undefined); diff --git a/src/pages/Launch.svelte b/src/pages/Launch.svelte index a760bcb..16aec44 100644 --- a/src/pages/Launch.svelte +++ b/src/pages/Launch.svelte @@ -144,7 +144,7 @@ } }; - const launch = async (offline: boolean) => { + const launch = async () => { const osuRunning = await isOsuRunning(); if (osuRunning) { toast.error('Hold on a second!', { @@ -428,7 +428,7 @@
- {#each validModeTypeCombinationsSorted as gamemode} + {#each validModeTypeCombinationsSorted as gamemode (gamemode)} {@const gamemod = getModeAndTypeFromGamemode(gamemode)}
@@ -726,11 +726,11 @@
({ host: host || false, hmr: host ? { - protocol: "ws", + protocol: 'ws', host, port: 1421, } : undefined, watch: { // 3. tell vite to ignore watching `src-tauri` - ignored: ["**/src-tauri/**"], + ignored: ['**/src-tauri/**'], }, }, }));