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 deltaY = e.pageY - window.pageYOffset - dragStartY;
const velocityX = Math.abs(mouseX - lastMouseX);
const velocityY = Math.abs(mouseY - lastMouseY);
const velocityX = mouseX - lastMouseX;
const velocityY = mouseY - lastMouseY;
if (!applyRotation && isMouseDown && velocityX * velocityX + velocityY * velocityY > 800) {
if (!applyRotation && isMouseDown && velocityX * velocityX + velocityY * velocityY > 50) {
applyRotation = true;
}

View File

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

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

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