diff --git a/src/components/Content/Message.vue b/src/components/Content/Message.vue index 0921606..613a75e 100644 --- a/src/components/Content/Message.vue +++ b/src/components/Content/Message.vue @@ -21,7 +21,7 @@ - +
{{ shortcodeToEmoji(reaction) }} @@ -60,7 +60,7 @@ export default { // with this: https://chatty-pub-files.hackersanddesigners.nl/files/ c = c.replaceAll( url + "/user_uploads/", - "https://chatty-pub-files.hackersanddesigners.nl/files/" + "http://chatty-pub-files.hackersanddesigners.nl/files/" ); c = this.replaceAllEmojiCodes(c); @@ -84,7 +84,7 @@ export default { // console.log(c); }); - + return c; }, hasRulesShortcode(){ diff --git a/src/store/index.js b/src/store/index.js index a7369e1..172c48d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -6,11 +6,11 @@ import { createStore } from 'vuex' import emoji from "../mixins/emoji" import { stripHtml } from "string-strip-html" -/* +/* -TODO: fix this frankenfunction. Its not pretty but it works, so I am leaving it for now. +TODO: fix this frankenfunction. Its not pretty but it works, so I am leaving it for now. -Does various conversion and parsing to turn a message in the rules channel into an object we can use in the rules and style component +Does various conversion and parsing to turn a message in the rules channel into an object we can use in the rules and style component */ let toCSS = (message, currentStream) => { @@ -22,8 +22,8 @@ let toCSS = (message, currentStream) => { id = message.id, is_codeblock = message.content.includes("") || message.content.startsWith("```"), is_font = /

.+)\s*\n?{\n?(?(.*;\n?)+)}/gm let results = content.matchAll(regex); @@ -62,7 +62,7 @@ let font = (content) => { let filename = getFilename(path); let ext = filename.split(".").pop(); font.src = - "https://chatty-pub-files.hackersanddesigners.nl/files" + path; + "http://chatty-pub-files.hackersanddesigners.nl/files" + path; font.format = getFormat(ext); font.family = filename.replace(".", "_"); return font; @@ -230,7 +230,7 @@ export default createStore({ // id: mid, content: content, // }, state.currentStream) - // vue will not update if i use rules.push(rule) + // vue will not update if i use rules.push(rule) state.rules.splice(state.rules.indexOf(rule), 1) const newRules = [...state.rules, ...[toCSS({ id: mid, content: content, @@ -266,8 +266,8 @@ export default createStore({ sortedTopics: (state, getters) => ( getters.filteredTopics - .sort((a,b) => - a.title.localeCompare(b.title, undefined, { + .sort((a,b) => + a.title.localeCompare(b.title, undefined, { numeric : true, sensitivity : 'base' })