webcompile/src/routes/instances/+page.svelte

91 lines
1.8 KiB
Svelte
Raw Normal View History

2022-11-10 00:12:34 +05:30
<script lang="ts">
import { CardInner, CardOuter, LinksOuter, Link } from "$lib/Card";
2022-12-27 20:58:47 +05:30
import InstanceLink from "./InstanceLink.svelte";
import dayjs from "dayjs";
2022-11-20 23:42:38 +05:30
import type { PageData } from "./$types";
2022-12-27 20:58:47 +05:30
export let data: PageData;
2022-08-07 19:05:50 +05:30
</script>
2022-08-24 21:37:30 +05:30
<svelte:head>
2022-09-10 21:28:19 +05:30
<title>Our instances | Project Segfault</title>
2022-12-27 20:58:47 +05:30
<meta
name="description"
content="Our collection of instances."
/>
2022-08-24 21:37:30 +05:30
</svelte:head>
2022-09-10 21:28:19 +05:30
<h1>Our instances</h1>
2022-11-20 23:42:38 +05:30
<div class="flex flex-col gap-4">
<CardOuter>
<div class="flex flex-col">
{#each data.instances.status as group}
<h2>{group.name}</h2>
<div class="flex flex-row flex-wrap gap-8">
{#each group.data as item}
<CardInner
title={item.name}
description={item.description}
icon={item.icon}
>
<LinksOuter>
2023-01-01 14:41:20 +05:30
{#if item.geo}
<InstanceLink
url={item.geo}
item={item.statusGeo}
type="geo"
/>
{/if}
{#if item.eu}
<InstanceLink
url={item.eu}
item={item.statusEu}
type="eu"
/>
{/if}
{#if item.us}
2022-12-27 20:58:47 +05:30
<InstanceLink
url={item.us}
item={item.statusUs}
type="us"
2022-12-27 20:58:47 +05:30
/>
{/if}
2022-11-20 23:42:38 +05:30
{#if item.bp}
<InstanceLink
url={item.bp}
item={item.statusBp}
type="backup"
/>
{/if}
{#if item.tor}
<InstanceLink
url={item.tor}
type="tor"
/>
{/if}
{#if item.torBp}
<InstanceLink
url={item.torBp}
type="torBp"
/>
{/if}
</LinksOuter>
</CardInner>
{/each}
</div>
{/each}
</div>
</CardOuter>
2022-12-27 20:58:47 +05:30
2023-01-01 14:41:20 +05:30
<span class="bg-secondary w-fit p-2 rounded-2"
>Instances status last updated: {dayjs
.unix(data.instances.updated)
.format("DD/MM/YYYY HH:mm:ss")}
</span>
</div>