mirror of
https://github.com/revanced/revanced-website.git
synced 2025-05-25 19:12:12 +02:00
refactor: fetch status page
This commit is contained in:
parent
87c4bfa88b
commit
ff58050f13
@ -2,17 +2,15 @@
|
|||||||
import Banner from '$components/organisms/Banner.svelte';
|
import Banner from '$components/organisms/Banner.svelte';
|
||||||
import Button from '$components/atoms/Button.svelte';
|
import Button from '$components/atoms/Button.svelte';
|
||||||
import api from '$api';
|
import api from '$api';
|
||||||
|
|
||||||
const statusUrl = 'https://status.revanced.app/'; // TODO: replace with env variable
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#await api.general.ping() then apiUp}
|
{#await api.general.ping() then apiUp}
|
||||||
{#if !apiUp}
|
{#if !apiUp}
|
||||||
<Banner level="caution" permanent>
|
<Banner level="caution" permanent>
|
||||||
The API is currently unresponsive and some services may not work correctly.
|
The API is currently unresponsive and some services may not work correctly.
|
||||||
{#if statusUrl}
|
{#await api.general.getAbout() then data}
|
||||||
Check the <Button type="text" href={statusUrl}>status page</Button> for updates.
|
Check the <Button type="text" href={data.status}>status page</Button> for updates.
|
||||||
{/if}
|
{/await}
|
||||||
</Banner>
|
</Banner>
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user