diff --git a/src/routes/api/status/icons/authentik.png b/src/routes/api/status/icons/authentik.png new file mode 100644 index 0000000..006b236 Binary files /dev/null and b/src/routes/api/status/icons/authentik.png differ diff --git a/src/routes/api/status/icons/beatbump.svg b/src/routes/api/status/icons/beatbump.svg new file mode 100644 index 0000000..b47e269 --- /dev/null +++ b/src/routes/api/status/icons/beatbump.svg @@ -0,0 +1,10 @@ + + logo + + + + + + \ No newline at end of file diff --git a/src/routes/api/status/icons/breezewiki.svg b/src/routes/api/status/icons/breezewiki.svg new file mode 100644 index 0000000..0bff39c --- /dev/null +++ b/src/routes/api/status/icons/breezewiki.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/routes/api/status/icons/element.svg b/src/routes/api/status/icons/element.svg new file mode 100644 index 0000000..54a91b7 --- /dev/null +++ b/src/routes/api/status/icons/element.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/routes/api/status/icons/gitea.png b/src/routes/api/status/icons/gitea.png new file mode 100644 index 0000000..5dacd77 Binary files /dev/null and b/src/routes/api/status/icons/gitea.png differ diff --git a/src/routes/api/status/icons/invidious.svg b/src/routes/api/status/icons/invidious.svg new file mode 100644 index 0000000..6f545df --- /dev/null +++ b/src/routes/api/status/icons/invidious.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/routes/api/status/icons/librarian.png b/src/routes/api/status/icons/librarian.png new file mode 100644 index 0000000..1b8d7f8 Binary files /dev/null and b/src/routes/api/status/icons/librarian.png differ diff --git a/src/routes/api/status/icons/libreddit.png b/src/routes/api/status/icons/libreddit.png new file mode 100644 index 0000000..8c0d3eb Binary files /dev/null and b/src/routes/api/status/icons/libreddit.png differ diff --git a/src/routes/api/status/icons/mailcow.svg b/src/routes/api/status/icons/mailcow.svg new file mode 100644 index 0000000..22cf7b6 --- /dev/null +++ b/src/routes/api/status/icons/mailcow.svg @@ -0,0 +1,182 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/routes/api/status/icons/nitter.png b/src/routes/api/status/icons/nitter.png new file mode 100644 index 0000000..24caa27 Binary files /dev/null and b/src/routes/api/status/icons/nitter.png differ diff --git a/src/routes/api/status/icons/piped.svg b/src/routes/api/status/icons/piped.svg new file mode 100644 index 0000000..f0356a6 --- /dev/null +++ b/src/routes/api/status/icons/piped.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/routes/api/status/icons/plausible.png b/src/routes/api/status/icons/plausible.png new file mode 100644 index 0000000..d7742eb Binary files /dev/null and b/src/routes/api/status/icons/plausible.png differ diff --git a/src/routes/api/status/icons/portainer.png b/src/routes/api/status/icons/portainer.png new file mode 100644 index 0000000..2a4010f Binary files /dev/null and b/src/routes/api/status/icons/portainer.png differ diff --git a/src/routes/api/status/icons/searxng.svg b/src/routes/api/status/icons/searxng.svg new file mode 100644 index 0000000..b94fe37 --- /dev/null +++ b/src/routes/api/status/icons/searxng.svg @@ -0,0 +1,56 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/src/routes/api/status/statusData.ts b/src/routes/api/status/statusData.ts index 090066a..2fd6d0d 100644 --- a/src/routes/api/status/statusData.ts +++ b/src/routes/api/status/statusData.ts @@ -1,9 +1,24 @@ import axios from "axios"; +import invidiousIcon from "./icons/invidious.svg"; +import librarianIcon from "./icons/librarian.png"; +import libredditIcon from "./icons/libreddit.png"; +import nitterIcon from "./icons/nitter.png"; +import pipedIcon from "./icons/piped.svg"; +import beatbumpIcon from "./icons/beatbump.svg"; +import breezeWikiIcon from "./icons/breezewiki.svg"; +import elementIcon from "./icons/element.svg"; +import searxngIcon from "./icons/searxng.svg"; +import giteaIcon from "./icons/gitea.png"; +import portainerIcon from "./icons/portainer.png"; +import authentikIcon from "./icons/authentik.png"; +import mailcowIcon from "./icons/mailcow.svg"; +import plausibleIcon from "./icons/plausible.png"; + const fetchStatus = (domain: string) => { const req = axios("https://" + domain, { timeout: 10000 }) .then((res) => res.status) - .catch((err) => err.response.status); + .catch((error) => error.response ? error.response.status : 500); return req; }; @@ -15,47 +30,75 @@ const statusData = [ { name: "Invidious", description: "A frontend for YouTube.", - link: "https://invidious.projectsegfau.lt/", + eu: "https://invidious.projectsegfau.lt/", us: "https://inv.us.projectsegfau.lt", bp: "https://inv.bp.projectsegfau.lt", - icon: "https://github.com/iv-org/invidious/raw/master/assets/invidious-colored-vector.svg", - status: await fetchStatus("invidious.projectsegfau.lt"), + icon: invidiousIcon, + statusEu: await fetchStatus("invidious.projectsegfau.lt"), statusUs: await fetchStatus("inv.us.projectsegfau.lt"), statusBp: await fetchStatus("inv.bp.projectsegfau.lt") }, { name: "Librarian", description: "A frontend for Odysee.", - link: "https://lbry.projectsegfau.lt/", - icon: "https://codeberg.org/avatars/dd785d92b4d4df06d448db075cd29274", - status: await fetchStatus("lbry.projectsegfau.lt") + eu: "https://lbry.projectsegfau.lt/", + geo: "https://lbry.g.projectsegfau.lt/", + icon: librarianIcon, + statusEu: await fetchStatus("lbry.projectsegfau.lt"), + statusGeo: await fetchStatus("lbry.g.projectsegfau.lt") }, { name: "Libreddit", description: "A frontend for Reddit.", - link: "https://libreddit.projectsegfau.lt/", + eu: "https://libreddit.projectsegfau.lt/", us: "https://libreddit.us.projectsegfau.lt", - icon: "https://github.com/spikecodes/libreddit/raw/master/static/logo.png", - status: await fetchStatus("libreddit.projectsegfau.lt"), - statusUs: await fetchStatus("libreddit.us.projectsegfau.lt") + geo: "https://libreddit.g.projectsegfau.lt/", + icon: libredditIcon, + statusEu: await fetchStatus("libreddit.projectsegfau.lt"), + statusUs: await fetchStatus("libreddit.us.projectsegfau.lt"), + statusGeo: await fetchStatus("libreddit.g.projectsegfau.lt") }, { name: "Nitter", description: "A frontend for Twitter.", - link: "https://nitter.projectsegfau.lt/", + eu: "https://nitter.projectsegfau.lt/", us: "https://nitter.us.projectsegfau.lt", - icon: "https://github.com/zedeus/nitter/raw/master/public/logo.png", - status: await fetchStatus("nitter.projectsegfau.lt"), - statusUs: await fetchStatus("nitter.us.projectsegfau.lt") + geo: "https://nitter.g.projectsegfau.lt/", + icon: nitterIcon, + statusEu: await fetchStatus("nitter.projectsegfau.lt"), + statusUs: await fetchStatus("nitter.us.projectsegfau.lt"), + statusGeo: await fetchStatus("nitter.g.projectsegfau.lt") }, { name: "Piped", description: "Another frontend for YouTube.", - link: "https://piped.projectsegfau.lt/", + eu: "https://piped.projectsegfau.lt/", us: "https://piped.us.projectsegfau.lt", - icon: "https://github.com/TeamPiped/Piped/raw/master/public/img/icons/logo.svg", - status: await fetchStatus("piped.projectsegfau.lt"), + icon: pipedIcon, + statusEu: await fetchStatus("piped.projectsegfau.lt"), statusUs: await fetchStatus("piped.us.projectsegfau.lt") + }, + { + name: "Beatbump", + description: "A frontend for YouTube Music.", + eu: "https://bb.eu.projectsegfau.lt/", + us: "https://bb.us.projectsegfau.lt/", + geo: "https://bb.g.projectsegfau.lt/", + icon: beatbumpIcon, + statusEu: await fetchStatus("bb.eu.projectsegfau.lt"), + statusUs: await fetchStatus("bb.us.projectsegfau.lt"), + statusGeo: await fetchStatus("bb.g.projectsegfau.lt") + }, + { + name: "BreezeWiki", + description: "A frontend for Fandom.", + eu: "https://bw.eu.projectsegfau.lt/", + us: "https://bw.us.projectsegfau.lt/", + geo: "https://bw.g.projectsegfau.lt/", + icon: breezeWikiIcon, + statusEu: await fetchStatus("bw.eu.projectsegfau.lt"), + statusUs: await fetchStatus("bw.us.projectsegfau.lt"), + statusGeo: await fetchStatus("bw.g.projectsegfau.lt") } ] }, @@ -66,25 +109,25 @@ const statusData = [ name: "Element", description: "An open source and decentralized chat application.", - link: "https://chat.projectsegfau.lt/", - icon: "https://element.io/images/logo-mark-primary.svg", - status: await fetchStatus("chat.projectsegfau.lt") + eu: "https://chat.projectsegfau.lt/", + icon: elementIcon, + statusEu: await fetchStatus("chat.projectsegfau.lt") }, { name: "SearXNG", description: "A private meta-search engine.", - link: "https://search.projectsegfau.lt/search", + eu: "https://search.projectsegfau.lt/search", us: "https://search.us.projectsegfau.lt", - icon: "https://docs.searxng.org/_static/searxng-wordmark.svg", - status: await fetchStatus("search.projectsegfau.lt"), + icon: searxngIcon, + statusEu: await fetchStatus("search.projectsegfau.lt"), statusUs: await fetchStatus("search.us.projectsegfau.lt") }, { name: "Gitea", description: "A web interface for Git, alternative to GitHub.", - link: "https://git.projectsegfau.lt/", - icon: "https://gitea.io/images/gitea.png", - status: await fetchStatus("git.projectsegfau.lt") + eu: "https://git.projectsegfau.lt/", + icon: giteaIcon, + statusEu: await fetchStatus("git.projectsegfau.lt") } ] }, @@ -94,23 +137,30 @@ const statusData = [ { name: "Portainer", description: "Portainer instance for our servers.", - link: "https://portainer.projectsegfau.lt/", - icon: "https://avatars.githubusercontent.com/u/22225832", - status: await fetchStatus("portainer.projectsegfau.lt") + eu: "https://portainer.projectsegfau.lt/", + icon: portainerIcon, + statusEu: await fetchStatus("portainer.projectsegfau.lt") + }, + { + name: "Authentik", + description: "Our OAuth provider.", + eu: "https://sekuritee.projectsegfau.lt/", + icon: authentikIcon, + statusEu: await fetchStatus("sekuritee.projectsegfau.lt") }, { name: "mailcow", description: "Our mail server and webmail.", - link: "https://mail.projectsegfau.lt/", - icon: "https://mailcow.email/images/cow_mailcow.svg", - status: await fetchStatus("mail.projectsegfau.lt") + eu: "https://mail.projectsegfau.lt/", + icon: mailcowIcon, + statusEu: await fetchStatus("mail.projectsegfau.lt") }, { name: "Plausible analytics", description: "Analytics for our website.", - link: "https://analytics.projectsegfau.lt/projectsegfau.lt", - icon: "https://avatars.githubusercontent.com/u/54802774", - status: await fetchStatus("analytics.projectsegfau.lt") + eu: "https://analytics.projectsegfau.lt/projectsegfau.lt", + icon: plausibleIcon, + statusEu: await fetchStatus("analytics.projectsegfau.lt") } ] } diff --git a/src/routes/instances/+page.svelte b/src/routes/instances/+page.svelte index 0fbc4a7..3e74c2c 100644 --- a/src/routes/instances/+page.svelte +++ b/src/routes/instances/+page.svelte @@ -30,11 +30,21 @@ icon={item.icon} > - + {#if item.geo} + + {/if} + + {#if item.eu} + + {/if} {#if item.us} - Instances status last updated: {dayjs .unix(data.instances.updated) .format("DD/MM/YYYY HH:mm:ss")} diff --git a/src/routes/instances/InstanceLink.svelte b/src/routes/instances/InstanceLink.svelte index 9c9f1b3..8f7293c 100644 --- a/src/routes/instances/InstanceLink.svelte +++ b/src/routes/instances/InstanceLink.svelte @@ -3,7 +3,7 @@ export let url: string; export let item: any; - export let type: "main" | "us" | "backup"; + export let type: "geo" | "eu" | "us" | "backup";