Improve error message with support link

This commit is contained in:
Damodar Lohani
2025-06-05 06:53:28 +00:00
parent 0d94f93f2b
commit 6ae329f7d7
@@ -1,8 +1,11 @@
<script lang="ts">
import { page } from '$app/state';
import { Container } from '$lib/layout';
import { Card, Typography } from '@appwrite.io/pink-svelte';
import { Card, Link, Typography } from '@appwrite.io/pink-svelte';
import SupportWizard from '$routes/(console)/supportWizard.svelte';
import { capitalize } from '$lib/helpers/string';
import { currentPlan } from '$lib/stores/organization';
import { wizard } from '$lib/stores/wizard';
function getResource(id: string) {
id = id.replace('/(console)/project-[region]-[project]/', '');
let parts = id.split('/');
@@ -19,7 +22,16 @@
<Typography.Title size="s">Your {capitalize(resource)} is paused</Typography.Title>
<p class="text-red-500">
We've detected unusual activity and temporarily paused your {resource}. If you
believe this is a mistake or need urgent access, please contact support@appwrite.io.
believe this is a mistake or need urgent access, please contact
{#if $currentPlan?.premiumSupport}
<Link.Button
on:click={() => {
wizard.start(SupportWizard);
}}>support</Link.Button
>.
{:else}
support@appwrite.io.
{/if}
</p>
</Card.Base>
{:else}