diff --git a/src/routes/(console)/onboarding/+page.svelte b/src/routes/(console)/onboarding/+page.svelte
index 1e4373c63..e714c1a5a 100644
--- a/src/routes/(console)/onboarding/+page.svelte
+++ b/src/routes/(console)/onboarding/+page.svelte
@@ -32,11 +32,11 @@
{
value: BillingPlan.PRO,
label: `${tierToPlan(BillingPlan.PRO).name} - ${formatCurrency($plansInfo.get(BillingPlan.PRO).price)}/month + add-ons`
- },
- {
- value: BillingPlan.SCALE,
- label: `${tierToPlan(BillingPlan.SCALE).name} - ${formatCurrency($plansInfo.get(BillingPlan.SCALE).price)}/month + usage`
}
+ // {
+ // value: BillingPlan.SCALE,
+ // label: `${tierToPlan(BillingPlan.SCALE).name} - ${formatCurrency($plansInfo.get(BillingPlan.SCALE).price)}/month + usage`
+ // }
]
: [];
diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte
index 0e394e4a4..705b96abe 100644
--- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte
+++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte
@@ -149,9 +149,9 @@
type: 'success',
isHtml: true,
message: `
-
${$organization.name} has been changed to ${
- tierToPlan(billingPlan).name
- } plan.`
+
${$organization.name} will change to ${
+ tierToPlan(billingPlan).name
+ } plan at the end of the current billing cycle.`
});
trackEvent(Submit.OrganizationDowngrade, {
@@ -162,7 +162,7 @@
type: 'error',
message: e.message
});
- trackError(e, isUpgrade ? Submit.OrganizationUpgrade : Submit.OrganizationDowngrade);
+ trackError(e, Submit.OrganizationDowngrade);
}
}
@@ -213,22 +213,12 @@
await invalidate(Dependencies.ORGANIZATION);
await goto(`${base}/organization-${org.$id}`);
- if (isUpgrade) {
- addNotification({
- type: 'success',
- message: 'Your organization has been upgraded'
- });
- } else {
- addNotification({
- type: 'success',
- isHtml: true,
- message: `
-
${$organization.name} will change to ${
- tierToPlan(billingPlan).name
- } plan at the end of the current billing cycle.`
- });
- }
- trackEvent(isUpgrade ? Submit.OrganizationUpgrade : Submit.OrganizationDowngrade, {
+ addNotification({
+ type: 'success',
+ message: 'Your organization has been upgraded'
+ });
+
+ trackEvent(Submit.OrganizationUpgrade, {
plan: tierToPlan(billingPlan)?.name
});
} catch (e) {
@@ -236,7 +226,7 @@
type: 'error',
message: e.message
});
- trackError(e, isUpgrade ? Submit.OrganizationUpgrade : Submit.OrganizationDowngrade);
+ trackError(e, Submit.OrganizationUpgrade);
}
}
@@ -324,6 +314,7 @@
bind:value={feedbackDowngradeReason} />
diff --git a/src/routes/(console)/organization-[organization]/createMember.svelte b/src/routes/(console)/organization-[organization]/createMember.svelte
index 6e0509539..cbc3d0341 100644
--- a/src/routes/(console)/organization-[organization]/createMember.svelte
+++ b/src/routes/(console)/organization-[organization]/createMember.svelte
@@ -1,4 +1,5 @@
-
+
Template language
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/+page.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/+page.svelte
index 7b5de902a..89b73c96b 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/+page.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/+page.svelte
@@ -44,30 +44,11 @@
$: hasValidAttributes = $collection?.attributes?.some((attr) => attr.status === 'available');
-
-
-
Documents
-
-
-
-
-
-
-
-
-
+{#key $page.params.collection}
+
+
+
Documents
+
+
+
+
+
+
+
+
+
+
-
- {#if hasAttributes && hasValidAttributes}
- {#if data.documents.total}
-
+ {#if hasAttributes && hasValidAttributes}
+ {#if data.documents.total}
+
-
- {:else if $hasPageQueries}
-
-
-
-
Sorry, we couldn't find any documents.
-
There are no documents that match your filters.
+
+ {:else if $hasPageQueries}
+
+
+
+
Sorry, we couldn't find any documents.
+
There are no documents that match your filters.
+
+
+
+
-
+
+ {:else}
+
+ {/if}
+ {:else}
+
(showCreateDropdown = true)}>
+
+
Create an attribute to get started.
+
+ Need a hand? Learn more in our documentation.
+
+
+
+
+
-
+
-
- {:else}
-
+
{/if}
- {:else}
-
(showCreateDropdown = true)}>
-
-
Create an attribute to get started.
-
- Need a hand? Learn more in our documentation.
-
-
-
-
-
-
-
-
-
- {/if}
-
+
+{/key}
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/+page.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/+page.svelte
index 620493a7d..36ba1d69e 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/+page.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/+page.svelte
@@ -96,7 +96,7 @@
},
{
id: 'size',
- title: 'Deployment size',
+ title: 'Size',
type: 'integer',
show: true,
width: 140,
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/deploymentDomains.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/deploymentDomains.svelte
index 68b475340..bd441f17c 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/deploymentDomains.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/deploymentDomains.svelte
@@ -8,14 +8,17 @@
-
-
+
+
{domain.rules[0].domain}
-
-
-
+
+
+
{#if domain.rules.length > 1}
(showDropdown = !showDropdown)}>
diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/+page.ts b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/+page.ts
index 13eb6f5fe..59898b37f 100644
--- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/+page.ts
+++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/+page.ts
@@ -4,7 +4,6 @@ import { getLimit, getPage, getSearch, pageToOffset } from '$lib/helpers/load';
import { Dependencies, PAGE_LIMIT } from '$lib/constants';
import type { PageLoad } from './$types';
import { isCloud } from '$lib/system';
-import type { OrganizationUsage } from '$lib/sdk/billing';
export const load: PageLoad = async ({ params, depends, url, route, parent }) => {
const { organization } = await parent();
@@ -13,20 +12,20 @@ export const load: PageLoad = async ({ params, depends, url, route, parent }) =>
const search = getSearch(url);
const limit = getLimit(url, route, PAGE_LIMIT);
const offset = pageToOffset(page, limit);
- let organizationUsage: OrganizationUsage = null;
- if (isCloud && organization?.$id) {
- organizationUsage = await sdk.forConsole.billing.listUsage(organization.$id);
- }
- return {
- offset,
- limit,
- search,
- files: await sdk.forProject.storage.listFiles(
+ const [files, organizationUsage] = await Promise.all([
+ sdk.forProject.storage.listFiles(
params.bucket,
[Query.limit(limit), Query.offset(offset), Query.orderDesc('')],
search
),
+ isCloud && organization?.$id ? sdk.forConsole.billing.listUsage(organization.$id) : null
+ ]);
+ return {
+ offset,
+ limit,
+ search,
+ files,
organizationUsage
};
};
diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/create.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/create.svelte
index 66315f0dd..92a1e965d 100644
--- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/create.svelte
+++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/create.svelte
@@ -28,17 +28,18 @@
});
async function create() {
+ const fileId = $createFile.id ?? ID.unique();
+
try {
- uploader.uploadFile(
+ const uploadPromise = uploader.uploadFile(
bucketId,
- $createFile.id ?? ID.unique(),
+ fileId,
$createFile.files[0],
$createFile.permissions
);
createFile.reset();
wizard.hide();
- invalidate(Dependencies.FILES);
addNotification({
type: 'success',
@@ -47,7 +48,12 @@
trackEvent(Submit.FileCreate, {
customId: !!$createFile.id
});
+
+ await uploadPromise;
+ invalidate(Dependencies.FILES);
} catch (e) {
+ uploader.removeFromQueue(fileId);
+
addNotification({
type: 'error',
message: e.message
diff --git a/vite.config.ts b/vite.config.ts
index 6dbb7e456..fae0c9bb7 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,16 +1,24 @@
import { defineConfig } from 'vitest/config';
import { sveltekit } from '@sveltejs/kit/vite';
+import { sentrySvelteKit } from '@sentry/sveltekit';
const config = defineConfig({
- plugins: [sveltekit()],
+ plugins: [
+ sentrySvelteKit({
+ adapter: 'auto',
+ sourceMapsUploadOptions: {
+ org: 'appwrite',
+ project: 'console'
+ }
+ }),
+ sveltekit()
+ ],
optimizeDeps: {
include: ['echarts', 'prismjs']
},
ssr: {
noExternal: [
'@analytics/google-analytics',
- '@sentry/browser',
- '@sentry-internal/tracing',
'analytics',
'dayjs',
'echarts',