Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Jul 26, 2023
1 parent fb45f5c commit 1a899cf
Showing 1 changed file with 51 additions and 13 deletions.
64 changes: 51 additions & 13 deletions src/components/MessagesList/MessagesGroup/Message/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,34 @@ the main body of the message as well as a quote.
<div v-else-if="showJoinCallButton" class="message-body__main__text call-started">
<NcRichText :text="message"
:arguments="richParameters"
:autolink="true"
autolink
:reference-limit="0" />
<CallButton />
</div>
<div v-else-if="showResultsButton" class="message-body__main__text system-message">
<div v-else-if="showResultsButton || isSystemMessage" class="message-body__main__text system-message">
<NcRichText :text="message"
:arguments="richParameters"
:autolink="true"
autolink
:reference-limit="0" />
<!-- Displays only the "see results" button with the results modal -->
<Poll :id="messageParameters.poll.id"
<Poll v-if="showResultsButton"
:id="messageParameters.poll.id"
:poll-name="messageParameters.poll.name"
:token="token"
:show-as-button="true" />
show-as-button />
</div>
<div v-else-if="isDeletedMessage" class="message-body__main__text deleted-message">
<NcRichText :text="message"
:arguments="richParameters"
:autolink="true"
autolink
:reference-limit="0" />
</div>
<div v-else class="message-body__main__text" :class="{'system-message': isSystemMessage}">
<div v-else class="message-body__main__text message-body__main__text--markdown">
<Quote v-if="parent" :parent-id="parent" v-bind="quote" />
<NcRichText :text="message"
:arguments="richParameters"
:autolink="true"
autolink
use-markdown
:reference-limit="1" />
</div>
<div v-if="!isDeletedMessage" class="message-body__main__right">
Expand Down Expand Up @@ -907,11 +909,6 @@ export default {
align-items: center;
}
:deep(.rich-text--wrapper) {
white-space: pre-wrap;
word-break: break-word;
}
&--quote {
border-left: 4px solid var(--color-primary-element);
padding: 4px 0 0 8px;
Expand Down Expand Up @@ -1020,4 +1017,45 @@ export default {
.reaction-details {
padding: 8px;
}
.message-body__main__text--markdown {
:deep(.rich-text--wrapper) {
h1 {
font-weight: bold;
font-size: 32px;
margin-bottom: 12px;
line-height: 36px;
color: var(--color-text-light);
}
em {
font-style: italic;
}
ul {
padding-left: 20px;
list-style-type: disc;
}
ol {
padding-left: 20px;
list-style-type: decimal;
}
pre {
padding: 6px;
margin: 2px;
overflow-x: auto;
border-radius: var(--border-radius);
background-color: var(--color-background-dark);
}
code, blockquote {
padding: 6px;
margin: 2px;
border-radius: var(--border-radius);
background-color: var(--color-background-dark);
}
}
}
</style>

0 comments on commit 1a899cf

Please sign in to comment.