Changed today CTA on mobile
This commit is contained in:
@@ -19,7 +19,7 @@ const breakpoints = useBreakpoints(
|
|||||||
>
|
>
|
||||||
<PhMagnifyingGlass size="20" weight="light" />
|
<PhMagnifyingGlass size="20" weight="light" />
|
||||||
|
|
||||||
<span class="max-lg:hidden">
|
<span v-if="breakpoints.lg.value">
|
||||||
{{ $t('entity.advancedSearch.title') }}
|
{{ $t('entity.advancedSearch.title') }}
|
||||||
</span>
|
</span>
|
||||||
</UiButton>
|
</UiButton>
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ const breakpoints = useBreakpoints(
|
|||||||
<Transition name="fade" appear>
|
<Transition name="fade" appear>
|
||||||
<UiButton
|
<UiButton
|
||||||
class="max-md:fixed max-md:bottom-8 max-md:right-8 max-md:z-50 max-md:size-14 max-md:rounded-xl"
|
class="max-md:fixed max-md:bottom-8 max-md:right-8 max-md:z-50 max-md:size-14 max-md:rounded-xl"
|
||||||
:size="breakpoints.lg.value ? 'default' : 'icon'"
|
:size="breakpoints.md.value ? 'default' : 'icon'"
|
||||||
@click="toggleDialog"
|
@click="toggleDialog"
|
||||||
>
|
>
|
||||||
<PhPlus :size="breakpoints.md.value ? 18 : 24" weight="bold" />
|
<PhPlus :size="breakpoints.md.value ? 18 : 24" weight="bold" />
|
||||||
|
|
||||||
<strong class="font-semibold max-lg:hidden">
|
<strong v-if="breakpoints.md.value" class="font-semibold">
|
||||||
{{ $t("entity.calendar.event.newEvent") }}
|
{{ $t("entity.calendar.event.newEvent") }}
|
||||||
</strong>
|
</strong>
|
||||||
</UiButton>
|
</UiButton>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from "vue"
|
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core"
|
||||||
|
import { PhCalendar } from "@phosphor-icons/vue"
|
||||||
|
|
||||||
const { defaultDate, jumpToDefaultDate, getFormattedDateTitle, currentDate } = useCalendar()
|
const { defaultDate, jumpToDefaultDate, getFormattedDateTitle, currentDate } = useCalendar()
|
||||||
|
|
||||||
@@ -8,15 +9,29 @@ const defaultDateFormatted: string = getFormattedDateTitle(defaultDate, true)
|
|||||||
const buttonDisabledState: ComputedRef<boolean> = computed<boolean>(() => {
|
const buttonDisabledState: ComputedRef<boolean> = computed<boolean>(() => {
|
||||||
return currentDate.currentMonth === defaultDate.month && currentDate.currentYear === defaultDate.year
|
return currentDate.currentMonth === defaultDate.month && currentDate.currentYear === defaultDate.year
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const breakpoints = useBreakpoints(
|
||||||
|
breakpointsTailwind
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<UiTooltipProvider :delay-duration="250">
|
<UiTooltipProvider :delay-duration="250">
|
||||||
<UiTooltip>
|
<UiTooltip>
|
||||||
<UiTooltipTrigger as-child>
|
<UiTooltipTrigger as-child>
|
||||||
<UiButton size="sm" variant="secondary" :disabled="buttonDisabledState" @click="jumpToDefaultDate">
|
<ClientOnly>
|
||||||
{{ $t('entity.calendar.date.today') }}
|
<UiButton
|
||||||
</UiButton>
|
:size="breakpoints.md.value ? 'default' : 'icon'"
|
||||||
|
variant="secondary"
|
||||||
|
:disabled="buttonDisabledState" @click="jumpToDefaultDate"
|
||||||
|
>
|
||||||
|
<PhCalendar v-if="!breakpoints.md.value" size="20" weight="fill" />
|
||||||
|
|
||||||
|
<span v-if="breakpoints.md.value">
|
||||||
|
{{ $t('entity.calendar.date.today') }}
|
||||||
|
</span>
|
||||||
|
</UiButton>
|
||||||
|
</ClientOnly>
|
||||||
</UiTooltipTrigger>
|
</UiTooltipTrigger>
|
||||||
<UiTooltipContent>
|
<UiTooltipContent>
|
||||||
<p>{{ defaultDateFormatted }}</p>
|
<p>{{ defaultDateFormatted }}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user