+ {#if variant === 'gradient'}
+
+
+

+
+
+

+
-
-

+ {:else}
+
+
-
+ {/if}
@@ -62,17 +73,39 @@
-
diff --git a/src/routes/(console)/organization-[organization]/header.svelte b/src/routes/(console)/organization-[organization]/header.svelte
index 86fe4a0c9..d4b2d16c9 100644
--- a/src/routes/(console)/organization-[organization]/header.svelte
+++ b/src/routes/(console)/organization-[organization]/header.svelte
@@ -8,7 +8,7 @@
import { isTabSelected } from '$lib/helpers/load';
import { Cover } from '$lib/layout';
import { daysLeftInTrial, getServiceLimit, plansInfo, readOnly } from '$lib/stores/billing';
- import { members, newMemberModal, organization } from '$lib/stores/organization';
+ import { members, newMemberModal, type Organization } from '$lib/stores/organization';
import {
canSeeBilling,
canSeeProjects,
@@ -18,20 +18,21 @@
} from '$lib/stores/roles';
import { GRACE_PERIOD_OVERRIDE, isCloud } from '$lib/system';
import { IconGithub, IconPlus } from '@appwrite.io/pink-icons-svelte';
- import { Icon, Tooltip, Typography, Layout, Badge } from '@appwrite.io/pink-svelte';
+ import { Badge, Icon, Layout, Tooltip, Typography } from '@appwrite.io/pink-svelte';
let areMembersLimited: boolean;
- $: organization.subscribe(() => {
+
+ $: {
const limit = getServiceLimit('members') || Infinity;
const isLimited = limit !== 0 && limit < Infinity;
areMembersLimited =
isCloud &&
(($readOnly && !GRACE_PERIOD_OVERRIDE) || (isLimited && $members?.total >= limit));
- });
+ }
+ $: organization = page.data.organization as Organization;
$: avatars = $members.memberships?.map((m) => m.userName || m.userEmail) ?? [];
- $: organizationId = $organization?.$id ?? page.params.organization;
- $: path = `${base}/organization-${organizationId}`;
+ $: path = `${base}/organization-${organization.$id}`;
$: tabs = [
{
href: path,
@@ -75,26 +76,26 @@
].filter((tab) => !tab.disabled);
-{#if $organization.$id}
+{#if organization?.$id}
- {$organization.name}
+ {organization.name}
- {#if isCloud && $organization?.billingPlan === BillingPlan.GITHUB_EDUCATION}
+ {#if isCloud && organization?.billingPlan === BillingPlan.GITHUB_EDUCATION}
- {:else if isCloud && $organization?.billingPlan === BillingPlan.FREE}
+ {:else if isCloud && organization?.billingPlan === BillingPlan.FREE}
{/if}
- {#if isCloud && $organization?.billingTrialStartDate && $daysLeftInTrial > 0 && $organization.billingPlan !== BillingPlan.FREE && $plansInfo.get($organization.billingPlan)?.trialDays}
+ {#if isCloud && organization?.billingTrialStartDate && $daysLeftInTrial > 0 && organization.billingPlan !== BillingPlan.FREE && $plansInfo.get(organization.billingPlan)?.trialDays}
{`Your trial ends on ${toLocaleDate(
- $organization.billingStartDate
+ organization.billingStartDate
)}. ${$daysLeftInTrial} days remaining.`}
diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+page.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+page.svelte
index b7e886be5..989916cf9 100644
--- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/+page.svelte
@@ -1,37 +1,31 @@
-
-
-
-
-
-
- {#if $canWriteCollections}
-
- {/if}
-
-
+
+ {#if $canWriteCollections}
+
+ {/if}
+
{#if data.collections.total}
{#if data.view === 'grid'}
diff --git a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/+page.svelte b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/+page.svelte
index 3af8bb2e4..66faf1e8d 100644
--- a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/+page.svelte
@@ -11,7 +11,7 @@
import { sortBranches } from '$lib/stores/vcs';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
import { LabelCard } from '$lib/components';
- import { Runtime, StatusCode, type Models } from '@appwrite.io/console';
+ import { type Models, ProxyResourceType, Runtime, StatusCode } from '@appwrite.io/console';
import { statusCodeOptions } from '$lib/stores/domains';
import { writable } from 'svelte/store';
import { onMount } from 'svelte';
@@ -48,18 +48,21 @@
async function addDomain() {
const apexDomain = getApexDomain(domainName);
- let domain = data.domains?.domains.find((d) => d.domain === apexDomain);
+ let domain = data.domains?.domains.find((d: Models.Domain) => d.domain === apexDomain);
if (apexDomain && !domain && isCloud) {
try {
domain = await sdk.forConsole.domains.create($project.teamId, apexDomain);
} catch (error) {
- addNotification({
- type: 'error',
- message: error.message
- });
-
- return;
+ // apex might already be added on organization level, skip.
+ const alreadyAdded = error?.type === 'domain_already_exists';
+ if (!alreadyAdded) {
+ addNotification({
+ type: 'error',
+ message: error.message
+ });
+ return;
+ }
}
}
@@ -72,7 +75,13 @@
} else if (behaviour === 'REDIRECT') {
rule = await sdk
.forProject(page.params.region, page.params.project)
- .proxy.createRedirectRule(domainName, redirect, statusCode);
+ .proxy.createRedirectRule(
+ domainName,
+ redirect,
+ statusCode,
+ page.params.function,
+ ProxyResourceType.Function
+ );
} else if (behaviour === 'ACTIVE') {
rule = await sdk
.forProject(page.params.region, page.params.project)
diff --git a/src/routes/(console)/project-[region]-[project]/messaging/+page.svelte b/src/routes/(console)/project-[region]-[project]/messaging/+page.svelte
index 0ed4c8b4c..12821a0bf 100644
--- a/src/routes/(console)/project-[region]-[project]/messaging/+page.svelte
+++ b/src/routes/(console)/project-[region]-[project]/messaging/+page.svelte
@@ -1,19 +1,11 @@
-
-
-
-
-
-
-
- {#if $canWriteMessages}
-
- {/if}
-
-
+
+ {#if $canWriteMessages}
+
+ {/if}
+
{#if data.messages.total}
import { page } from '$app/state';
import { Button } from '$lib/elements/forms';
- import {
- Empty,
- EmptySearch,
- SearchQuery,
- PaginationWithLimit,
- EmptyFilter,
- ViewSelector
- } from '$lib/components';
+ import { Empty, EmptySearch, PaginationWithLimit, EmptyFilter } from '$lib/components';
import Create from './create.svelte';
import { goto } from '$app/navigation';
- import { Container } from '$lib/layout';
+ import { Container, ResponsiveContainerHeader } from '$lib/layout';
import { base } from '$app/paths';
import type { Models } from '@appwrite.io/console';
import type { PageData } from './$types';
import { showCreate } from './store';
- import { Filters, hasPageQueries } from '$lib/components/filters';
+ import { hasPageQueries } from '$lib/components/filters';
import Table from './table.svelte';
import type { Column } from '$lib/helpers/types';
import { writable } from 'svelte/store';
import { canWriteTopics } from '$lib/stores/roles';
- import { Icon, Layout } from '@appwrite.io/pink-svelte';
+ import { Icon } from '@appwrite.io/pink-svelte';
import { View } from '$lib/helpers/load';
import { IconPlus } from '@appwrite.io/pink-icons-svelte';
import { Click, trackEvent } from '$lib/actions/analytics';
@@ -72,26 +65,26 @@
-
-
-
-
-
-
-
- {#if $canWriteTopics}
-
- {/if}
-
-
+
+ {#if $canWriteTopics}
+
+ {/if}
+
{#if data.topics.total}
diff --git a/src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte b/src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
index 59460df7e..8d0aa74df 100644
--- a/src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
+++ b/src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte
@@ -115,9 +115,11 @@ static const String APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject(page.params.reg
projectId,
platform,
$createPlatform.name,
- $createPlatform.key || undefined,
+ platform === PlatformType.Flutterweb ? undefined : $createPlatform.key || undefined,
undefined,
- undefined
+ platform === PlatformType.Flutterweb
+ ? $createPlatform.hostname || undefined
+ : undefined
);
isPlatformCreated = true;
@@ -189,19 +191,35 @@ static const String APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject(page.params.reg
bind:value={$createPlatform.name} />
-
-
-
-
- {placeholder[platform].tooltip}
-
-
-
+ {#if platform === PlatformType.Flutterweb}
+
+
+
+
+ {placeholder[platform].tooltip}
+
+
+
+ {:else}
+
+
+
+
+ {placeholder[platform].tooltip}
+
+
+
+ {/if}