diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-08-31 21:03:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 21:03:49 +0200 |
commit | db1af53f1760858562029435fb209411c4251457 (patch) | |
tree | 450e61916c35b7982babaca8354dffd93644032b /src | |
parent | ec558052b31f88398b654dab3498b2d33710014a (diff) | |
parent | 4dc5d0e243dc985aa1af480bdaffbda3cf883f58 (diff) |
Merge pull request #7822 from nextcloud/enh/references
Implement link previews
Diffstat (limited to 'src')
-rw-r--r-- | src/components/LobbyScreen.vue | 2 | ||||
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/Message.vue | 28 | ||||
-rw-r--r-- | src/components/Quote.vue | 2 |
3 files changed, 25 insertions, 7 deletions
diff --git a/src/components/LobbyScreen.vue b/src/components/LobbyScreen.vue index 7b7a9490d..ed936711d 100644 --- a/src/components/LobbyScreen.vue +++ b/src/components/LobbyScreen.vue @@ -49,7 +49,7 @@ <script> import moment from '@nextcloud/moment' -import RichText from '@juliushaertl/vue-richtext' +import RichText from '@nextcloud/vue-richtext' import SetGuestUsername from './SetGuestUsername.vue' import Lobby from './missingMaterialDesignIcons/Lobby.vue' diff --git a/src/components/MessagesList/MessagesGroup/Message/Message.vue b/src/components/MessagesList/MessagesGroup/Message/Message.vue index 1ea27ae87..9cb6b1cf9 100644 --- a/src/components/MessagesList/MessagesGroup/Message/Message.vue +++ b/src/components/MessagesList/MessagesGroup/Message/Message.vue @@ -52,11 +52,17 @@ the main body of the message as well as a quote. </div> </div> <div v-else-if="showJoinCallButton" class="message-body__main__text call-started"> - <RichText :text="message" :arguments="richParameters" :autolink="true" /> + <RichText :text="message" + :arguments="richParameters" + :autolink="true" + :reference-limit="10" /> <CallButton /> </div> <div v-else-if="showResultsButton" class="message-body__main__text system-message"> - <RichText :text="message" :arguments="richParameters" :autolink="true" /> + <RichText :text="message" + :arguments="richParameters" + :autolink="true" + :reference-limit="10" /> <!-- Displays only the "see results" button with the results modal --> <Poll :id="messageParameters.poll.id" :poll-name="messageParameters.poll.name" @@ -64,11 +70,17 @@ the main body of the message as well as a quote. :show-as-button="true" /> </div> <div v-else-if="isDeletedMessage" class="message-body__main__text deleted-message"> - <RichText :text="message" :arguments="richParameters" :autolink="true" /> + <RichText :text="message" + :arguments="richParameters" + :autolink="true" + :reference-limit="10" /> </div> <div v-else class="message-body__main__text" :class="{'system-message': isSystemMessage}"> <Quote v-if="parent" :parent-id="parent" v-bind="quote" /> - <RichText :text="message" :arguments="richParameters" :autolink="true" /> + <RichText :text="message" + :arguments="richParameters" + :autolink="true" + :reference-limit="10" /> </div> <div v-if="!isDeletedMessage" class="message-body__main__right"> <span v-tooltip.auto="messageDate" @@ -187,7 +199,7 @@ import DeckCard from './MessagePart/DeckCard.vue' import DefaultParameter from './MessagePart/DefaultParameter.vue' import FilePreview from './MessagePart/FilePreview.vue' import Mention from './MessagePart/Mention.vue' -import RichText from '@juliushaertl/vue-richtext' +import RichText from '@nextcloud/vue-richtext' import AlertCircle from 'vue-material-design-icons/AlertCircle.vue' import Check from 'vue-material-design-icons/Check.vue' import CheckAll from 'vue-material-design-icons/CheckAll.vue' @@ -811,6 +823,7 @@ export default { </script> <style lang="scss" scoped> +@import '@nextcloud/vue-richtext/dist/style.css'; @import '../../../../assets/variables'; .message:hover .normal-message-body { @@ -836,6 +849,7 @@ export default { min-width: 100%; &__text { flex: 0 1 600px; + max-width: 600px; color: var(--color-text-light); .single-emoji { font-size: 250%; @@ -866,6 +880,10 @@ export default { ::v-deep .rich-text--wrapper { white-space: pre-wrap; word-break: break-word; + + .rich-text--reference-widget { + width: calc(100% + 132px); + } } &--quote { diff --git a/src/components/Quote.vue b/src/components/Quote.vue index eb868f1a6..dd361b6e7 100644 --- a/src/components/Quote.vue +++ b/src/components/Quote.vue @@ -59,7 +59,7 @@ components. <script> import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' import Close from 'vue-material-design-icons/Close.vue' -import RichText from '@juliushaertl/vue-richtext' +import RichText from '@nextcloud/vue-richtext' import FilePreview from './MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue' import DefaultParameter from './MessagesList/MessagesGroup/Message/MessagePart/DefaultParameter.vue' import { EventBus } from '../services/EventBus.js' |