-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from Dino-Kupinic/develop
- Loading branch information
Showing
28 changed files
with
2,677 additions
and
754 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { computed } from "vue" | ||
import { Handle, type NodeProps, Position } from "@vue-flow/core" | ||
import { type NodeProps } from "@vue-flow/core" | ||
const props = defineProps<NodeProps>() | ||
const x = computed(() => `${Math.round(props.position.x)}px`) | ||
const y = computed(() => `${Math.round(props.position.y)}px`) | ||
defineProps<NodeProps>() | ||
</script> | ||
|
||
<template> | ||
<div class="vue-flow__node-default"> | ||
<div>{{ data.label }}</div> | ||
|
||
<div>{x} {y}</div> | ||
|
||
<Handle type="source" :position="Position.Bottom" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script setup lang="ts"> | ||
const isOpenConfirm = defineModel<boolean>() | ||
defineEmits<{ | ||
confirm: () => void | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<UModal v-model="isOpenConfirm" :ui="{ width: 'w-full sm:max-w-md' }"> | ||
<UCard | ||
:ui="{ | ||
divide: 'divide-y divide-gray-100 dark:divide-gray-800', | ||
body: { | ||
padding: 'px-4 py-5 sm:p-6', | ||
}, | ||
header: { | ||
padding: 'px-4 py-3 sm:px-6', | ||
}, | ||
footer: { | ||
padding: 'px-4 py-3 sm:px-6', | ||
}, | ||
}" | ||
> | ||
<template #header> | ||
<strong> Bestätigung </strong> | ||
</template> | ||
|
||
<slot /> | ||
|
||
<template #footer> | ||
<div class="flex items-center gap-2"> | ||
<UButton | ||
variant="soft" | ||
size="xs" | ||
color="yellow" | ||
@click="$emit('confirm')" | ||
label="Bestätigen" | ||
/> | ||
<UButton | ||
color="gray" | ||
size="xs" | ||
@click="isOpenConfirm = false" | ||
label="Abbrechen" | ||
/> | ||
</div> | ||
</template> | ||
</UCard> | ||
</UModal> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<script setup lang="ts"> | ||
import type { Enums } from "~/types/database.types" | ||
defineProps<{ | ||
schema: any | ||
state: any | ||
}>() | ||
const sports: Enums<"sport_type">[] = ["Fußball", "Basketball", "Volleyball"] | ||
const client = useSupabaseClient() | ||
const { data } = await client.storage.from("images").list("tournament") | ||
const thumbnails = computed(() => { | ||
const temp = data?.filter((image) => image.name !== ".emptyFolderPlaceholder") | ||
return temp?.map((image) => `/tournament/${image.name}`) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<UForm :schema="schema" :state="state" class="pt-2" :validate-on="[]"> | ||
<div class="flex h-full w-full justify-between gap-6"> | ||
<div class="flex w-[28rem] flex-col gap-3"> | ||
<div class="flex space-x-3"> | ||
<UFormGroup label="Name" name="name" class="grow" required> | ||
<UInput | ||
v-model="state.name" | ||
placeholder="Fußball Turnier 2024/25" | ||
/> | ||
</UFormGroup> | ||
<UFormGroup label="Sportart" name="sport" required> | ||
<USelect | ||
v-model="state.sport" | ||
placeholder="Sport auswählen" | ||
:options="sports" | ||
class="w-40" | ||
/> | ||
</UFormGroup> | ||
</div> | ||
|
||
<UFormGroup class="grow" label="Ort" name="location" required> | ||
<UInput v-model="state.location" /> | ||
</UFormGroup> | ||
|
||
<UFormGroup label="Regeln" name="rules"> | ||
<UTextarea | ||
v-model="state.rules" | ||
:rows="4" | ||
placeholder="Lorem Ipsum..." | ||
/> | ||
</UFormGroup> | ||
|
||
<div | ||
class="flex flex-col gap-3 rounded-md border border-gray-200 p-3 dark:border-gray-700" | ||
> | ||
<UFormGroup | ||
label="Startdatum" | ||
name="start_date" | ||
description="An diesem Datum findet das Turnier statt." | ||
required | ||
> | ||
<UInput v-model="state.start_date" type="date" /> | ||
</UFormGroup> | ||
|
||
<div class="flex space-x-3"> | ||
<UFormGroup label="Von" name="from" required class="grow"> | ||
<UInput v-model="state.from" type="time" :step="2" /> | ||
</UFormGroup> | ||
|
||
<UFormGroup label="Bis" name="to" required class="grow"> | ||
<UInput v-model="state.to" type="time" :step="2" /> | ||
</UFormGroup> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="flex flex-col gap-3"> | ||
<UFormGroup | ||
label="Vorschaubild" | ||
name="thumbnail_path" | ||
description="Ein Bild für das Turnier." | ||
required | ||
> | ||
<USelectMenu | ||
v-model="state.thumbnail_path" | ||
:options="thumbnails" | ||
placeholder="Bild auswählen" | ||
> | ||
<template #option="{ option }"> | ||
<span class="font-mono text-xs">{{ option }}</span> | ||
</template> | ||
</USelectMenu> | ||
</UFormGroup> | ||
<p class="text-xs text-gray-500"> | ||
Keine Bilder? Lade eins hoch in | ||
<NuxtLink to="/gallery"> | ||
<span class="text-primary-500">Galerie</span> | ||
<UIcon | ||
name="i-heroicons-arrow-up-right" | ||
class="text-primary-500 ml-0.5 pt-1" | ||
size="10" | ||
/> | ||
</NuxtLink> | ||
</p> | ||
<UFormGroup label="Preise"> | ||
<div | ||
class="flex flex-col gap-3 rounded-md bg-gray-50 p-3 dark:bg-gray-800" | ||
> | ||
<UFormGroup label="Erster Platz" name="prizes.first"> | ||
<UInput v-model="state.prizes.first" placeholder="Pokal" /> | ||
</UFormGroup> | ||
<div class="flex space-x-3"> | ||
<UFormGroup label="Zweiter Platz" name="prizes.second"> | ||
<UInput | ||
v-model="state.prizes.second" | ||
placeholder="Silver Medaille" | ||
/> | ||
</UFormGroup> | ||
<UFormGroup label="Dritter Platz" name="prizes.third"> | ||
<UInput | ||
v-model="state.prizes.third" | ||
placeholder="Bronze Medaille" | ||
/> | ||
</UFormGroup> | ||
</div> | ||
<UFormGroup label="Sonstiges" name="prizes.bonus"> | ||
<UTextarea | ||
v-model="state.prizes.bonus" | ||
:rows="5" | ||
placeholder="Eis, Frankfurter, etc." | ||
/> | ||
</UFormGroup> | ||
</div> | ||
</UFormGroup> | ||
</div> | ||
</div> | ||
</UForm> | ||
</template> |
Oops, something went wrong.