display only current topic bug fix

This commit is contained in:
Heerko 2021-11-01 19:19:41 +01:00
parent 761160b7b6
commit abf6307384
7 changed files with 11 additions and 7 deletions

View file

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>ChattyPub</title><link rel="stylesheet/css-polyfills" type="text/css" href="extra-styles.css"><script src="css-polyfills.js"></script><link href="/css/app.c01369df.css" rel="preload" as="style"><link href="/css/chunk-vendors.fa36ffc8.css" rel="preload" as="style"><link href="/js/app.62463567.js" rel="preload" as="script"><link href="/js/chunk-vendors.e35cf9b3.js" rel="preload" as="script"><link href="/css/chunk-vendors.fa36ffc8.css" rel="stylesheet"><link href="/css/app.c01369df.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Chattypub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.e35cf9b3.js"></script><script src="/js/app.62463567.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>ChattyPub</title><link rel="stylesheet/css-polyfills" type="text/css" href="extra-styles.css"><script src="css-polyfills.js"></script><link href="/css/app.c01369df.css" rel="preload" as="style"><link href="/css/chunk-vendors.fa36ffc8.css" rel="preload" as="style"><link href="/js/app.244c27d0.js" rel="preload" as="script"><link href="/js/chunk-vendors.e35cf9b3.js" rel="preload" as="script"><link href="/css/chunk-vendors.fa36ffc8.css" rel="stylesheet"><link href="/css/app.c01369df.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but Chattypub doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.e35cf9b3.js"></script><script src="/js/app.244c27d0.js"></script></body></html>

2
front/dist/js/app.244c27d0.js vendored Normal file

File diff suppressed because one or more lines are too long

1
front/dist/js/app.244c27d0.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@
<div :class="classes" class="message">
<vue3-markdown-it :source="content" v-bind="$mdOpts"></vue3-markdown-it>
</div>
<div class="message-data-reactions" v-if="show_message_data">
<div class="message-data-reactions" v-if="show_message_data && message.reactions.length > 0">
<span
class="reaction"
v-for="reaction in message.reactions"
@ -40,7 +40,9 @@ export default {
},
content() {
if(!this.message.content) return "";
let c = this.message.content.replace("\n", "<br/>");
// let c = this.message.content.replaceAll("\n", "<br/>");
let c = this.message.content;
// create absolute url on images and relative links
let url = process.env.VUE_APP_ZULIP_site;
c = c.replaceAll('src="', 'src="' + url);
@ -73,6 +75,8 @@ export default {
);
// console.log(c);
});
return c;
},
reactions() {

View file

@ -39,7 +39,7 @@ export default {
...mapGetters(["sortedTopics"]),
filteredTopics() {
const hash = this.$route.hash.substr(1);
if (!hash) return this.sortedTopics;
if (!hash || !this.only_current_topic) return this.sortedTopics;
const found = this.sortedTopics.find((el) => {
return this.toValidID(el.title) === hash;
});