From 03a94a95636ece3e060124361fa91f2092abec4b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 22 May 2025 21:52:25 +0530 Subject: [PATCH 01/66] added selector field for the string encrypted field --- .../attributes/string.svelte | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte index 8bfc5e18a..f5dd6535a 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte @@ -42,15 +42,17 @@ @@ -149,7 +151,7 @@ on:click={(e) => handleEncryptedLabelClick(() => toggle(e))}> Encrypted - {#if $organization?.billingPlan === BillingPlan.FREE} + {#if !hasDatabaseEncryptionPlan} Pro {/if} From ed7935fc6caa7709551dab6e5d11c8dff66b8de9 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Sat, 24 May 2025 15:39:48 +0530 Subject: [PATCH 09/66] added reactive state for string size and the cloud and self hosted env popper encryption trigger --- .../collection-[collection]/attributes/string.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte index 23d54a40d..c60ac8a32 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte @@ -91,7 +91,11 @@ $: handleDefaultState($required || $array); - $: hasDatabaseEncryptionPlan = isCloud && $currentPlan?.databasesAllowEncrypt; + $: hasDatabaseEncryptionPlan = isCloud ? $currentPlan?.databasesAllowEncrypt : true; + + $: if (data.encrypt && data.size < 150) { + data.size = 150; + } Date: Tue, 27 May 2025 13:20:42 +0530 Subject: [PATCH 10/66] update: ui logic. --- .../attributes/string.svelte | 142 +++++++++--------- 1 file changed, 75 insertions(+), 67 deletions(-) diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte index c60ac8a32..83986ee7f 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte @@ -43,33 +43,25 @@ -{#if data.size >= 50} - -{:else} - -{/if} + min={supportsStringEncryption && data.encrypt ? 150 : undefined} + helper={supportsStringEncryption && data.encrypt + ? 'Encrypted string attributes require a minimum size of 150.' + : undefined} /> + += 50 ? InputTextarea : InputText} + id="default" + label="Default" + placeholder="Enter string" + maxlength={data.size} + bind:value={data.default} + disabled={data.required || data.array} + nullable={!data.required && !data.array} /> + + - - - - + +
+ - + + + + + + Indicate whether this attribute is encrypted. Encrypted attributes cannot be + queried. + + + - Available on Pro plan.Upgrade to enable encrypted attributes. + Available on Pro plan. Upgrade + to enable encrypted attributes. - - - Indicate whether this attribute is encrypted. Encrypted attributes cannot be - queried. - - +
+ + From 7b46ad303ae900230447ba2a96feb830283bf63c Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 27 May 2025 16:56:05 +0530 Subject: [PATCH 11/66] address design comments. --- package.json | 3 +- pnpm-lock.yaml | 35 +++--------- .../attributes/+page.svelte | 55 +++++++++++-------- .../attributes/string.svelte | 7 +-- .../collection-[collection]/table.svelte | 3 +- 5 files changed, 46 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index 5992460a1..a859e80f2 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,10 @@ "dependencies": { "@ai-sdk/svelte": "^1.1.24", "@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@e190a19", - "@appwrite.io/pink": "0.25.0", "@appwrite.io/pink-icons": "0.25.0", "@appwrite.io/pink-icons-svelte": "^2.0.0-RC.1", "@appwrite.io/pink-legacy": "^1.0.3", - "@appwrite.io/pink-svelte": "https://try-module.cloud/module/@appwrite/@appwrite.io/pink-svelte@0cc439f", + "@appwrite.io/pink-svelte": "https://try-module.cloud/-/@appwrite/@appwrite.io/pink-svelte@063404f", "@popperjs/core": "^2.11.8", "@sentry/sveltekit": "^8.38.0", "@stripe/stripe-js": "^3.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20316f694..fa9b83754 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,9 +14,6 @@ importers: '@appwrite.io/console': specifier: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@e190a19 version: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@e190a19 - '@appwrite.io/pink': - specifier: 0.25.0 - version: 0.25.0 '@appwrite.io/pink-icons': specifier: 0.25.0 version: 0.25.0 @@ -27,8 +24,8 @@ importers: specifier: ^1.0.3 version: 1.0.3 '@appwrite.io/pink-svelte': - specifier: https://try-module.cloud/module/@appwrite/@appwrite.io/pink-svelte@0cc439f - version: https://try-module.cloud/module/@appwrite/%40appwrite.io%2Fpink-svelte@0cc439f(svelte@5.25.3) + specifier: https://try-module.cloud/-/@appwrite/@appwrite.io/pink-svelte@063404f + version: https://try-module.cloud/-/@appwrite/%40appwrite.io%2Fpink-svelte@063404f(svelte@5.25.3) '@popperjs/core': specifier: ^2.11.8 version: 2.11.8 @@ -281,15 +278,12 @@ packages: '@appwrite.io/pink-legacy@1.0.3': resolution: {integrity: sha512-GGde5fmPhs+s6/3aFeMPc/kKADG/gTFkYQSy6oBN8pK0y0XNCLrZZgBv+EBbdhwdtqVEWXa0X85Mv9w7jcIlwQ==} - '@appwrite.io/pink-svelte@https://try-module.cloud/module/@appwrite/%40appwrite.io%2Fpink-svelte@0cc439f': - resolution: {tarball: https://try-module.cloud/module/@appwrite/%40appwrite.io%2Fpink-svelte@0cc439f} + '@appwrite.io/pink-svelte@https://try-module.cloud/-/@appwrite/%40appwrite.io%2Fpink-svelte@063404f': + resolution: {tarball: https://try-module.cloud/-/@appwrite/%40appwrite.io%2Fpink-svelte@063404f} version: 2.0.0-RC.2 peerDependencies: svelte: ^4.0.0 - '@appwrite.io/pink@0.25.0': - resolution: {integrity: sha512-9z4G/iAhjvVpM7tkNqzGqrokst4hvNt3Fkf2jD4W6n8j//EJbQ3mJ0I+5dye5Sry0a33wUanq5DSztqFNYq5zw==} - '@asamuzakjp/css-color@3.1.1': resolution: {integrity: sha512-hpRD68SV2OMcZCsrbdkccTw5FXjNDLo5OuqSHyHZfwweGsDWZwDJ2+gONyNAbazZclobMirACLw0lk8WVxIqxA==} @@ -1343,8 +1337,8 @@ packages: '@types/prop-types@15.7.14': resolution: {integrity: sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==} - '@types/react@18.3.22': - resolution: {integrity: sha512-vUhG0YmQZ7kL/tmKLrD3g5zXbXXreZXB3pmROW8bg3CnLnpjkRVwUlLne7Ufa2r9yJ8+/6B73RzhAek5TBKh2Q==} + '@types/react@18.3.23': + resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==} '@types/remarkable@2.0.8': resolution: {integrity: sha512-eKXqPZfpQl1kOADjdKchHrp2gwn9qMnGXhH/AtZe0UrklzhGJkawJo/Y/D0AlWcdWoWamFNIum8+/nkAISQVGg==} @@ -2664,9 +2658,6 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - normalize.css@8.0.1: - resolution: {integrity: sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==} - nwsapi@2.2.20: resolution: {integrity: sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==} @@ -3644,7 +3635,7 @@ snapshots: '@appwrite.io/pink-icons': 1.0.0 the-new-css-reset: 1.11.3 - '@appwrite.io/pink-svelte@https://try-module.cloud/module/@appwrite/%40appwrite.io%2Fpink-svelte@0cc439f(svelte@5.25.3)': + '@appwrite.io/pink-svelte@https://try-module.cloud/-/@appwrite/%40appwrite.io%2Fpink-svelte@063404f(svelte@5.25.3)': dependencies: '@appwrite.io/pink-icons-svelte': 2.0.0-RC.1(svelte@5.25.3) '@floating-ui/dom': 1.6.13 @@ -3659,12 +3650,6 @@ snapshots: svelte-motion: 0.12.2(svelte@5.25.3) svelte-sonner: 0.3.28(svelte@5.25.3) - '@appwrite.io/pink@0.25.0': - dependencies: - '@appwrite.io/pink-icons': 0.25.0 - normalize.css: 8.0.1 - the-new-css-reset: 1.11.3 - '@asamuzakjp/css-color@3.1.1': dependencies: '@csstools/css-calc': 2.1.2(@csstools/css-parser-algorithms@3.0.4(@csstools/css-tokenizer@3.0.3))(@csstools/css-tokenizer@3.0.3) @@ -4787,7 +4772,7 @@ snapshots: '@types/prop-types@15.7.14': {} - '@types/react@18.3.22': + '@types/react@18.3.23': dependencies: '@types/prop-types': 15.7.14 csstype: 3.1.3 @@ -6254,8 +6239,6 @@ snapshots: normalize-path@3.0.0: {} - normalize.css@8.0.1: {} - nwsapi@2.2.20: {} object-inspect@1.13.4: {} @@ -6735,7 +6718,7 @@ snapshots: svelte-motion@0.12.2(svelte@5.25.3): dependencies: - '@types/react': 18.3.22 + '@types/react': 18.3.23 framesync: 6.1.2 popmotion: 11.0.5 style-value-types: 5.1.2 diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte index 294bede16..7d126c359 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte @@ -114,31 +114,38 @@ {:else} {/if} - {attribute.key} - {#if isString(attribute) && attribute.encrypt} - - -
Encrypted
-
- {/if} - {#if attribute.status !== 'available'} - - {#if attribute.error} - { - e.preventDefault(); - error = attribute.error; - showFailed = true; - }}>Details + + + {attribute.key} + {#if isString(attribute) && !attribute.encrypt} + + +
Encrypted
+
+ {/if} +
+ {#if attribute.status !== 'available'} + + {#if attribute.error} + { + e.preventDefault(); + error = attribute.error; + showFailed = true; + }}>Details + {/if} + {:else if attribute.required} + {/if} - {:else if attribute.required} - - {/if} +
diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte index 83986ee7f..d06989612 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte @@ -115,7 +115,7 @@ label="Required" bind:checked={data.required} disabled={data.array} - description="Indicate whether this attribute is required" /> + description="Indicate whether this attribute is required." /> + description="Indicate whether this attribute is an array. Defaults to an empty array." />
@@ -174,7 +173,7 @@ From e1d0bcae7cf70c5570fe4f85f122395a4a28512c Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 8 Jun 2025 11:03:30 +0000 Subject: [PATCH 20/66] update height --- src/lib/components/billing/gradientBanner.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/components/billing/gradientBanner.svelte b/src/lib/components/billing/gradientBanner.svelte index 86cf1d9ee..3d3698dd7 100644 --- a/src/lib/components/billing/gradientBanner.svelte +++ b/src/lib/components/billing/gradientBanner.svelte @@ -80,6 +80,7 @@ width: 100%; z-index: 100; position: fixed; + padding: 0.8rem; &.darker { background: var(--bgcolor-neutral-default); From 9454bad856cc9615e8e8082899cb0b742f6a8bf7 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 8 Jun 2025 11:45:16 +0000 Subject: [PATCH 21/66] close handler --- .../enterpriseTrial.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte b/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte index 5cc94bde5..dff0c9f84 100644 --- a/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte +++ b/src/routes/(console)/organization-[organization]/enterpriseTrial.svelte @@ -6,13 +6,22 @@ import { base } from '$app/paths'; import GradientBanner from '$lib/components/billing/gradientBanner.svelte'; import { Badge, Typography } from '@appwrite.io/pink-svelte'; + import { activeHeaderAlert } from '../store'; $: upgradeUrl = `${base}/organization-${$organization?.$id}/change-plan`; $: remainingDays = calculateEnterpriseTrial($organization); + + let show = true; + + function handleClose() { + show = false; + const now = new Date().getTime(); + localStorage.setItem($activeHeaderAlert.id, now.toString()); + } -{#if $organization?.$id && remainingDays > 0 && !hideBillingHeaderRoutes.includes(page.url.pathname)} - +{#if $organization?.$id && remainingDays > 0 && !hideBillingHeaderRoutes.includes(page.url.pathname) && show} + Date: Tue, 10 Jun 2025 15:00:50 -0400 Subject: [PATCH 30/66] Update SDK --- package.json | 2 +- pnpm-lock.yaml | 4 ++-- .../function-[function]/domains/add-domain/+page.svelte | 6 ++---- .../sites/site-[site]/domains/add-domain/+page.svelte | 5 +---- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 0fe8f5a25..66957b4ce 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@ai-sdk/svelte": "^1.1.24", - "@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564", + "@appwrite.io/console": "^1.8.0", "@appwrite.io/pink-icons": "0.25.0", "@appwrite.io/pink-icons-svelte": "^2.0.0-RC.1", "@appwrite.io/pink-legacy": "^1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a43103aea..cf697939c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^1.1.24 version: 1.1.24(svelte@5.25.3)(zod@3.24.3) '@appwrite.io/console': - specifier: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564 - version: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564 + specifier: ^1.8.0 + version: 1.8.0 '@appwrite.io/pink-icons': specifier: 0.25.0 version: 0.25.0 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 66faf1e8d..874b14533 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 { type Models, ProxyResourceType, Runtime, StatusCode } from '@appwrite.io/console'; + import { type Models, Runtime, StatusCode } from '@appwrite.io/console'; import { statusCodeOptions } from '$lib/stores/domains'; import { writable } from 'svelte/store'; import { onMount } from 'svelte'; @@ -78,9 +78,7 @@ .proxy.createRedirectRule( domainName, redirect, - statusCode, - page.params.function, - ProxyResourceType.Function + statusCode ); } else if (behaviour === 'ACTIVE') { rule = await sdk diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte index af66889d3..663921982 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte @@ -16,7 +16,6 @@ BuildRuntime, Framework, type Models, - ProxyResourceType, StatusCode } from '@appwrite.io/console'; import { statusCodeOptions } from '$lib/stores/domains'; @@ -89,9 +88,7 @@ .proxy.createRedirectRule( domainName, redirect, - statusCode, - page.params.site, - ProxyResourceType.Site + statusCode ); } else if (behaviour === 'ACTIVE') { rule = await sdk From 411fe2856f27424e3821946b8db0fd5f6d6c1e14 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 10 Jun 2025 15:02:03 -0400 Subject: [PATCH 31/66] Format --- .../function-[function]/domains/add-domain/+page.svelte | 6 +----- .../sites/site-[site]/domains/add-domain/+page.svelte | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) 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 874b14533..6442fc11c 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 @@ -75,11 +75,7 @@ } else if (behaviour === 'REDIRECT') { rule = await sdk .forProject(page.params.region, page.params.project) - .proxy.createRedirectRule( - domainName, - redirect, - statusCode - ); + .proxy.createRedirectRule(domainName, redirect, statusCode); } else if (behaviour === 'ACTIVE') { rule = await sdk .forProject(page.params.region, page.params.project) diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte index 663921982..5ee280984 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/domains/add-domain/+page.svelte @@ -85,11 +85,7 @@ } else if (behaviour === 'REDIRECT') { rule = await sdk .forProject(page.params.region, page.params.project) - .proxy.createRedirectRule( - domainName, - redirect, - statusCode - ); + .proxy.createRedirectRule(domainName, redirect, statusCode); } else if (behaviour === 'ACTIVE') { rule = await sdk .forProject(page.params.region, page.params.project) From 8a775c97324af1d0df4360f82f2b08964623ebb9 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 10 Jun 2025 15:06:53 -0400 Subject: [PATCH 32/66] Fix lock --- pnpm-lock.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf697939c..c57983b1a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -257,9 +257,8 @@ packages: '@analytics/type-utils@0.6.2': resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==} - '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564': - resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564} - version: 1.8.0 + '@appwrite.io/console@1.8.0': + resolution: {integrity: sha512-9M2zfg95P5c5CTYseMaE7ULoYJgzLGy624pV2g4DLdWmrX6ltMwP4khulIOsTd3tJpDDwuiInt7odVeoP9iXZg==} '@appwrite.io/pink-icons-svelte@2.0.0-RC.1': resolution: {integrity: sha512-iLFlV55hj8mGuAbmxJGenxN5RaZMmVT4GJb9dv/MP1xBAtYibFq7JvBcxm18qV2KU8c31Rntf+Ub4GL7HwqTYg==} @@ -3635,7 +3634,7 @@ snapshots: '@analytics/type-utils@0.6.2': {} - '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564': {} + '@appwrite.io/console@1.8.0': {} '@appwrite.io/pink-icons-svelte@2.0.0-RC.1(svelte@5.25.3)': dependencies: From 93937c3a5948adb7936e6947fd9416de5f6b1911 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 10 Jun 2025 15:52:02 -0400 Subject: [PATCH 33/66] Add lengths --- .../collection-[collection]/indexes/+page.svelte | 4 ++++ .../collection-[collection]/indexes/createIndex.svelte | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/indexes/+page.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/indexes/+page.svelte index c04b73365..f3f89b811 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/indexes/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/indexes/+page.svelte @@ -86,6 +86,7 @@ Type Attributes Asc/Desc + Lengths {#each data.collection.indexes as index} @@ -118,6 +119,9 @@ {index.orders} + + {index.lengths} + - {/if} - - + + {#if $canWriteCollections} + + {/if} + {#if data.collections.total} {#if data.view === 'grid'} 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} From 9c3416d6856c10780fdb5bf3416762057a1bb0c1 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 11 Jun 2025 18:40:14 -0400 Subject: [PATCH 40/66] Add encrypt feature flag --- .github/workflows/publish.yml | 6 +++--- src/lib/flags.ts | 3 ++- .../collection-[collection]/attributes/string.svelte | 10 +++++++++- .../collection-[collection]/table.svelte | 5 ++++- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1c879a6e..7073e19f1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -79,7 +79,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} build-args: | "PUBLIC_CONSOLE_MODE=cloud" - "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import" + "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt" "PUBLIC_APPWRITE_MULTI_REGION=true" "PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}" "PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}" @@ -118,7 +118,7 @@ jobs: build-args: | "PUBLIC_CONSOLE_MODE=self-hosted" "PUBLIC_APPWRITE_MULTI_REGION=false" - "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import" + "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt" "PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}" publish-cloud-no-regions: @@ -156,6 +156,6 @@ jobs: build-args: | "PUBLIC_CONSOLE_MODE=cloud" "PUBLIC_APPWRITE_MULTI_REGION=false" - "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import" + "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt" "PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}" "PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}" diff --git a/src/lib/flags.ts b/src/lib/flags.ts index 54d5ba576..8e339ac14 100644 --- a/src/lib/flags.ts +++ b/src/lib/flags.ts @@ -20,5 +20,6 @@ function isFlagEnabled(name: string) { export const flags = { showSites: isFlagEnabled('sites'), - showCsvImport: isFlagEnabled('csv-import') + showCsvImport: isFlagEnabled('csv-import'), + showAttributeEncrypt: isFlagEnabled('attribute-encrypt'), }; diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte index d06989612..1b28f8225 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte @@ -50,6 +50,7 @@ import { ActionMenu, Selector } from '@appwrite.io/pink-svelte'; import { InputNumber, InputText, InputTextarea } from '$lib/elements/forms'; import { Popover, Layout, Tag, Typography, Link } from '@appwrite.io/pink-svelte'; + import { flags } from '$lib/flags'; export let data: Partial = { required: false, @@ -62,6 +63,11 @@ let savedDefault = data.default; + let showEncrypt = flags.showAttributeEncrypt({ + organization: page.data.organization, + account: page.data.account + }); + function handleDefaultState(hideDefault: boolean) { if (hideDefault) { savedDefault = data.default; @@ -84,7 +90,7 @@ $: handleDefaultState($required || $array); - // check plan on cloud, always allow on self-hosted! + // Check plan on cloud, always allow on self-hosted $: supportsStringEncryption = isCloud ? $currentPlan?.databasesAllowEncrypt : true; @@ -125,6 +131,7 @@ disabled={data.required || editing} description="Indicate whether this attribute is an array. Defaults to an empty array." /> +{#if showEncrypt }
@@ -169,6 +176,7 @@
+{/if}