Files
hereconnect/apps/frontend/src/components/create/CreateMessageDeliveryOptionTelegram.vue
T
ti 75be87c144
Main daploy / deploy (push) Successful in 45s
test web push
2024-11-21 16:11:23 +02:00

33 lines
1.0 KiB
Vue

<template>
<CreateMessageDeliveryOption :label :method v-model="model" />
<!-- Сообщение о недоступности -->
<p v-if="telegramNotice" class="text-red-500 mb-2">
Отправка в Telegram пока в разработке.<br />
Этот способ отправки сообщений можно будет выбрать позже.
</p>
</template>
<script setup lang="ts">
import { type QRCodeDocument } from '@/types/DBDocumentTypes'
import { type DeliveryOption, DELIVERY_METHOD_TELEGRAM } from '@/constants/deliveryOptions'
import { computed } from 'vue'
type DeliveryOptionTelegram = Extract<DeliveryOption, { method: typeof DELIVERY_METHOD_TELEGRAM }>
defineProps<{
label: DeliveryOptionTelegram['label']
method: DeliveryOptionTelegram['method']
}>()
defineEmits<{
(e: 'change', value: Event): void
}>()
const model = defineModel<null | QRCodeDocument['messageDeliveryMethod']>()
const telegramNotice = computed(() => {
return model.value! === DELIVERY_METHOD_TELEGRAM
})
</script>