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]/databases/database-[database]/collection-[collection]/attributes/+page.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte
index 17f1f77bd..73896badd 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte
@@ -159,7 +159,7 @@
showEdit = true;
showDropdown[index] = false;
}}>
- Edit
+ Update
{#if !isRelationship(attribute)}
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateBooleanAttribute(
databaseId,
collectionId,
data.key,
data.required,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/datetime.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/datetime.svelte
index 6fc0798a6..a2cd24a12 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/datetime.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/datetime.svelte
@@ -21,14 +21,16 @@
export async function updateDatetime(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateDatetimeAttribute(
databaseId,
collectionId,
data.key,
data.required,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/edit.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/edit.svelte
index 4cbd41550..a42c7d890 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/edit.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/edit.svelte
@@ -16,6 +16,7 @@
const databaseId = $page.params.database;
const collectionId = $page.params.collection;
+ let originalKey = '';
let error: string;
let currentAttr: Attributes;
@@ -32,7 +33,7 @@
async function submit() {
try {
- await option.update(databaseId, collectionId, selectedAttribute);
+ await option.update(databaseId, collectionId, selectedAttribute, originalKey);
await invalidate(Dependencies.COLLECTION);
if (!$page.url.pathname.includes('attributes')) {
await goto(
@@ -53,7 +54,10 @@
$: if (showEdit) {
currentAttr ??= { ...selectedAttribute };
+ originalKey = currentAttr.key;
error = null;
+ } else {
+ currentAttr = null;
}
@@ -76,8 +80,7 @@
label="Attribute Key"
placeholder="Enter Key"
bind:value={selectedAttribute.key}
- autofocus
- readonly />
+ autofocus />
{/if}
{#if option}
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateEmailAttribute(
databaseId,
collectionId,
data.key,
data.required,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte
index ceaf4488e..a8fce3f17 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte
@@ -22,7 +22,8 @@
export async function updateEnum(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateEnumAttribute(
databaseId,
@@ -30,7 +31,8 @@
data.key,
data.elements,
data.required,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte
index d92ce2d69..065ac2ecb 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte
@@ -23,7 +23,8 @@
export async function updateFloat(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateFloatAttribute(
databaseId,
@@ -32,7 +33,8 @@
data.required,
data.min,
data.max,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/integer.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/integer.svelte
index bc4231dc4..532a60222 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/integer.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/integer.svelte
@@ -23,7 +23,8 @@
export async function updateInteger(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateIntegerAttribute(
databaseId,
@@ -32,7 +33,8 @@
data.required,
data.min,
data.max,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/ip.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/ip.svelte
index 3af418ebf..115deac83 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/ip.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/ip.svelte
@@ -20,14 +20,16 @@
export async function updateIp(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateIpAttribute(
databaseId,
collectionId,
data.key,
data.required,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte
index 59150c3a7..173c35d5a 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte
@@ -29,16 +29,19 @@
export async function updateRelationship(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
if (!isValueOfStringEnum(RelationMutate, data.onDelete)) {
throw new Error(`Invalid on delete: ${data.onDelete}`);
}
+
await sdk.forProject.databases.updateRelationshipAttribute(
databaseId,
collectionId,
- data.key,
- data.onDelete
+ originalKey,
+ data.onDelete,
+ data.key !== originalKey ? data.key : undefined
);
}
@@ -187,7 +190,6 @@
placeholder="Enter Key"
bind:value={data.key}
autofocus
- readonly={editing}
required />
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts
index 3c3106fc1..05fa8b81c 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts
@@ -32,7 +32,12 @@ export type Option = {
key: string,
data: Partial
) => Promise;
- update: (databaseId: string, collectionId: string, data: Partial) => Promise;
+ update: (
+ databaseId: string,
+ collectionId: string,
+ data: Partial,
+ originalKey: string
+ ) => Promise;
format?: 'email' | 'ip' | 'url' | 'enum';
icon: string;
};
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte
index 37d1e2e2f..3e6e2f97c 100644
--- a/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte
@@ -21,14 +21,17 @@
export async function updateString(
databaseId: string,
collectionId: string,
- data: Partial
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateStringAttribute(
databaseId,
collectionId,
- data.key,
+ originalKey,
data.required,
- data.default
+ data.default,
+ data.size,
+ data.key !== originalKey ? data.key : undefined
);
}
@@ -69,13 +72,7 @@
$: handleDefaultState($required || $array);
-
+
{#if data.size >= 50}
+ data: Partial,
+ originalKey?: string
) {
await sdk.forProject.databases.updateUrlAttribute(
databaseId,
collectionId,
data.key,
data.required,
- data.default
+ data.default,
+ data.key !== originalKey ? data.key : undefined
);
}
diff --git a/src/routes/(console)/project-[project]/databases/database-[database]/string.svelte b/src/routes/(console)/project-[project]/databases/database-[database]/string.svelte
new file mode 100644
index 000000000..4b09b5384
--- /dev/null
+++ b/src/routes/(console)/project-[project]/databases/database-[database]/string.svelte
@@ -0,0 +1,107 @@
+
+
+
+
+
+{#if data.size >= 50}
+
+{:else}
+
+{/if}
+
+ Indicate whether this is a required attribute
+
+
+ Indicate whether this attribute should act as an array, with the default value set as an empty
+ array.
+
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]/functions/function-[function]/executions/execute-function/+page.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/executions/execute-function/+page.svelte
index f17a6fbc0..739b1b182 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/executions/execute-function/+page.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/executions/execute-function/+page.svelte
@@ -113,7 +113,6 @@
`${base}/project-${$page.params.project}/functions/function-${func.$id}/executions`
);
invalidate(Dependencies.EXECUTIONS);
- close();
addNotification({
type: 'success',
message: `Function has been executed`
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/redeployModal.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/redeployModal.svelte
index 6f04929c0..dce772c9a 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/redeployModal.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/redeployModal.svelte
@@ -11,6 +11,7 @@
export let show = false;
export let selectedDeployment: Models.Deployment = null;
+ let error: string;
async function redeploy() {
try {
@@ -28,17 +29,21 @@
invalidate(Dependencies.FUNCTION);
invalidate(Dependencies.DEPLOYMENTS);
show = false;
- } catch (error) {
- addNotification({
- type: 'error',
- message: error.message
- });
- trackError(error, Submit.FunctionRedeploy);
+ } catch (e) {
+ error = e.message;
+
+ trackError(e, Submit.FunctionRedeploy);
}
}
-
+
Are you sure you want to redeploy {$func.name}? Redeploying may affect your
production code.
diff --git a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
index 9300998c8..828c5d019 100644
--- a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
+++ b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
@@ -1,6 +1,6 @@
@@ -172,14 +147,14 @@
Type
Size
Created
-
+
{#each data.files.files as file, index}
{#if file.chunksTotal / file.chunksUploaded !== 1}
-
+
{file.name}
@@ -197,12 +172,6 @@
-
{#if !showCustomId}
diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte
index a5fa2dd45..6640b784b 100644
--- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte
+++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/file-[file]/+page.svelte
@@ -1,5 +1,5 @@