mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Handle guild name and image updates realtime
This commit is contained in:
parent
441a0814ae
commit
8038a1b4fc
@ -1085,6 +1085,16 @@
|
|||||||
emoji_store = emo;
|
emoji_store = emo;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on("GUILD_UPDATE", function (guil) {
|
||||||
|
$("#guild_name").text(guil.name);
|
||||||
|
if (guil.icon) {
|
||||||
|
$("#guild_icon").attr("src", guil.icon_url);
|
||||||
|
$("#guild_icon").show();
|
||||||
|
} else {
|
||||||
|
$("#guild_icon").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
socket.on("CHANNEL_DELETE", function (chan) {
|
socket.on("CHANNEL_DELETE", function (chan) {
|
||||||
for (var i = 0; i < guild_channels_list.length; i++) {
|
for (var i = 0; i < guild_channels_list.length; i++) {
|
||||||
var thatchannel = guild_channels_list[i];
|
var thatchannel = guild_channels_list[i];
|
||||||
|
@ -43,10 +43,8 @@
|
|||||||
<ul id="guild-nav" class="side-nav">
|
<ul id="guild-nav" class="side-nav">
|
||||||
<li>
|
<li>
|
||||||
<div class="userView">
|
<div class="userView">
|
||||||
{% if guild['icon'] %}
|
<img id="guild_icon" class="circle" src="{{ generate_guild_icon( guild['id'], guild['icon'] ) }}" {% if not guild['icon'] %}style="display: none;"{% endif %}>
|
||||||
<img class="circle" src="{{ generate_guild_icon( guild['id'], guild['icon'] ) }}">
|
<span id="guild_name" class="name">{{ guild['name']|e }}</span>
|
||||||
{% endif %}
|
|
||||||
<span class="name">{{ guild['name']|e }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user