Files
fnx_web/svelte/src/layout/Footer.svelte

75 lines
2.3 KiB
Svelte
Raw Normal View History

<script lang="ts">
2024-09-09 23:59:04 +02:00
import { onMount } from "svelte";
import Discord from "icons/Discord.svelte";
import Github from "icons/Github.svelte";
import Mastodon from "icons/Mastodon.svelte";
import Patreon from "icons/Patreon.svelte";
import Reddit from "icons/Reddit.svelte";
import { formatDataVolumeBits } from "util/Formatting";
import { get_endpoint, get_hostname } from "lib/PixeldrainAPI";
2024-09-09 23:59:04 +02:00
2024-11-18 17:09:27 +01:00
export let nobg = false
2024-09-09 23:59:04 +02:00
let server_tx = 0
let cache_tx = 0
let storage_tx = 0
onMount(async () => {
try {
const resp = await fetch(get_endpoint()+"/misc/cluster_speed")
2024-09-09 23:59:04 +02:00
if (resp.status >= 400) {
throw Error(await resp.text())
}
const speed = await resp.json()
server_tx = speed.server_tx
cache_tx = speed.cache_tx
storage_tx = speed.storage_tx
} catch (err) {
console.error("Failed to get speed stats", err)
}
})
2022-10-11 14:21:06 +02:00
</script>
2024-11-18 17:09:27 +01:00
<footer class:nobg>
2022-10-11 14:21:06 +02:00
<div class="footer_content">
2022-12-05 15:01:04 +01:00
<div style="display: inline-block; margin: 0 8px;">
2022-12-24 11:37:31 +01:00
Pixeldrain is a product by
<a href="//fornaxian.tech" target="_blank" rel="noreferrer">Fornaxian Technologies</a>
2022-10-11 14:21:06 +02:00
</div>
2024-01-23 11:55:19 +01:00
<br/>
2022-12-05 15:01:04 +01:00
<div style="display: inline-block; margin: 0 8px;">
2022-12-24 11:37:31 +01:00
<a href="https://www.patreon.com/pixeldrain" target="_blank" rel="noreferrer">
2022-10-11 14:21:06 +02:00
<Patreon style="color: var(--body_text_color);"/> Patreon
</a> |
<a href="https://discord.gg/TWKGvYAFvX" target="_blank" rel="noreferrer">
2024-01-23 11:55:19 +01:00
<Discord style="color: var(--body_text_color);"/> Discord
</a> |
2022-12-24 11:37:31 +01:00
<a href="https://reddit.com/r/pixeldrain" target="_blank" rel="noreferrer">
2022-10-11 14:21:06 +02:00
<Reddit style="color: var(--body_text_color);"/> Reddit
</a> |
2022-12-24 11:37:31 +01:00
<a href="https://github.com/Fornaxian" target="_blank" rel="noreferrer">
2022-10-11 14:21:06 +02:00
<Github style="color: var(--body_text_color);"/> GitHub
</a> |
2022-12-24 11:37:31 +01:00
<a href="https://mastodon.social/web/@fornax" target="_blank" rel="noreferrer">
2022-10-11 14:21:06 +02:00
<Mastodon style="color: var(--body_text_color);"/> Mastodon
</a>
</div>
<br/>
2024-09-09 23:59:04 +02:00
<div style="display: inline-block; margin: 0 8px;">
Server speed: {formatDataVolumeBits(server_tx, 4)}ps |
Cache cluster: {formatDataVolumeBits(cache_tx, 4)}ps |
Storage cluster: {formatDataVolumeBits(storage_tx, 4)}ps
</div>
<br/>
2022-10-11 14:21:06 +02:00
<span class="small_footer_text" style="font-size: .75em; line-height: .75em;">
page rendered by {get_hostname()}
2022-10-11 14:21:06 +02:00
</span>
</div>
</footer>
2024-11-18 17:09:27 +01:00
<style>
.nobg {
background-image: none;
background-color: unset;
box-shadow: none;
}
</style>