2026-10-28 16:57:43 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
const { t } = useI18n()
|
|
|
|
|
const notices = useNotices()
|
|
|
|
|
|
2026-10-28 18:04:21 +00:00
|
|
|
const toastTone = {
|
2026-10-28 19:22:53 +00:00
|
|
|
success: 'border-moss-700 bg-parchment-50 text-moss-700',
|
|
|
|
|
error: 'border-blood-700 bg-[#f0d6c8] text-blood-800',
|
|
|
|
|
warning: 'border-gold-600 bg-parchment-50 text-wood-900',
|
|
|
|
|
info: 'border-wood-700 bg-parchment-50 text-ink-900',
|
2026-10-28 18:04:21 +00:00
|
|
|
}
|
|
|
|
|
|
2026-10-28 16:57:43 +00:00
|
|
|
useHead({ title: () => t('app.title') })
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-10-28 23:38:54 +00:00
|
|
|
<!-- Pages pick their frame: `game` inside a world (village, map, reports), `default` outside. -->
|
2026-10-28 16:57:43 +00:00
|
|
|
<template>
|
2026-10-28 23:38:54 +00:00
|
|
|
<NuxtLayout>
|
|
|
|
|
<NuxtPage />
|
|
|
|
|
</NuxtLayout>
|
|
|
|
|
|
|
|
|
|
<div class="pointer-events-none fixed inset-x-4 bottom-20 z-50 flex flex-col items-end gap-2 md:bottom-4">
|
|
|
|
|
<TransitionGroup
|
|
|
|
|
enter-from-class="translate-y-2 opacity-0"
|
|
|
|
|
leave-to-class="opacity-0"
|
|
|
|
|
enter-active-class="transition duration-200"
|
|
|
|
|
leave-active-class="transition duration-200"
|
|
|
|
|
>
|
|
|
|
|
<button
|
|
|
|
|
v-for="n in notices.list.value"
|
|
|
|
|
:key="n.id"
|
|
|
|
|
type="button"
|
|
|
|
|
class="pointer-events-auto w-full max-w-sm rounded-sm border-2 px-3 py-2 text-left text-sm shadow-hard"
|
|
|
|
|
:class="toastTone[n.type]"
|
|
|
|
|
@click="notices.dismiss(n.id)"
|
2026-10-28 18:04:21 +00:00
|
|
|
>
|
2026-10-28 23:38:54 +00:00
|
|
|
{{ n.text }}
|
|
|
|
|
</button>
|
|
|
|
|
</TransitionGroup>
|
2026-10-28 16:57:43 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|