Skip to content

Commit

Permalink
feat(markdown): added markdown preview in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
vimercati-samir authored and stavares843 committed May 11, 2022
1 parent 11c649b commit 3d053b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions assets/styles/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,14 @@ strong {
.sidebar-container.swiper-slide.swiper-slide-active {
transform: none;
}

.user {
.user-info {
.subtitle {
* {
font-size: @micro-text-size;
color: @text-muted;
}
}
}
}
2 changes: 1 addition & 1 deletion components/views/user/User.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<UiUserState :user="user" :isTyping="isTyping" :src="src" />
<div class="user-info">
<TypographyTitle :size="6" data-cy="sidebar-user-name" :text="user.name" />
<TypographySubtitle :size="6" :text="lastMessage" />
<VueMarkdown :source="lastMessage" class="subtitle" />
</div>
<div class="user-chat-details">
<TypographyText :size="6" :text="timestamp" v-if="existConversation" />
Expand Down
2 changes: 2 additions & 0 deletions components/views/user/User.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<script lang="ts">
import Vue, { PropType } from 'vue'
import { mapState, mapGetters } from 'vuex'
import VueMarkdown from 'vue-markdown'
import { SmartphoneIcon, CircleIcon } from 'satellite-lucide-icons'
Expand All @@ -29,6 +30,7 @@ declare module 'vue/types/vue' {
export default Vue.extend({
components: {
VueMarkdown,
SmartphoneIcon,
CircleIcon,
},
Expand Down

0 comments on commit 3d053b5

Please sign in to comment.