Compare commits
3 Commits
428ead8525
...
ccb755603e
Author | SHA1 | Date | |
---|---|---|---|
ccb755603e | |||
b4814b57cf | |||
47558bdd62 |
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,19 +1,20 @@
|
|||||||
<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
6
src/lib/types.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
export type EZPPUser = {
|
||||||
|
id: number;
|
||||||
|
donor: boolean;
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
};
|
Reference in New Issue
Block a user