1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-17 09:53:26 +02:00
market/src/components/@shared/DirectMessages/Conversation.module.css
Marco Elissa 8fd3eaf8de
Encrypted Direct Messaging module (#1870)
* add orbis context

* new changes

* Add orbis floating chat

* adding orbis function

* load orbis conversations

* update message button in profile

* minor fix conversation styles

* update orbis version

* adding details conditional

* updating post comment function

* Update send message button style

* Fix send message button css

* udpate orbis

* update posts and floating function

* Add chatbox emoji

* Add Emoji Picker Theme

* useDarkMode emoji fix

* remove next dynamic on emoji picker

* show conversation title from participant

* update callbackMessage.

* Update Emoji Picker

* Add Emoji Picker to Postbox

* rename FloatingChat to DirectMessages

* create some global orbis components

* update package-lock.json

* change any type

* change Blockie to Avatar component

* fix type errors

* fix infinite loop when no comment found

* Hide send message button on ownAccount profile

* Delete unused component

* minor changes

* update orbis comment and DM components

* fix load older messages on DM scroll

* fixed orbis createPost

* update optional wallet signs

* add return value on connect

* add padding bottom to compensate DM component

* add conditional connect and sign button

* update direct message component

* update get notifications logic

* rerun npm install

* rerun npm install

* temporary push

* rerun npm install

* add new custom hooks

* run npm install

* update flow on address changed

* update custom DID string

* remove lit auth signatures on resetStates()

* add hasLit condition on getMessages

* add removeCeramicSession function

* useLocalStorage to store notifications

* minor bug fix

* update styles for conversation details

* use getEnsName util

* update create conversation flow

* rerun npm install

* update typescript

* update orbis sdk version

* temporary push

* revisions

* update orbis version

* update notifs count and conversation creation flow

* update orbis types

* add toast after copy address

* add message decryption refresh button

* rerun npm install

* remove comment from asset page

* test push

* remove lit-auth-signature on wallet changed

* update orbis SDK to v0.4.14

* update copy

* update Orbis SDK to v0.4.17

* update copy

* create new DM button component and add to asset

* add send button and remove emojiPicker

* Revert "Merge branch 'main' into orbis"

This reverts commit 3cdaf54827, reversing
changes made to 02f2acb774.

* Revert "Revert "Merge branch 'main' into orbis""

This reverts commit a5a32b1534.

* update new conversation flow

* update intro message

* minor fix typo

* remove unused package and fixed outdated versions

* remove comment component and restructured folders

* update orbis-sdk

* small cleanup

* direct message button style updates

---------

Co-authored-by: Nuary Pradipta <nuary.pradipta@gmail.com>
Co-authored-by: Dollar Bull <ramadhanakhri@gmail.com>
Co-authored-by: Bogdan Fazakas <bogdan.fazakas@gmail.com>
2023-04-05 09:22:57 +03:00

139 lines
2.8 KiB
CSS

.conversation {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
background-color: var(--background-content);
}
.loading {
position: absolute;
top: calc(var(--spacer) / 3);
left: 50%;
transform: translateX(-50%);
padding: calc(var(--spacer) / 4);
text-align: center;
color: var(--color-secondary);
/* -webkit-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
-moz-animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; */
background-color: var(--background-content);
z-index: 2;
}
.connectLit {
height: 100%;
display: flex;
flex-direction: column;
padding: calc(var(--spacer) / 2);
align-items: center;
justify-content: center;
}
.connectLit p {
text-align: center;
font-size: var(--font-size-small);
color: var(--color-secondary);
}
.noMessages {
text-align: center;
padding: calc(var(--spacer) / 2);
color: var(--color-secondary);
}
.messages {
position: relative;
flex-grow: 1;
overflow: hidden;
}
.messages > .scrollContent {
height: 100%;
overflow-y: auto;
padding: calc(var(--spacer) / 2) calc(var(--spacer) / 2)
calc(var(--spacer) / 4);
}
.newMessagesBadge {
position: absolute;
height: auto;
bottom: calc(var(--spacer) / 2);
left: 50%;
transform: translateX(-50%);
border-radius: var(--border-radius);
background: var(--brand-pink);
color: var(--brand-white);
padding: calc(var(--spacer) / 4) calc(var(--spacer) / 2);
border: 0;
outline: 0;
cursor: pointer;
font-size: var(--font-size-text);
box-shadow: 0 2px 4px var(--box-shadow-color);
}
.message {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-bottom: calc(var(--spacer) / 4);
max-width: 80%;
}
.pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.chatBubble {
display: inline-block;
background-color: var(--color-primary);
padding: calc(var(--spacer) / 4) calc(var(--spacer) / 2.5);
font-size: var(--font-size-text);
border-radius: 1rem;
word-break: break-word;
flex-shrink: 1;
}
.time {
font-size: var(--font-size-mini);
color: var(--color-secondary);
padding-top: calc(var(--spacer) / 8);
}
.message:not(.showTime) .time {
display: none;
}
.message.right {
align-items: flex-end;
margin-left: auto;
}
.message.right .chatBubble {
color: var(--brand-white);
background-color: var(--color-primary);
border-bottom-right-radius: var(--border-radius);
}
.message.left .chatBubble {
background-color: var(--border-color);
border-bottom-left-radius: var(--border-radius);
}
.message:not(.showTime).right + .message.right .chatBubble {
border-top-right-radius: 0;
}
.message:not(.showTime).left + .message.left .chatBubble {
border-top-left-radius: 0;
}
@keyframes pulse {
50% {
opacity: 0.5;
}
}