Categories appear on more options
This commit is contained in:
@@ -9,9 +9,11 @@ const { isReadOnly } = storeToRefs(useCalendar())
|
|||||||
<UiTooltipProvider :delay-duration="250">
|
<UiTooltipProvider :delay-duration="250">
|
||||||
<UiTooltip>
|
<UiTooltip>
|
||||||
<UiTooltipTrigger as-child>
|
<UiTooltipTrigger as-child>
|
||||||
|
<ClientOnly>
|
||||||
<UiButton v-if="!isReadOnly" variant="secondary" size="icon" @click="toggleCategoriesModal(true)">
|
<UiButton v-if="!isReadOnly" variant="secondary" size="icon" @click="toggleCategoriesModal(true)">
|
||||||
<PhTag size="20" weight="light" />
|
<PhTag size="20" weight="light" />
|
||||||
</UiButton>
|
</UiButton>
|
||||||
|
</ClientOnly>
|
||||||
</UiTooltipTrigger>
|
</UiTooltipTrigger>
|
||||||
<UiTooltipContent>
|
<UiTooltipContent>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { breakpointsTailwind } from "@vueuse/core"
|
||||||
import { cn } from "~/lib/utils"
|
import { cn } from "~/lib/utils"
|
||||||
import { useCalendar } from "~/stores/CalendarStore"
|
import { useCalendar } from "~/stores/CalendarStore"
|
||||||
import { PhCalendarBlank, PhCheckCircle, PhGear } from "@phosphor-icons/vue"
|
import { PhCalendarBlank, PhCheckCircle, PhDotsThreeVertical, PhGear, PhTag } from "@phosphor-icons/vue"
|
||||||
import { computed } from "vue"
|
|
||||||
|
|
||||||
const { currentConfig, viewTypeOptions, getViewTypeTitle, setViewType } = useCalendar()
|
const breakpoints = useBreakpoints(
|
||||||
|
breakpointsTailwind
|
||||||
|
)
|
||||||
|
|
||||||
|
const { currentConfig, viewTypeOptions, getViewTypeTitle, setViewType, toggleCategoriesModal } = useCalendar()
|
||||||
const viewTypeTitle = computed(() => getViewTypeTitle(currentConfig.viewType))
|
const viewTypeTitle = computed(() => getViewTypeTitle(currentConfig.viewType))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -12,15 +16,29 @@ const viewTypeTitle = computed(() => getViewTypeTitle(currentConfig.viewType))
|
|||||||
<UiDropdownMenu>
|
<UiDropdownMenu>
|
||||||
<UiDropdownMenuTrigger as-child>
|
<UiDropdownMenuTrigger as-child>
|
||||||
<UiButton variant="secondary" size="icon">
|
<UiButton variant="secondary" size="icon">
|
||||||
<PhGear size="20" weight="fill" />
|
<ClientOnly>
|
||||||
|
<PhGear v-if="breakpoints.md.value" size="20" weight="fill" />
|
||||||
|
<PhDotsThreeVertical v-else size="26" weight="bold" />
|
||||||
|
</ClientOnly>
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</UiDropdownMenuTrigger>
|
</UiDropdownMenuTrigger>
|
||||||
|
|
||||||
<UiDropdownMenuContent :side="'bottom'" :align="'start'" :side-offset="10" :align-offset="25" :collision-padding="40" class="text-right">
|
<UiDropdownMenuContent :side="'bottom'" :align="'start'" :side-offset="10" :align-offset="25" :collision-padding="20" class="text-right">
|
||||||
<UiDropdownMenuArrow />
|
<UiDropdownMenuArrow />
|
||||||
<UiDropdownMenuLabel>
|
<UiDropdownMenuLabel>
|
||||||
{{ $t('entity.calendar.seeOptions') }}
|
{{ $t('entity.calendar.seeOptions') }}
|
||||||
</UiDropdownMenuLabel>
|
</UiDropdownMenuLabel>
|
||||||
|
|
||||||
|
<UiDropdownMenuItem
|
||||||
|
v-if="!breakpoints.md.value"
|
||||||
|
class="flex gap-[1ch] justify-end items-center"
|
||||||
|
@click="toggleCategoriesModal(true)"
|
||||||
|
>
|
||||||
|
{{ $t('entity.calendar.seeCategories') }}
|
||||||
|
|
||||||
|
<PhTag size="18" />
|
||||||
|
</UiDropdownMenuItem>
|
||||||
|
|
||||||
<UiDropdownMenuSub>
|
<UiDropdownMenuSub>
|
||||||
<UiDropdownMenuSubTrigger arrow-direction="left" class="p-0 rounded-none">
|
<UiDropdownMenuSubTrigger arrow-direction="left" class="p-0 rounded-none">
|
||||||
<UiDropdownMenuItem class="flex gap-[1ch] justify-end items-center pointer-events-none">
|
<UiDropdownMenuItem class="flex gap-[1ch] justify-end items-center pointer-events-none">
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useCalendar } from "~/stores/CalendarStore"
|
import { useCalendar } from "~/stores/CalendarStore"
|
||||||
|
import { breakpointsTailwind } from "@vueuse/core"
|
||||||
|
|
||||||
|
const breakpoints = useBreakpoints(
|
||||||
|
breakpointsTailwind
|
||||||
|
)
|
||||||
|
|
||||||
const { isReadOnly, defaultDate } = storeToRefs(useCalendar())
|
const { isReadOnly, defaultDate } = storeToRefs(useCalendar())
|
||||||
</script>
|
</script>
|
||||||
@@ -23,9 +28,11 @@ const { isReadOnly, defaultDate } = storeToRefs(useCalendar())
|
|||||||
<li>
|
<li>
|
||||||
<CalendarSearchCTA />
|
<CalendarSearchCTA />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<ClientOnly>
|
||||||
|
<li v-if="breakpoints.md.value">
|
||||||
<CalendarCategoriesCTA />
|
<CalendarCategoriesCTA />
|
||||||
</li>
|
</li>
|
||||||
|
</ClientOnly>
|
||||||
<li>
|
<li>
|
||||||
<CalendarOptionsCTA />
|
<CalendarOptionsCTA />
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export default defineI18nConfig(() => ({
|
|||||||
isLoading: "Calendar is loading…",
|
isLoading: "Calendar is loading…",
|
||||||
hasXEvent: "{count} available event",
|
hasXEvent: "{count} available event",
|
||||||
hasXEvents: "{count} available events",
|
hasXEvents: "{count} available events",
|
||||||
seeCategories: "Modify categories",
|
seeCategories: "Categories",
|
||||||
seeOptions: "Calendar options",
|
seeOptions: "Calendar options",
|
||||||
date: {
|
date: {
|
||||||
start: "Start date",
|
start: "Start date",
|
||||||
@@ -492,7 +492,7 @@ export default defineI18nConfig(() => ({
|
|||||||
isLoading: "Chargement du calendrier…",
|
isLoading: "Chargement du calendrier…",
|
||||||
hasXEvent: "{count} évènement disponible",
|
hasXEvent: "{count} évènement disponible",
|
||||||
hasXEvents: "{count} évènements disponibles",
|
hasXEvents: "{count} évènements disponibles",
|
||||||
seeCategories: "Gestion des catégories",
|
seeCategories: "Catégories",
|
||||||
seeOptions: "Options du calendrier",
|
seeOptions: "Options du calendrier",
|
||||||
date: {
|
date: {
|
||||||
start: "Date de début",
|
start: "Date de début",
|
||||||
|
|||||||
Reference in New Issue
Block a user