mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-24 14:07:03 +01:00
Basic server information and discord.gg btn
This commit is contained in:
parent
029bcff59d
commit
bb35d3700b
@ -80,6 +80,14 @@
|
||||
return funct.promise();
|
||||
}
|
||||
|
||||
function discord_embed() {
|
||||
var funct = $.ajax({
|
||||
dataType: "json",
|
||||
url: "https://discordapp.com/api/guilds/" + guild_id + "/widget.json",
|
||||
});
|
||||
return funct.promise();
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$("#focusmodal").modal({
|
||||
dismissible: true,
|
||||
@ -106,6 +114,11 @@
|
||||
$("#focusmodal").modal("close");
|
||||
has_already_been_focused = true;
|
||||
|
||||
var dembed = discord_embed();
|
||||
dembed.done(function (data) {
|
||||
$("#modal_invite_btn").attr("href", data.instant_invite);
|
||||
});
|
||||
|
||||
$("#loginmodal").modal({
|
||||
dismissible: false, // Modal can be dismissed by clicking outside of the modal
|
||||
opacity: .5, // Opacity of modal background
|
||||
|
@ -76,6 +76,15 @@
|
||||
<div id="loginmodal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>{{ login_greeting }}</h4>
|
||||
<div class="row valign-wrapper">
|
||||
<div class="col m3 s12" style="background-color: #455a64; padding-top: 10px; padding-bottom: 10px;">
|
||||
{% if guild['icon'] %}
|
||||
<img class="circle" src="{{ generate_guild_icon( guild['id'], guild['icon'] ) }}">
|
||||
{% endif %}
|
||||
<p id="modal_guildname"><strong>{{ guild['name'] }}</strong></p>
|
||||
<a id="modal_invite_btn" class="waves-effect waves-light btn" target="_blank">discord.gg</a>
|
||||
</div>
|
||||
<div class="col m9 s12">
|
||||
<p class="flow-text">Please choose one of the following methods to authenticate!</p>
|
||||
<div class="progress" id="loginProgress" style="display: none;">
|
||||
<div class="indeterminate"></div>
|
||||
@ -95,6 +104,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="focusmodal" class="modal">
|
||||
<div class="modal-content">
|
||||
|
Loading…
Reference in New Issue
Block a user