Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions premium/conversations/components/claim.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class="rounded-lg flex items-center justify-center h-full m-6 md:m-10 border border-transparent hover:opacity-80 hover:cursor-pointer shadow-md hover:shadow-lg"
:style="{
backgroundColor:
tenant.theme && tenant.theme.bgNav !== '#140505'
tenant.theme && tenant.theme.bgNav && tenant.logoUrl
? tenant.theme.bgNav
: tenant.cardColor
? tenant.cardColor
Expand Down Expand Up @@ -49,8 +49,7 @@
import topHeader from "~~/components/topHeader.vue";
import mainSection from "~~/components/mainSection.vue";
import { getBgColor, getTextColor } from "../helpers/avatarColors";

import _ from "lodash";
import makeStyles from "~~/helpers/makeStyles";
import MainCta from "~~/components/mainCta.vue";

export default defineComponent({
Expand Down
19 changes: 9 additions & 10 deletions premium/conversations/components/conversation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4"
>
<div>
<p
v-html="activity.body"
<div
v-html="markdown(activity.body)"
class="myem text-sm"
:style="colors('color:text')"
/>
Expand Down Expand Up @@ -188,17 +188,12 @@
</template>

<script>
import {
FireIcon,
ChevronRightIcon,
ReplyIcon,
ExternalLinkIcon,
EyeIcon,
} from "@heroicons/vue/solid";
import Showdown from 'showdown'
import {ChevronRightIcon, ExternalLinkIcon, EyeIcon, FireIcon, ReplyIcon,} from "@heroicons/vue/solid";
import Avatar from "./avatar.vue";
import PlatformIcon from "./platformIcon.vue";
import ConversationWrapper from "./conversationWrapper.vue";
import { defineComponent } from "@vue/composition-api";
import {defineComponent} from "@vue/composition-api";
import makeStyles from "~~/helpers/makeStyles";

export default defineComponent({
Expand Down Expand Up @@ -254,6 +249,10 @@ export default defineComponent({
? this.conversation.activities.slice(0, this.maxContributors)
: this.conversation.activities;
},
markdown(body) {
const converter = new Showdown.Converter({ simpleLineBreaks: true })
return converter.makeHtml(body)
}
},

computed: {
Expand Down
2 changes: 1 addition & 1 deletion premium/conversations/components/conversationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default defineComponent({
this.isLoaded.mode = false;
},
truncatedTitle() {
const first50Chars = this.conversation.title.substr(50)
const first50Chars = this.conversation.title.substr(0, 50)
if (first50Chars.substr(47, 50).includes('...')) {
return first50Chars
} else {
Expand Down
Loading