server button placeholders

This commit is contained in:
Corban-Lee Jones 2024-09-25 11:41:46 +01:00
parent 2d568cb913
commit d0c6c7c743
2 changed files with 20 additions and 0 deletions

View File

@ -154,8 +154,10 @@ $(document).on("selectedServerChange", function() {
// #region Load Servers
async function loadServers() {
$(".server-loading-item").show();
try {
let response = await generateServers();
$(".server-loading-item").hide();
response.forEach(server => {
addToLoadedServers(server, false);
});

View File

@ -15,6 +15,24 @@
<div class="server-sidebar d-flex flex-column bg-body-tertiary py-3 border-end">
<h6 class="d-none d-lg-block ms-3">Discord Servers</h6>
<ul id="serverList" class="nav nav-pills nav-flush flex-column mb-auto text-center px-lg-2 px-1 flex-nowrap overflow-y-auto">
{% for i in "01234567890123"|make_list %}
<li class="nav-item server-loading-item">
<div class="btn border-0 w-100 position-relative">
<div class="d-flex justify-content-start align-items-center w-100 placeholder-wave">
<div class="rounded-1 placeholder" style="min-width: 45px !important; min-height: 45px !important;"></div>
<div class="text-start ps-2 w-100 flex-shrink-1 placeholder-wave">
{% if forloop.counter0|divisibleby:2 %}
<div class="placeholder rounded-1 w-50"></div>
<div class="placeholder rounded-1 w-75"></div>
{% else %}
<div class="placeholder rounded-1 w-75"></div>
<div class="placeholder rounded-1 w-50"></div>
{% endif %}
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
<ul class="d-flex flex-lg-row flex-column list-unstyled text-center flex-nowrap mb-0 px-lg-4 px-2 align-items-center">
<li>