Skip to content

Commit

Permalink
fix quality loading icon removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Austionian committed Aug 9, 2024
1 parent f7db4c3 commit 837a788
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions assets/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ function parseLatestData(data) {
"style",
`color: ${data.quality_color}`,
);

document
.querySelectorAll(".wave-quality-loader")
.forEach((e) => e.remove());
}

NonNull(document.getElementById("current-water-temp")).innerText =
Expand Down Expand Up @@ -267,6 +271,10 @@ function parseForecastData(data) {
const text = NonNull(document.getElementById("wave-quality-text"));
text.innerText = qualityMap[FLAT_COLOR];
text.setAttribute("style", `color: ${FLAT_COLOR}`);

document
.querySelectorAll(".wave-quality-loader")
.forEach((e) => e.remove());
}

document
Expand Down
4 changes: 2 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
href="https://cdn.jsdelivr.net/npm/chart.js"
as="script"
/>
<link rel="preload" href="/assets/static/index.js?v=5" as="script" />
<link rel="preload" href="/assets/static/index.js?v=6" as="script" />

<link href="/assets/styles.css" rel="stylesheet" type="text/css" />
<style>
Expand All @@ -29,7 +29,7 @@
@keyup.escape="showLiveFeed = false; showNav = false;"
:class="{ 'overflow-hidden': showNav || showLiveFeed }"
>
<script src="/assets/static/index.js?v=5"></script>
<script src="/assets/static/index.js?v=6"></script>
{% block body %} {% endblock %} {% include "includes/footer.html" %}
</body>
</html>
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
border-radius: 99px;
margin: auto 10px auto 0;
"
class="loader latest-loader bg-gray-700 animate-pulse"
class="wave-quality-loader bg-gray-700 animate-pulse"
></div>
<div
id="wave-quality"
Expand Down Expand Up @@ -105,7 +105,7 @@
</div>
<div class="flex items-baseline">
<div
class="loader latest-loader w-[40px] h-[20px] animate-pulse rounded-xl bg-gray-700"
class="wave-quality-loader w-[40px] h-[20px] animate-pulse rounded-xl bg-gray-700"
></div>
<div
id="wave-quality-text"
Expand Down

0 comments on commit 837a788

Please sign in to comment.