3 Commits

3 changed files with 24 additions and 17 deletions

View File

@@ -46,10 +46,10 @@
const deltaX = e.pageX - window.pageXOffset - dragStartX; const deltaX = e.pageX - window.pageXOffset - dragStartX;
const deltaY = e.pageY - window.pageYOffset - dragStartY; const deltaY = e.pageY - window.pageYOffset - dragStartY;
const velocityX = Math.abs(mouseX - lastMouseX); const velocityX = mouseX - lastMouseX;
const velocityY = Math.abs(mouseY - lastMouseY); const velocityY = mouseY - lastMouseY;
if (!applyRotation && isMouseDown && velocityX * velocityX + velocityY * velocityY > 800) { if (!applyRotation && isMouseDown && velocityX * velocityX + velocityY * velocityY > 50) {
applyRotation = true; applyRotation = true;
} }

View File

@@ -1,20 +1,21 @@
<script lang="ts"> <script lang="ts">
import { Toaster as Sonner, type ToasterProps as SonnerProps } from "svelte-sonner"; import { Toaster as Sonner, type ToasterProps as SonnerProps } from 'svelte-sonner';
import { mode } from "mode-watcher"; import { mode } from 'mode-watcher';
let { ...restProps }: SonnerProps = $props(); let { ...restProps }: SonnerProps = $props();
</script> </script>
<Sonner <Sonner
theme={mode.current} theme={mode.current}
class="toaster group" class="toaster group z-[5000]"
toastOptions={{ toastOptions={{
classes: { classes: {
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg", toast:
description: "group-[.toast]:text-muted-foreground", 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground", description: 'group-[.toast]:text-muted-foreground',
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground", actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
}, cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
}} },
{...restProps} }}
{...restProps}
/> />

6
src/lib/types.ts Normal file
View File

@@ -0,0 +1,6 @@
export type EZPPUser = {
id: number;
donor: boolean;
name: string;
email: string;
};