From 008ec4fcef7748ab68db6af066ad365a1f0e7a0c Mon Sep 17 00:00:00 2001 From: Alexis <35.alexis.pele@gmail.com> Date: Fri, 14 Jun 2024 21:48:39 +0200 Subject: [PATCH] Changed views data --- components/calendar/Calendar.vue | 8 ++-- components/calendar/input/EventCategories.vue | 4 -- components/global/Spacing.vue | 27 ++++++++++++- components/ui/progress/Progress.vue | 39 +++++++++++++++++++ components/ui/progress/index.ts | 1 + pages/i/index.vue | 2 +- pages/i/world/[id]/index.vue | 38 ++++++++++-------- server/api/worlds/query.get.ts | 2 + 8 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 components/ui/progress/Progress.vue create mode 100644 components/ui/progress/index.ts diff --git a/components/calendar/Calendar.vue b/components/calendar/Calendar.vue index 810c6c8..09f93b1 100644 --- a/components/calendar/Calendar.vue +++ b/components/calendar/Calendar.vue @@ -2,7 +2,7 @@ import { useCalendar } from '@/stores/CalendarStore' import { computed, type Component, type ComputedRef } from 'vue' -import { PhCircleNotch, PhMagnifyingGlass } from '@phosphor-icons/vue' +import { PhMagnifyingGlass } from '@phosphor-icons/vue' import MonthlyLayout from './state/monthly/Layout.vue' import CenturyLayout from './state/centennially/Layout.vue' import DecadeLayout from './state/decennially/Layout.vue' @@ -88,6 +88,8 @@ watch(charPending, (newStatus) => { } }) +const progressPercent = computed(() => 100 / [charPending.value, calPending.value, categoryPending.value].filter(Boolean).length) + const currentViewComponent: ComputedRef = computed(() => { switch (currentConfig.viewType) { case 'month': @@ -124,8 +126,8 @@ onMounted(() => {
-
- +
+

Chargement en cours…

diff --git a/components/calendar/input/EventCategories.vue b/components/calendar/input/EventCategories.vue index cfb4bb9..9496960 100644 --- a/components/calendar/input/EventCategories.vue +++ b/components/calendar/input/EventCategories.vue @@ -1,5 +1,4 @@ + diff --git a/components/ui/progress/Progress.vue b/components/ui/progress/Progress.vue new file mode 100644 index 0000000..bed64a6 --- /dev/null +++ b/components/ui/progress/Progress.vue @@ -0,0 +1,39 @@ + + + diff --git a/components/ui/progress/index.ts b/components/ui/progress/index.ts new file mode 100644 index 0000000..eace989 --- /dev/null +++ b/components/ui/progress/index.ts @@ -0,0 +1 @@ +export { default as Progress } from './Progress.vue' diff --git a/pages/i/index.vue b/pages/i/index.vue index 7f37283..a383967 100644 --- a/pages/i/index.vue +++ b/pages/i/index.vue @@ -34,7 +34,7 @@ setCurrentMenu([]) Mondes -
    +
    • -
        -
      • - - - {{ calendar.name }} +
        + + Calendriers - -

        {{ calendar.events }}

        -
        - - -
      • -
      +
        +
      • + + + {{ calendar.name }} + + + +

        Description future (ou alors des informations sur le nb d'évènements)

        +
        +
        +
      • +
      + + diff --git a/server/api/worlds/query.get.ts b/server/api/worlds/query.get.ts index 4e81048..603dae8 100644 --- a/server/api/worlds/query.get.ts +++ b/server/api/worlds/query.get.ts @@ -23,6 +23,8 @@ export default defineEventHandler(async (event) => { } if (query.id) { + // const eventNb = await client.from('worlds').select('events:calendars(calendar_events(id))').order('events_count') + return output.eq('id', query.id).single() }