Fixed 404 pages
This commit is contained in:
@@ -40,6 +40,7 @@ export default defineI18nConfig(() => ({
|
|||||||
},
|
},
|
||||||
greeting: "Connected as {user}",
|
greeting: "Connected as {user}",
|
||||||
anonymousGreeting: "Preferences",
|
anonymousGreeting: "Preferences",
|
||||||
|
backToProfile: "Back to profile",
|
||||||
sidebarMenu: {
|
sidebarMenu: {
|
||||||
profile: "Profile",
|
profile: "Profile",
|
||||||
appearance: "Appearance",
|
appearance: "Appearance",
|
||||||
@@ -80,6 +81,9 @@ export default defineI18nConfig(() => ({
|
|||||||
nameSingular: "World",
|
nameSingular: "World",
|
||||||
namePlural: "Worlds",
|
namePlural: "Worlds",
|
||||||
addSingle: "Add a world",
|
addSingle: "Add a world",
|
||||||
|
notFound: "World not found",
|
||||||
|
notFoundDescription: "The link is not valid or the world has been deleted / archived.",
|
||||||
|
backToList: "Go back to worlds",
|
||||||
createDialog: {
|
createDialog: {
|
||||||
title: "Create a world",
|
title: "Create a world",
|
||||||
subtitle: "Worlds are the building blocks which hold all your characters, your calendars…"
|
subtitle: "Worlds are the building blocks which hold all your characters, your calendars…"
|
||||||
@@ -101,6 +105,7 @@ export default defineI18nConfig(() => ({
|
|||||||
notFound: "Calendar not found",
|
notFound: "Calendar not found",
|
||||||
notFoundDescription: "The link is not valid or the calendar has been deleted / archived.",
|
notFoundDescription: "The link is not valid or the calendar has been deleted / archived.",
|
||||||
notFoundForWorld: "No calendar for this world… yet !",
|
notFoundForWorld: "No calendar for this world… yet !",
|
||||||
|
backToList: "Go back to calendars",
|
||||||
isLoading: "Calendar is loading…",
|
isLoading: "Calendar is loading…",
|
||||||
hasXEvents: "This calendar has {count} public events",
|
hasXEvents: "This calendar has {count} public events",
|
||||||
date: {
|
date: {
|
||||||
@@ -278,6 +283,7 @@ export default defineI18nConfig(() => ({
|
|||||||
},
|
},
|
||||||
greeting: "Connecté en tant que {user}",
|
greeting: "Connecté en tant que {user}",
|
||||||
anonymousGreeting: "Préférences",
|
anonymousGreeting: "Préférences",
|
||||||
|
backToProfile: "Retour au profil",
|
||||||
sidebarMenu: {
|
sidebarMenu: {
|
||||||
profile: "Profil",
|
profile: "Profil",
|
||||||
appearance: "Apparence",
|
appearance: "Apparence",
|
||||||
@@ -318,6 +324,9 @@ export default defineI18nConfig(() => ({
|
|||||||
nameSingular: "Monde",
|
nameSingular: "Monde",
|
||||||
namePlural: "Mondes",
|
namePlural: "Mondes",
|
||||||
addSingle: "Ajouter un monde",
|
addSingle: "Ajouter un monde",
|
||||||
|
notFound: "Aucun monde trouvé",
|
||||||
|
notFoundDescription: "Le lien n'est pas valide ou le monde a été supprimé / archivé.",
|
||||||
|
backToList: "Retourner aux mondes",
|
||||||
createDialog: {
|
createDialog: {
|
||||||
title: "Créer un monde",
|
title: "Créer un monde",
|
||||||
subtitle: "Un monde est la brique de base qui contient vos personnages, vos calendriers…"
|
subtitle: "Un monde est la brique de base qui contient vos personnages, vos calendriers…"
|
||||||
@@ -339,6 +348,7 @@ export default defineI18nConfig(() => ({
|
|||||||
notFound: "Aucun calendrier trouvé",
|
notFound: "Aucun calendrier trouvé",
|
||||||
notFoundDescription: "Le lien n'est pas valide ou le calendrier a été supprimé / archivé.",
|
notFoundDescription: "Le lien n'est pas valide ou le calendrier a été supprimé / archivé.",
|
||||||
notFoundForWorld: "Aucun calendrier pour ce monde… pour l'instant !",
|
notFoundForWorld: "Aucun calendrier pour ce monde… pour l'instant !",
|
||||||
|
backToList: "Retourner aux calendriers",
|
||||||
isLoading: "Chargement du calendrier…",
|
isLoading: "Chargement du calendrier…",
|
||||||
hasXEvents: "Ce calendrier contient {count} évènements publiques",
|
hasXEvents: "Ce calendrier contient {count} évènements publiques",
|
||||||
date: {
|
date: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PhCalendarX, PhCircleNotch } from "@phosphor-icons/vue";
|
import { PhArrowBendDoubleUpLeft, PhCalendarX, PhCircleNotch } from "@phosphor-icons/vue";
|
||||||
import type { Calendar } from "~/models/CalendarConfig";
|
import type { Calendar } from "~/models/CalendarConfig";
|
||||||
import type { Category } from "~/models/Category";
|
import type { Category } from "~/models/Category";
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ watch(user, () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="calendar && categories" class="h-full w-full">
|
<div v-else-if="calendar?.data && categories?.data" class="h-full w-full">
|
||||||
<Head>
|
<Head>
|
||||||
<Title>{{ calendar.data.name }}</Title>
|
<Title>{{ calendar.data.name }}</Title>
|
||||||
</Head>
|
</Head>
|
||||||
@@ -75,6 +75,14 @@ watch(user, () => {
|
|||||||
<p>
|
<p>
|
||||||
{{ $t('entity.calendar.notFoundDescription') }}
|
{{ $t('entity.calendar.notFoundDescription') }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<UiButton variant="default" class="mt-4 gap-2" as-child>
|
||||||
|
<RouterLink to="/explore">
|
||||||
|
<PhArrowBendDoubleUpLeft size="24" />
|
||||||
|
|
||||||
|
{{ $t('entity.calendar.backToList') }}
|
||||||
|
</RouterLink>
|
||||||
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
<script lang="ts" setup></script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<main class="p-8">
|
|
||||||
<Head>
|
|
||||||
<Title>{{ $t("entity.world.namePlural") }}</Title>
|
|
||||||
</Head>
|
|
||||||
|
|
||||||
<Heading level="h1">Calendriers publics</Heading>
|
|
||||||
</main>
|
|
||||||
</template>
|
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Calendar } from "~/models/CalendarConfig";
|
import type { Calendar } from "~/models/CalendarConfig";
|
||||||
|
|
||||||
const { data } = await useFetch("/api/calendars/query", { key: "explore-calendars" })
|
const { data: availableCalendars } = await useLazyFetch<{ data: Calendar[] }>("/api/calendars/query", { key: "explore-calendars" })
|
||||||
|
|
||||||
const availableCalendars = data.value?.data as Calendar[]
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -22,8 +20,8 @@ const availableCalendars = data.value?.data as Calendar[]
|
|||||||
{{ $t("entity.calendar.namePublicPlural") }}
|
{{ $t("entity.calendar.namePublicPlural") }}
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|
||||||
<ul v-if="availableCalendars && availableCalendars?.length > 0" class="grid md:grid-cols-3 gap-2">
|
<ul v-if="availableCalendars?.data" class="grid md:grid-cols-3 gap-2">
|
||||||
<li v-for="calendar in availableCalendars" :key="calendar.shortId">
|
<li v-for="calendar in availableCalendars.data" :key="calendar.shortId">
|
||||||
<UiCard
|
<UiCard
|
||||||
class="w-full transition-all hover:bg-slate-50 dark:bg-gray-950 dark:hover:bg-indigo-950 dark:focus-within:outline-gray-900"
|
class="w-full transition-all hover:bg-slate-50 dark:bg-gray-950 dark:hover:bg-indigo-950 dark:focus-within:outline-gray-900"
|
||||||
:link="`/calendars/${calendar.shortId}`"
|
:link="`/calendars/${calendar.shortId}`"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PhCircleNotch } from "@phosphor-icons/vue";
|
import { PhArrowBendDoubleUpLeft, PhCalendarX, PhCircleNotch } from "@phosphor-icons/vue";
|
||||||
import type { Calendar } from "~/models/CalendarConfig";
|
import type { Calendar } from "~/models/CalendarConfig";
|
||||||
import type { Category } from "~/models/Category";
|
import type { Category } from "~/models/Category";
|
||||||
|
|
||||||
@@ -56,11 +56,36 @@ const isLoading = computed(() => calendarStatus.value === "pending" || categorie
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="calendar && categories" class="h-full w-full">
|
<div v-else-if="calendar?.data && categories?.data" class="h-full w-full">
|
||||||
<Head>
|
<Head>
|
||||||
<Title>{{ calendar.data.name }}</Title>
|
<Title>{{ calendar.data.name }}</Title>
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<Calendar :calendar-data="calendar.data" :categories="categories.data" />
|
<Calendar :calendar-data="calendar.data" :categories="categories.data" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
|
<div v-else class="h-full w-full grid place-items-center">
|
||||||
|
<Head>
|
||||||
|
<Title>{{ $t("entity.calendar.notFound") }}</Title>
|
||||||
|
</Head>
|
||||||
|
|
||||||
|
<div class="grid justify-items-center opacity-80">
|
||||||
|
<PhCalendarX size="75" class="opacity-60" />
|
||||||
|
|
||||||
|
<Heading level="h1">
|
||||||
|
{{ $t("entity.calendar.notFound") }}
|
||||||
|
</Heading>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ $t('entity.calendar.notFoundDescription') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<UiButton variant="default" class="mt-4 gap-2" as-child>
|
||||||
|
<RouterLink to="/my">
|
||||||
|
<PhArrowBendDoubleUpLeft size="24" />
|
||||||
|
|
||||||
|
{{ $t('entity.calendar.backToList') }}
|
||||||
|
</RouterLink>
|
||||||
|
</UiButton>
|
||||||
|
</div>
|
||||||
|
</div></template>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import type { RealtimeChannel } from "@supabase/supabase-js"
|
import type { RealtimeChannel } from "@supabase/supabase-js"
|
||||||
import type { World } from "~/models/World";
|
import type { World } from "~/models/World";
|
||||||
import type { Calendar } from "~/models/CalendarConfig";
|
import type { Calendar } from "~/models/CalendarConfig";
|
||||||
import { PhPlus, PhTrash } from "@phosphor-icons/vue";
|
import { PhArrowBendDoubleUpLeft, PhGlobeHemisphereWest, PhPlus, PhTrash } from "@phosphor-icons/vue";
|
||||||
|
|
||||||
const supabase = useSupabaseClient()
|
const supabase = useSupabaseClient()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -112,7 +112,7 @@ function hideDeleteModal() {
|
|||||||
{{ $t('entity.isLoading') }}
|
{{ $t('entity.isLoading') }}
|
||||||
</Heading>
|
</Heading>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="world">
|
<template v-else-if="world?.data">
|
||||||
<Head>
|
<Head>
|
||||||
<Title>{{ world.data.name }}</Title>
|
<Title>{{ world.data.name }}</Title>
|
||||||
</Head>
|
</Head>
|
||||||
@@ -180,7 +180,31 @@ function hideDeleteModal() {
|
|||||||
<CalendarDialogDelete :calendar="markedCalendar" :modal-state="isDeleteCalendarModalOpen" @on-close="hideDeleteModal" />
|
<CalendarDialogDelete :calendar="markedCalendar" :modal-state="isDeleteCalendarModalOpen" @on-close="hideDeleteModal" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
Not found
|
<div class="h-full w-full grid place-items-center">
|
||||||
|
<Head>
|
||||||
|
<Title>{{ $t("entity.world.notFound") }}</Title>
|
||||||
|
</Head>
|
||||||
|
|
||||||
|
<div class="grid justify-items-center opacity-80">
|
||||||
|
<PhGlobeHemisphereWest size="75" class="opacity-60" weight="fill" />
|
||||||
|
|
||||||
|
<Heading level="h1">
|
||||||
|
{{ $t("entity.world.notFound") }}
|
||||||
|
</Heading>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ $t('entity.world.notFoundDescription') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<UiButton variant="default" class="mt-4 gap-2" as-child>
|
||||||
|
<RouterLink to="/my">
|
||||||
|
<PhArrowBendDoubleUpLeft size="24" />
|
||||||
|
|
||||||
|
{{ $t('entity.world.backToList') }}
|
||||||
|
</RouterLink>
|
||||||
|
</UiButton>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user