Feature update - Add Discord option to dashboard

This feature add's the discord chat link if one exists inside the `chat_url`.  I filter and search for a link containing `discord`.  Then if matching, displays the link.
This commit is contained in:
Erialos 2022-10-07 08:25:38 -06:00
parent 5eef53e294
commit 2d2733a15d

View File

@ -176,6 +176,14 @@
>
<feather-icon icon="GithubIcon" /> Github
</b-button>
<b-button
:href="discord"
class="mr-1"
variant="outline-secondary"
size="sm"
>
<feather-icon icon="MessageSquareIcon" /> Discord
</b-button>
<b-button
:href="telegram"
class="mr-1"
@ -362,6 +370,13 @@ export default {
}
return '#'
},
discord() {
const discordLink = this.coinInfo.links.chat_url.filter(x => x.includes('discord'))
if (discordLink) {
return discordLink ? `${discordLink}` : '#'
}
return '#'
},
telegram() {
if (this.coinInfo.links) {
return this.coinInfo.links.telegram_channel_identifier ? `https://t.me/${this.coinInfo.links.telegram_channel_identifier}` : '#'