pleroma-fe/src/components/chat_view/chat_view.vue

81 lines
2.3 KiB
Vue
Raw Normal View History

2020-05-07 16:10:53 +03:00
<template>
<div class="chat-view">
<div class="chat-view-inner">
<div
ref="inner"
class="panel-default panel chat-view-body"
>
<div
ref="header"
2022-04-20 20:43:10 +03:00
class="panel-heading -sticky chat-view-heading"
2020-05-07 16:10:53 +03:00
>
2022-04-12 17:17:52 +03:00
<button
class="button-unstyled go-back-button"
2020-05-07 16:10:53 +03:00
@click="goBack"
>
2020-10-21 00:31:16 +03:00
<FAIcon
size="lg"
icon="chevron-left"
/>
2022-04-12 17:17:52 +03:00
</button>
2020-05-07 16:10:53 +03:00
<div class="title text-center">
<ChatTitle
:user="recipient"
:with-avatar="true"
/>
</div>
</div>
<ChatMessageList
header-date
:messages="messages"
:pending-messages="pendingMessages"
/>
2022-03-17 08:35:19 +02:00
<div
ref="footer"
class="panel-body footer"
>
2020-05-07 16:10:53 +03:00
<div
2022-03-17 08:35:19 +02:00
class="jump-to-bottom-button"
:class="{ 'visible': jumpToBottomButtonVisible }"
@click="scrollDown({ behavior: 'smooth' })"
2020-05-07 16:10:53 +03:00
>
2022-03-17 08:35:19 +02:00
<span>
<FAIcon icon="chevron-down" />
<div
v-if="newMessageCount"
2024-02-16 00:29:16 +02:00
class="badge -notification unread-chat-count unread-message-count"
2022-03-17 08:35:19 +02:00
>
{{ newMessageCount }}
</div>
</span>
2020-05-07 16:10:53 +03:00
</div>
2022-03-17 08:35:19 +02:00
<PostStatusForm
:disable-subject="true"
:disable-scope-selector="true"
:disable-notice="true"
:disable-lock-warning="true"
:disable-polls="true"
2025-07-28 11:39:50 +03:00
:disable-quotes="true"
2022-03-17 08:35:19 +02:00
:disable-sensitivity-checkbox="true"
:disable-submit="errorLoadingChat || !chat"
2022-03-17 08:35:19 +02:00
:disable-preview="true"
2024-08-22 20:13:56 -04:00
:disable-draft="true"
2022-03-17 08:35:19 +02:00
:optimistic-posting="true"
:post-handler="sendMessage"
:submit-on-enter="!mobileLayout"
:preserve-focus="!mobileLayout"
:auto-focus="!mobileLayout"
:placeholder="formPlaceholder"
:file-limit="1"
max-height="160"
emoji-picker-placement="top"
@resize="handleResize"
/>
</div>
2020-05-07 16:10:53 +03:00
</div>
</div>
</div>
</template>
<script src="./chat_view.js"></script>
<style src="./chat_view.scss" lang="scss" />