make stuff work without js
All checks were successful
Build the docker image for the API / build (push) Successful in 2m7s
Build the docker image for the frontend application / build (push) Successful in 42s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-04-08 02:39:37 +03:00
parent b312e40204
commit ccf0d8abf9
15 changed files with 95 additions and 113 deletions

View File

@ -1,14 +1,16 @@
<script>
import { app_url, color, date_from_ts } from "$lib/util.js";
import { color, date_from_ts } from "$lib/util.js";
import { api_get_metrics } from "$lib/api.js";
import Link from "$lib/link.svelte";
import { onMount } from "svelte";
import { _ } from "svelte-i18n";
let data = {};
let show_counter = false,
data = {};
onMount(async () => {
show_counter = true;
data = await api_get_metrics(fetch);
});
</script>
@ -20,24 +22,28 @@
</span>
<span>/</span>
<span>
<Link link={app_url("/doc/license")} bold={true}>{$_("footer.license")}</Link>
<Link link="/doc/license" bold={true}>{$_("footer.license")}</Link>
</span>
<span>/</span>
<span>
<Link link={app_url("/doc/privacy")} bold={true}>{$_("footer.privacy")}</Link>
<Link link="/doc/privacy" bold={true}>{$_("footer.privacy")}</Link>
</span>
</div>
<span class="counter">
{$_("footer.number", {
values: {
total: data.total,
since: date_from_ts(data.since),
},
})}
{#if data.number % 1000 == 0}
<span style="color: var(--{color()})">({$_("footer.wow")})</span>
{/if}
</span>
{#if show_counter}
<span class="counter">
{$_("footer.number", {
values: {
total: data.total,
since: date_from_ts(data.since),
},
})}
{#if data.number % 1000 == 0}
<span style="color: var(--{color()})">({$_("footer.wow")})</span>
{/if}
</span>
{:else}
<span class="counter">{$_("footer.js")}</span>
{/if}
</footer>
<style>