refactor: fix tw class names

This commit is contained in:
HorizonCode committed 2026-05-27 10:39:00 +02:00
1 parent 73256f32c4
commit 6f8036e9d4
5 files changed
+26 -38

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
{ {
"$schema": "https://next.shadcn-svelte.com/schema.json", "$schema": "https://shadcn-svelte.com/schema.json",
"tailwind": { "tailwind": {
"css": "src\\app.css", "css": "src\\app.css",
"baseColor": "gray" "baseColor": "gray"
@@ -12,5 +12,5 @@
"lib": "$lib" "lib": "$lib"
}, },
"typescript": true, "typescript": true,
"registry": "https://tw3.shadcn-svelte.com/registry/default" "registry": "https://shadcn-svelte.com/registry"
} }
+4 -15
View File
@@ -352,8 +352,6 @@ export const checkThemeFromFile = async (filePath: string) => {
} }
const fileBuffer = await fs.readFile(normalizedFilePath); const fileBuffer = await fs.readFile(normalizedFilePath);
let themeInfo: ThemeInfo | undefined = undefined;
try { try {
const zipFile = await zip.loadAsync(fileBuffer); const zipFile = await zip.loadAsync(fileBuffer);
@@ -365,14 +363,10 @@ export const checkThemeFromFile = async (filePath: string) => {
}; };
} }
const themeConfigData = await themeConfig.async('string'); const themeConfigData = await themeConfig.async('string');
themeInfo = JSON.parse(themeConfigData) as { const themeInfo = JSON.parse(themeConfigData) as ThemeInfo;
name: string; return {
version: string; success: !!themeInfo,
apiVersion: string; themeInfo,
author: string;
entry: string;
style: string;
preview: string;
}; };
} catch (err) { } catch (err) {
console.log(err); console.log(err);
@@ -381,11 +375,6 @@ export const checkThemeFromFile = async (filePath: string) => {
error: 'Could not read theme file', error: 'Could not read theme file',
}; };
} }
return {
success: !!themeInfo,
themeInfo,
};
}; };
export const importThemeFromFile = async (themeName: string, filePath: string) => { export const importThemeFromFile = async (themeName: string, filePath: string) => {
+15 -15
View File
@@ -1094,7 +1094,7 @@
</AlertDialog.Content> </AlertDialog.Content>
</AlertDialog.Root> </AlertDialog.Root>
<div class="grid grid-cols-[0.085fr_1fr] h-[100vh] relative" bind:this={dragAndDrop.ref}> <div class="grid grid-cols-[0.085fr_1fr] h-screen relative" bind:this={dragAndDrop.ref}>
{#if dragAndDrop.isDraggingOverApp} {#if dragAndDrop.isDraggingOverApp}
<div <div
class="fixed top-0 left-0 w-full h-full z-50 flex items-center justify-center bg-black/10 backdrop-blur-sm" class="fixed top-0 left-0 w-full h-full z-50 flex items-center justify-center bg-black/10 backdrop-blur-sm"
@@ -1126,7 +1126,7 @@
if (!$launching) selectedView = 'home'; if (!$launching) selectedView = 'home';
}} }}
> >
<House class="text-theme-200 !size-5" /> <House class="text-theme-200 size-5!" />
</Button> </Button>
<Button <Button
class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView === class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView ===
@@ -1138,7 +1138,7 @@
if (!$launching) selectedView = 'themes'; if (!$launching) selectedView = 'themes';
}} }}
> >
<Paintbrush class="text-theme-200 !size-5" /> <Paintbrush class="text-theme-200 size-5!" />
</Button> </Button>
<Button <Button
class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView === class="flex size-12 items-center gap-2 ring-1 ring-inset ring-white/15 {selectedView ===
@@ -1150,7 +1150,7 @@
if (!$launching) selectedView = 'settings'; if (!$launching) selectedView = 'settings';
}} }}
> >
<Settings class="text-theme-200 !size-5" /> <Settings class="text-theme-200 size-5!" />
</Button> </Button>
<div class="mt-auto"> <div class="mt-auto">
<DropdownMenu.Root> <DropdownMenu.Root>
@@ -1264,7 +1264,7 @@
<div class="w-px h-4 bg-white/10"></div> <div class="w-px h-4 bg-white/10"></div>
<span <span
class="text-[10px] px-2 py-0.5 rounded-full bg-white/10 text-white/50 border border-white/[0.06]" class="text-[10px] px-2 py-0.5 rounded-full bg-white/10 text-white/50 border border-white/6"
> >
{#if $osuStream} {#if $osuStream}
{releaseStreamToReadable($osuStream)} {releaseStreamToReadable($osuStream)}
@@ -1273,7 +1273,7 @@
{/if} {/if}
</span> </span>
<span <span
class="text-[10px] px-2 py-0.5 rounded-full bg-white/10 text-white/50 font-mono border border-white/[0.06]" class="text-[10px] px-2 py-0.5 rounded-full bg-white/10 text-white/50 font-mono border border-white/6"
> >
{#if $osuBuild} {#if $osuBuild}
{$osuBuild} {$osuBuild}
@@ -1335,7 +1335,7 @@
onValueChange={updateGamemode} onValueChange={updateGamemode}
> >
<Select.Trigger <Select.Trigger
class="border-theme-800/90 bg-theme-900/90 hover:bg-theme-800/90 !text-muted-foreground font-semibold" class="border-theme-800/90 bg-theme-900/90 hover:bg-theme-800/90 text-muted-foreground! font-semibold"
> >
<div class="flex flex-row items-center gap-2"> <div class="flex flex-row items-center gap-2">
{#if selectedMode === 0} {#if selectedMode === 0}
@@ -1513,7 +1513,7 @@
</div> </div>
{:else if selectedView === 'settings'} {:else if selectedView === 'settings'}
<div <div
class="h-[100vh] w-full flex flex-col items-center justify-center bg-black/20 backdrop-blur-sm" class="h-screen w-full flex flex-col items-center justify-center bg-black/20 backdrop-blur-sm"
in:fly={{ in:fly={{
duration: $reduceAnimations ? 0 : 400, duration: $reduceAnimations ? 0 : 400,
delay: $reduceAnimations ? 0 : 400, delay: $reduceAnimations ? 0 : 400,
@@ -1527,7 +1527,7 @@
<Label class="text-sm" for="setting-patch">Patching</Label> <Label class="text-sm" for="setting-patch">Patching</Label>
<div class="text-muted-foreground text-xs"> <div class="text-muted-foreground text-xs">
Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<span Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<span
class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg !text-[0.55rem]" class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg text-[0.55rem]!"
>currently only on windows!</span >currently only on windows!</span
> >
{/if} {/if}
@@ -1717,7 +1717,7 @@
}} }}
> >
<Select.Trigger <Select.Trigger
class="border-theme-800 bg-theme-950 !text-muted-foreground font-semibold" class="border-theme-800 bg-theme-950 text-muted-foreground! font-semibold"
> >
<div class="flex flex-row items-center gap-2 font-normal text-foreground"> <div class="flex flex-row items-center gap-2 font-normal text-foreground">
{$launcherStream} {$launcherStream}
@@ -1739,7 +1739,7 @@
</div> </div>
{:else if selectedView === 'login'} {:else if selectedView === 'login'}
<div <div
class="h-[100vh] w-full flex flex-col items-center justify-center bg-black/20 backdrop-blur-sm" class="h-screen w-full flex flex-col items-center justify-center bg-black/20 backdrop-blur-sm"
in:fly={{ in:fly={{
duration: $reduceAnimations ? 0 : 400, duration: $reduceAnimations ? 0 : 400,
delay: $reduceAnimations ? 0 : 400, delay: $reduceAnimations ? 0 : 400,
@@ -1790,7 +1790,7 @@
</div> </div>
{:else if selectedView === 'themes'} {:else if selectedView === 'themes'}
<div <div
class="h-[100vh] w-full flex flex-col items-center bg-black/20 backdrop-blur-sm" class="h-screen w-full flex flex-col items-center bg-black/20 backdrop-blur-sm"
in:fly={{ in:fly={{
duration: $reduceAnimations ? 0 : 400, duration: $reduceAnimations ? 0 : 400,
delay: $reduceAnimations ? 0 : 400, delay: $reduceAnimations ? 0 : 400,
@@ -1806,7 +1806,7 @@
class="group overflow-hidden rounded-3xl border {$active_custom_theme && class="group overflow-hidden rounded-3xl border {$active_custom_theme &&
$active_custom_theme.folder_name === theme.folder_name $active_custom_theme.folder_name === theme.folder_name
? 'border-primary' ? 'border-primary'
: 'border-theme-800'} bg-theme-950 transition hover:border-white/20 h-[295px]" : 'border-theme-800'} bg-theme-950 transition hover:border-white/20 h-73.75"
> >
<img <img
src={theme.preview || DefaultThemePreview} src={theme.preview || DefaultThemePreview}
@@ -1879,7 +1879,7 @@
</Button> </Button>
{#if theme.status === 'installed' && theme.updateAvailable} {#if theme.status === 'installed' && theme.updateAvailable}
<Button <Button
class="min-w-[40px]" class="min-w-10"
size="icon" size="icon"
variant="secondary" variant="secondary"
onclick={async () => { onclick={async () => {
@@ -1903,7 +1903,7 @@
{/if} {/if}
{#if (theme.status === 'installed' || theme.status === 'deleting') && $active_custom_theme && $active_custom_theme.folder_name !== theme.folder_name && theme.name !== 'Default'} {#if (theme.status === 'installed' || theme.status === 'deleting') && $active_custom_theme && $active_custom_theme.folder_name !== theme.folder_name && theme.name !== 'Default'}
<Button <Button
class="min-w-[40px]" class="min-w-10"
size="icon" size="icon"
variant="destructive" variant="destructive"
disabled={theme.status !== 'installed'} disabled={theme.status !== 'installed'}
+1 -1
View File
@@ -241,7 +241,7 @@
}); });
</script> </script>
<div class="flex flex-col items-center justify-center h-[100vh] w-full z-10"> <div class="flex flex-col items-center justify-center h-screen w-full z-10">
<div class="relative w-80 h-80 flex items-center justify-center z-10"> <div class="relative w-80 h-80 flex items-center justify-center z-10">
<svg <svg
class="absolute top-0 left-0 w-full h-full animate-spin" class="absolute top-0 left-0 w-full h-full animate-spin"
+4 -5
View File
@@ -134,7 +134,7 @@
</script> </script>
{#if wizardFinished} {#if wizardFinished}
<div class="relative flex flex-col items-center justify-center h-[100vh] z-50"> <div class="relative flex flex-col items-center justify-center h-screen z-50">
<div class="absolute h-fit w-fit top-1/2 left-1/2"> <div class="absolute h-fit w-fit top-1/2 left-1/2">
<Confetti amount={200} y={[-1, 1.5]} x={[-2.3, 2.3]} colorArray={['#C6A0F3']} /> <Confetti amount={200} y={[-1, 1.5]} x={[-2.3, 2.3]} colorArray={['#C6A0F3']} />
</div> </div>
@@ -143,7 +143,7 @@
<Button class="mt-4" onclick={saveConfig}>Finish</Button> <Button class="mt-4" onclick={saveConfig}>Finish</Button>
</div> </div>
{:else} {:else}
<div class="grid grid-cols-[0.41fr_1fr] h-[100vh] z-50"> <div class="grid grid-cols-[0.41fr_1fr] h-screen z-50">
<div <div
class="w-full h-full border-r border-black/40 bg-black/40 backdrop-blur-md flex flex-col gap-6 p-3 z-50" class="w-full h-full border-r border-black/40 bg-black/40 backdrop-blur-md flex flex-col gap-6 p-3 z-50"
> >
@@ -156,8 +156,7 @@
: 'border-black/30 bg-black/30'} rounded-lg p-2 transition-all" : 'border-black/30 bg-black/30'} rounded-lg p-2 transition-all"
> >
<div <div
class="flex flex-col items-center justify-center h-8 w-8 border-[2px] {selectedStep > class="flex flex-col items-center justify-center h-8 w-8 border-2 {selectedStep > i + 1
i + 1
? 'border-green-600' ? 'border-green-600'
: 'border-theme-600'} rounded-full" : 'border-theme-600'} rounded-full"
> >
@@ -268,7 +267,7 @@
<Label class="text-sm" for="setting-patch">Patching</Label> <Label class="text-sm" for="setting-patch">Patching</Label>
<div class="text-muted-foreground text-xs"> <div class="text-muted-foreground text-xs">
Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<span Shows misses in Relax and Autopilot {#if $platform !== 'windows'}<span
class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg !text-[0.55rem]" class="text-red-500 bg-red-800/20 border border-red-600/20 p-0.5 mx-1 px-2 rounded-lg text-[0.55rem]!"
>currently only on windows!</span >currently only on windows!</span
> >
{/if} {/if}