Added skeleton name display on dialog

This commit is contained in:
Alexis
2024-08-24 19:06:21 +02:00
parent 69b294dcf6
commit 3c8a018066
3 changed files with 59 additions and 37 deletions

View File

@@ -0,0 +1,32 @@
<script lang="ts" setup>
import type { World } from '~/models/World';
defineProps<{
world: World,
modalState?: boolean
}>()
const calendarSkeletonName = ref<string>('')
function onChangedName(newName: string) {
calendarSkeletonName.value = newName
}
</script>
<template>
<UiAlertDialog :open="modalState">
<UiAlertDialogContent class="grid grid-rows-[auto_1fr_auto] items-start min-h-[66vh] max-w-4xl gap-6">
<UiAlertDialogTitle>
<span class="text-2xl">
<strong class="font-bold">{{ world.name }}</strong>
<span v-if="calendarSkeletonName">
{{ calendarSkeletonName }}
</span>
<span v-else>Nouveau calendrier</span>
</span>
</UiAlertDialogTitle>
<CalendarFormCreate @changed-name="onChangedName" />
</UiAlertDialogContent>
</UiAlertDialog>
</template>