This commit is contained in:
@@ -2,6 +2,7 @@ export const ROUTE_NAMES = {
|
||||
HOME: 'home',
|
||||
CREATE: 'create',
|
||||
MANAGE_QR_CODE_READY: 'manage-qr-code-ready',
|
||||
MANAGE_QR_CODE_CHAT: 'manage-qr-code-chat',
|
||||
READ_QR_CODE: 'read-qr-code',
|
||||
DONATE: 'donate',
|
||||
PUBLIC_CHAT: 'public-chat',
|
||||
|
||||
@@ -19,6 +19,12 @@ const routes = [
|
||||
component: () => import('@/views/ManageQRCodeReadyView.vue'),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/manage/:qr_code_uri/chat/:chat',
|
||||
name: ROUTE_NAMES.MANAGE_QR_CODE_CHAT,
|
||||
component: () => import('@/views/ManageQRCodeChatView.vue'),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: '/read/:qr_code_uri',
|
||||
name: ROUTE_NAMES.READ_QR_CODE,
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="flex flex-col min-h-full">
|
||||
<!-- Основной контент -->
|
||||
<main class="flex-grow flex flex-col">
|
||||
<section class="flex flex-col flex-grow max-w-prose w-full mx-auto">
|
||||
<ChatComponent userRole="owner" :qr_code_uri="qr_code_uri" :chat="chat">
|
||||
<template #endOfMessages="{ count }">
|
||||
<!-- Уведомление, если гость отправил только одно сообщение -->
|
||||
<div
|
||||
v-if="count === 2"
|
||||
class="flex flex-col items-center justify-center text-center bg-gray-50 border border-gray-200 rounded-lg shadow-md p-6 mt-6"
|
||||
>
|
||||
<p class="text-gray-700 font-medium text-lg">Ваше сообщение отправлено.</p>
|
||||
<p class="text-gray-600 mt-2">
|
||||
Вы можете написать ещё одно сообщение или подождать ответа.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p class="mt-10 text-sm text-gray-500 text-center">
|
||||
Хотите создать еще один QR‑код?
|
||||
<a href="/create" class="underline">Создайте его здесь</a>.
|
||||
</p>
|
||||
<p class="mt-1 text-sm text-gray-500 text-center">
|
||||
Сделайте НаСвязи удобнее. Мы будем рады вашей <RouterLink
|
||||
to="/donate"
|
||||
class="underline"
|
||||
>поддержке</RouterLink
|
||||
>.
|
||||
</p>
|
||||
</template>
|
||||
</ChatComponent>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<!-- Футер -->
|
||||
<!-- <footer class="bg-gray-100 text-center py-4 border-t text-sm text-gray-700">-->
|
||||
<!-- <p><a href="/create" class="underline">Создайте свой QR‑код</a>.</p>-->
|
||||
<!-- <p class="mt-1">-->
|
||||
<!-- Сделайте НаСвязи удобнее. Будем рады вашей <a href="/donate" class="underline"-->
|
||||
<!-- >поддержке</a-->
|
||||
<!-- >.-->
|
||||
<!-- </p>-->
|
||||
<!-- </footer>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { MessageDocument } from '@hereconnect/types'
|
||||
import ChatComponent from '@/components/ChatComponent.vue'
|
||||
defineProps<{ qr_code_uri: MessageDocument['qr_code_uri']; chat: MessageDocument['chat'] }>()
|
||||
</script>
|
||||
Reference in New Issue
Block a user