-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(friends): can click on a friend and open direct message (#3893)
* feat(friends): friends WIP * feat(friends): friends WIP, cleanups * feat(friends): chat WIP, progress * feat(friends): chat WIP, ChatManager * feat(chat): friends and chat progress * feat(chat): friends refactor wip * feat(chat): user B gets notified for messages * feat(chat): ui messages progress * feat(chat): resolved conflicts Co-authored-by: Drew Ewing <drew.ewing@satellite.im>
- Loading branch information
Showing
8 changed files
with
92 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,34 @@ | ||
<div id="conversation" class="conversation"> | ||
<UiChatScroll | ||
ref="chatScroll" | ||
:prevent-scroll-offset="10" | ||
:older-messages-scroll-offset="300" | ||
:class="{'media-open': isActiveCall}" | ||
enable-wrap | ||
> | ||
<div class="conversation-content"> | ||
<div class="group" v-for="message of messages"> | ||
<div v-if="message.type === 'direct'"> | ||
<p>{{message.body}}</p> | ||
</div> | ||
<div id="conversation"> | ||
<UiLoadersMessage :count="3" v-if="loading" /> | ||
<div class="group" v-for="message of messages"> | ||
<div v-if="message.type === 'direct'"> | ||
<div v-if="message.from === did"> | ||
<p>SELF:</p> | ||
</div> | ||
<!-- <div | ||
class="group" | ||
v-for="group in currentChat.messages" | ||
:id="group.id" | ||
:key="group.id" | ||
> | ||
<div v-if="group.type === 'group'"> | ||
<Group :group="group" :groupId="groupId" /> | ||
</div> | ||
<div v-else-if="group.type === 'caret_divider'"> | ||
<UiCaretDivider text="New Messages" /> | ||
</div> | ||
<div v-else-if="group.type === 'divider'"> | ||
<TypographyHorizontalRuleText :value="group.at.toString()" /> | ||
</div> | ||
<div v-else> | ||
<p>FRIEND:</p> | ||
</div> | ||
<div | ||
v-if="textile.messageLoading" | ||
data-cy="loading-indicator" | ||
class="zoop" | ||
> | ||
<UiLoadersLoadingBar /> | ||
</div> --> | ||
<span> | ||
<UiUserName :username="message.from" :badge="badge" /> | ||
</span> | ||
<TypographyText :text="message.at" data-cy="chat-timestamp" /> | ||
<p>{{message.body}}</p> | ||
</div> | ||
<UiChatInfo | ||
v-if="showOlderMessageInfo" | ||
:caption="$t('pages.chat.older_messages')" | ||
class="conversation-info" | ||
type="primary" | ||
@click="handleClick()" | ||
> | ||
<chevron-down-icon size="1.5x" /> | ||
{{ $t('pages.chat.recent_messages') }} | ||
</UiChatInfo> | ||
<UiChatInfiniteScroll | ||
class="conversation-infiniteScroll" | ||
:class="{ 'is-reversed': isReversedScroll }" | ||
:options="options" | ||
@intersect="handleIntersect" | ||
> | ||
<template #placeholder> | ||
<div class="conversation-loader"> | ||
<UiLoadersSpinner | ||
data-cy="message-loading" | ||
class="conversation-loader-spinner" | ||
spinning | ||
/> | ||
{{ $t('pages.chat.infinite_scroll.loading') }} | ||
</div> | ||
</template> | ||
<template #no-more> <UiChatEncrypted /> </template> | ||
</UiChatInfiniteScroll> | ||
</UiChatScroll> | ||
<p>--------</p> | ||
</div> | ||
<!-- | ||
<div class="group" v-for="message in messages"> | ||
<div v-if="message.type === 'direct'"> | ||
<Group :group="message" :key="message.id" :groupId="groupId" /> | ||
</div> | ||
<div v-if="message.type === 'caret_divider'"> | ||
<UiCaretDivider text="New Messages" /> | ||
</div> | ||
<div v-else-if="message.type === 'divider'"> | ||
<TypographyHorizontalRuleText :value="message.at.toString()" /> | ||
</div> | ||
</div> | ||
<div v-if="textile.messageLoading" data-cy="loading-indicator" class="zoop"> | ||
<UiLoadersLoadingBar /> | ||
</div> --> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div id="direct"> | ||
<!-- <UiChatEncrypted v-if="$route.params.address" /> --> | ||
<Conversation :messages="messages" :loading="false" /> | ||
<UiChatEncrypted v-if="$route.params.address" /> | ||
<Conversation :did="did" :messages="messages" :loading="false" /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters