fixed typos and prepering to add url embed :D

This commit is contained in:
supertiger1234 2019-07-12 20:37:38 +01:00
parent f1cf1111d7
commit 67e7fcc2ef
5 changed files with 2395 additions and 2242 deletions

4624
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -126,6 +126,12 @@ export default {
},
computed: {
...mapState("settingsModule", ["apperance"]),
getLinks(){
const message = this.$props['message']
if (!message) return [];
console.log(message.match(/(https?:\/\/[^\s]+)/g) || [])
return "LOL"
},
getImage() {
if (!this.$props.files || this.$props.files.length === 0)
return undefined;

View file

@ -6,7 +6,7 @@
</div>
<div class="details" v-if="channels[selectedChannelIndex]">
<div class="input">
<div class="input-title">Server Name</div>
<div class="input-title">Channel Name</div>
<input type="text" ref="name" placeholder="Channel Name" :default-value.prop="channels[selectedChannelIndex].name" @input="inputEvent('name', $event)">
</div>
<div class="button" v-if="update.name" @click="updateChannel">Save Changes</div>

View file

@ -21,7 +21,7 @@ const config = [
headColor: "rgba(190, 40, 40, 0.77)",
new: [
"You can now color your code (thanks bree!) by typing: <div style='background: #00000066; border-radius: 5px; padding: 5px;'>```js<br> console.log('Hello World!');<br>```</div>",
"A new server settings option has been added that allows you to delete your server, create new channels and rename your channels. More future will be added in the future! ",
"A new server settings option has been added that allows you to delete your server, create new channels and rename your channels. More features will be added in the future! ",
"The 'Recents' tab should now flash red when you get a notification.",
"Friends and Recents tabs position will be saved when visiting the site."
],

View file

@ -85,6 +85,7 @@ futoji.addTransformer({
symbol: '```',
recursive: false,
transformer: text => {
//TODO: use https://github.com/atom/highlights instead.
let formatted = formatCode(text)
let highlighted
@ -108,7 +109,7 @@ futoji.addTransformer({
})
export default (message) => {
message = futoji.format(message + '').trim();
message = futoji.format(message + ' ').trim();
message = emojiParser.replaceEmojis(message);