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 Button from '$components/atoms/Button.svelte';
|
||||
import api from '$api';
|
||||
|
||||
const statusUrl = 'https://status.revanced.app/'; // TODO: replace with env variable
|
||||
</script>
|
||||
|
||||
{#await api.general.ping() then apiUp}
|
||||
{#if !apiUp}
|
||||
<Banner level="caution" permanent>
|
||||
The API is currently unresponsive and some services may not work correctly.
|
||||
{#if statusUrl}
|
||||
Check the <Button type="text" href={statusUrl}>status page</Button> for updates.
|
||||
{/if}
|
||||
{#await api.general.getAbout() then data}
|
||||
Check the <Button type="text" href={data.status}>status page</Button> for updates.
|
||||
{/await}
|
||||
</Banner>
|
||||
{/if}
|
||||
{/await}
|
||||
|
Loading…
x
Reference in New Issue
Block a user