From 72933a46d166e74d1559b3d5cd82ee1dcf6ae88e Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 24 Nov 2024 22:57:21 +0100 Subject: [PATCH] Update --- src/components/Card.svelte | 17 ++-- src/components/DashboardComponent.svelte | 5 +- src/components/EloTable.svelte | 8 +- src/components/FightStatsChart.svelte | 10 +- src/components/FightTable.svelte | 1 + src/components/GroupTable.svelte | 1 + src/components/Link.svelte | 9 +- src/components/Login.svelte | 12 ++- src/components/Navbar.svelte | 15 ++- src/components/SchematicDownload.svelte | 6 +- src/components/SearchComponent.svelte | 12 ++- .../admin/components/ErrorModal.svelte | 12 ++- .../admin/components/FightEditPart.svelte | 70 ++++++++----- .../admin/components/TypeAheadSearch.svelte | 34 ++++--- src/components/admin/pages/Display.svelte | 8 +- src/components/admin/pages/Edit.svelte | 30 +++--- src/components/admin/pages/Event.svelte | 38 ++++--- src/components/admin/pages/Generate.svelte | 22 +++-- src/components/admin/pages/Home.svelte | 30 +++--- src/components/admin/pages/Login.svelte | 48 +++++---- src/components/admin/pages/Perms.svelte | 64 ++++++------ .../admin/pages/display/EventDisplay.svelte | 16 +-- src/components/admin/pages/edit/Editor.svelte | 36 ++++--- .../admin/pages/edit/MDEMarkdownEditor.svelte | 10 +- .../admin/pages/event/EventEdit.svelte | 60 +++++++----- .../admin/pages/event/FightCard.svelte | 26 +++-- .../admin/pages/event/FightList.svelte | 98 +++++++++++-------- .../admin/pages/event/RefereesList.svelte | 28 +++--- .../admin/pages/event/TeamList.svelte | 6 +- .../event/modals/CreateFightModal.svelte | 40 ++++---- .../pages/event/modals/FightEditModal.svelte | 30 +++--- .../admin/pages/generate/DragAcceptor.svelte | 13 ++- .../pages/generate/GroupGenerator.svelte | 64 ++++++------ .../admin/pages/generate/TeamChip.svelte | 17 +++- .../admin/pages/home/CreateEventModal.svelte | 40 +++++--- .../admin/pages/home/EventCard.svelte | 8 +- src/components/dashboard/SchematicInfo.svelte | 12 ++- .../dashboard/SchematicInfoModal.svelte | 12 ++- src/components/dashboard/SchematicList.svelte | 42 +++++--- .../dashboard/SchematicListTile.svelte | 13 ++- src/components/dashboard/Statistics.svelte | 6 +- src/components/dashboard/UploadModal.svelte | 18 ++-- src/components/dashboard/UserInfo.svelte | 10 +- src/components/publics/PublicPreview.svelte | 28 ++++-- src/components/publics/XRayPreview.svelte | 1 + src/components/styled/SWButton.svelte | 14 ++- src/components/styled/SWModal.svelte | 48 ++++++--- src/components/styled/SWPaginator.svelte | 54 ++++++---- 48 files changed, 752 insertions(+), 450 deletions(-) diff --git a/src/components/Card.svelte b/src/components/Card.svelte index ce25512..1d5208b 100644 --- a/src/components/Card.svelte +++ b/src/components/Card.svelte @@ -21,8 +21,7 @@ import {twMerge} from "tailwind-merge"; import {onMount} from "svelte"; - let cardElement: HTMLDivElement; - export let hoverEffect: boolean = true; + let cardElement: HTMLDivElement = $state(); function rotateElement(event: MouseEvent) { if(!hoverEffect) return; @@ -46,12 +45,18 @@ cardElement.style.setProperty('--rotate-y', "0"); } - export let extraClasses: string = ''; - $: classes = twMerge("w-72 border-2 bg-zinc-50 border-gray-100 flex flex-col items-center p-8 m-4 rounded-xl shadow-lg dark:bg-zinc-900 dark:border-gray-800 dark:text-gray-100", extraClasses) + interface Props { + hoverEffect?: boolean; + extraClasses?: string; + children?: import('svelte').Snippet; + } + + let { hoverEffect = true, extraClasses = '', children }: Props = $props(); + let classes = $derived(twMerge("w-72 border-2 bg-zinc-50 border-gray-100 flex flex-col items-center p-8 m-4 rounded-xl shadow-lg dark:bg-zinc-900 dark:border-gray-800 dark:text-gray-100", extraClasses)) -
- +
+ {@render children?.()}