diff --git a/src/lib/system.ts b/src/lib/system.ts index b9dab34d5..0e3408872 100644 --- a/src/lib/system.ts +++ b/src/lib/system.ts @@ -39,3 +39,12 @@ export function isMultiRegionSupported(url: URL): boolean { return false; } } + +// there can be multiple internal cloud instances. +export function isProductionCloud(url: URL): boolean { + try { + return url.hostname === 'cloud.appwrite.io'; + } catch { + return false; + } +} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9e4279458..578404583 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -6,7 +6,7 @@ import { trackPageView } from '$lib/actions/analytics'; import { Notifications, Progress } from '$lib/layout'; import { app, type AppStore } from '$lib/stores/app'; - import { isCloud } from '$lib/system'; + import { isCloud, isProductionCloud } from '$lib/system'; import { onMount } from 'svelte'; import { requestedMigration } from './store'; import { parseIfString } from '$lib/helpers/object'; @@ -174,9 +174,10 @@ {/if} - - - + + {#if isCloud && isProductionCloud(page.url)} + + {/if}