Added more translations to meta and delete modals
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
<script lang="ts" setup>
|
||||
useHead({
|
||||
title: "TTTools — Calendriers de JDR",
|
||||
titleTemplate: null
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="p-8">
|
||||
<Head>
|
||||
<Title>
|
||||
TTTools — {{ $t('head.title') }}
|
||||
</Title>
|
||||
<Meta name="description" :content="$t('head.description')" />
|
||||
</Head>
|
||||
|
||||
<Heading>TTTools</Heading>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -23,27 +23,25 @@ const { data: catData, pending: catPending } = await useLazyFetch("/api/calendar
|
||||
|
||||
const cal = computed<Calendar>(() => calendarData?.value?.data as Calendar)
|
||||
const categories = computed<Category[]>(() => catData?.value?.data as Category[])
|
||||
|
||||
if (cal.value) {
|
||||
useHead({
|
||||
title: cal.value.name
|
||||
})
|
||||
}
|
||||
|
||||
watch(cal, (n) => {
|
||||
useHead({
|
||||
title: n.name
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="calPending || catPending" class="h-full w-full grid place-items-center">
|
||||
<Head>
|
||||
<Title>{{ $t("entity.calendar.nameSingular") }}</Title>
|
||||
</Head>
|
||||
|
||||
<div class="grid gap-2 justify-items-center opacity-50">
|
||||
<p>Chargement du calendrier</p>
|
||||
<PhCircleNotch size="50" class="animate-spin"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Calendar v-else-if="cal && categories" :calendar-data="cal" :categories />
|
||||
<div v-else-if="cal && categories" class="h-full w-full">
|
||||
<Head>
|
||||
<Title>{{ cal.name }}</Title>
|
||||
</Head>
|
||||
|
||||
<Calendar :calendar-data="cal" :categories />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
import type { RealtimeChannel } from "@supabase/supabase-js"
|
||||
import type { World } from "~/models/World";
|
||||
|
||||
useHead({
|
||||
title: "Mondes"
|
||||
})
|
||||
|
||||
const supabase = useSupabaseClient()
|
||||
|
||||
const { data: res } = await useFetch("/api/worlds/query")
|
||||
@@ -85,12 +81,16 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="p-8 after:fill-red-400">
|
||||
<main class="p-8 after:fill-red-400">
|
||||
<Head>
|
||||
<Title>{{ $t("entity.world.namePlural") }}</Title>
|
||||
</Head>
|
||||
|
||||
<Heading>{{ user?.user_metadata.full_name }}</Heading>
|
||||
|
||||
<section v-if="worlds" class="mt-4">
|
||||
<h2 class="mb-4 text-lg font-bold">
|
||||
Mondes
|
||||
{{ $t('entity.world.namePlural') }}
|
||||
</h2>
|
||||
|
||||
<ul class="grid lg:grid-cols-2 gap-2">
|
||||
|
||||
@@ -12,20 +12,6 @@ const { data: res, pending } = await useFetch("/api/worlds/query", { query: { id
|
||||
|
||||
const world = ref<World>(res.value?.data as World)
|
||||
|
||||
if (world.value) {
|
||||
useHead({
|
||||
title: world.value.name
|
||||
})
|
||||
}
|
||||
|
||||
watch(world, (n) => {
|
||||
if (n) {
|
||||
useHead({
|
||||
title: n.name
|
||||
})
|
||||
}
|
||||
}, { deep: true })
|
||||
|
||||
definePageMeta({
|
||||
middleware: ["auth-guard"]
|
||||
})
|
||||
@@ -116,9 +102,17 @@ function hideDeleteModal() {
|
||||
<template>
|
||||
<main class="p-8">
|
||||
<template v-if="pending">
|
||||
<Head>
|
||||
<Title>{{ $t("entity.world.namePlural") }}</Title>
|
||||
</Head>
|
||||
|
||||
<Heading>Chargement...</Heading>
|
||||
</template>
|
||||
<template v-else-if="world">
|
||||
<Head>
|
||||
<Title>{{ world.name }}</Title>
|
||||
</Head>
|
||||
|
||||
<header class="lg:w-1/2 mb-8">
|
||||
<Spacing>
|
||||
<Heading>{{ world.name }}</Heading>
|
||||
@@ -130,7 +124,9 @@ function hideDeleteModal() {
|
||||
<section>
|
||||
<Spacing size="lg">
|
||||
<div class="flex items-center gap-3">
|
||||
<Heading>Calendriers</Heading>
|
||||
<Heading>
|
||||
{{ $t('entity.calendar.namePlural') }}
|
||||
</Heading>
|
||||
|
||||
<UiTooltipProvider :delay-duration="250">
|
||||
<UiTooltip>
|
||||
@@ -140,7 +136,9 @@ function hideDeleteModal() {
|
||||
</UiButton>
|
||||
</UiTooltipTrigger>
|
||||
<UiTooltipContent :side-offset="10">
|
||||
<p>Ajouter un calendrier</p>
|
||||
<p>
|
||||
{{ $t('entity.calendar.addSingle') }}
|
||||
</p>
|
||||
</UiTooltipContent>
|
||||
</UiTooltip>
|
||||
</UiTooltipProvider>
|
||||
@@ -168,7 +166,7 @@ function hideDeleteModal() {
|
||||
</ul>
|
||||
<template v-else>
|
||||
<p class="pl-6 opacity-75 italic">
|
||||
Aucun calendrier pour ce monde
|
||||
{{ $t('entity.calendar.notFoundForWorld') }}
|
||||
</p>
|
||||
</template>
|
||||
</Spacing>
|
||||
|
||||
Reference in New Issue
Block a user