From 92ecfd2f3b4103dee4d1bb3e7b83cb0163d4319c Mon Sep 17 00:00:00 2001 From: Darshan Date: Thu, 10 Jul 2025 15:56:30 +0530 Subject: [PATCH] update: availability to string encryption. --- .env.example | 2 +- .github/workflows/publish.yml | 6 +- src/lib/flags.ts | 1 - .../attributes/string.svelte | 100 ++++++++---------- .../collection-[collection]/table.svelte | 5 +- 5 files changed, 52 insertions(+), 62 deletions(-) diff --git a/.env.example b/.env.example index e8d023dab..5a16f982f 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ PUBLIC_CONSOLE_MODE=self-hosted -PUBLIC_CONSOLE_FEATURE_FLAGS=sites,attribute-encrypt,index-lengths +PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths PUBLIC_APPWRITE_MULTI_REGION=false PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1 PUBLIC_STRIPE_KEY= diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 463edd3fa..294dae87c 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,attribute-encrypt,index-lengths" + "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths" "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,attribute-encrypt,index-lengths" + "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths" "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,attribute-encrypt,index-lengths" + "PUBLIC_CONSOLE_FEATURE_FLAGS=sites,index-lengths" "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 03279674a..50b902b95 100644 --- a/src/lib/flags.ts +++ b/src/lib/flags.ts @@ -20,6 +20,5 @@ function isFlagEnabled(name: string) { export const flags = { showSites: isFlagEnabled('sites'), - showAttributeEncrypt: isFlagEnabled('attribute-encrypt'), showIndexLengths: isFlagEnabled('index-lengths') }; 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 803b3ad2b..4578f4167 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,7 +50,6 @@ 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, @@ -63,8 +62,6 @@ let savedDefault = data.default; - const showEncrypt = flags.showAttributeEncrypt(page.data); - function handleDefaultState(hideDefault: boolean) { if (hideDefault) { savedDefault = data.default; @@ -128,58 +125,55 @@ disabled={data.required || editing} description="Indicate whether this attribute is an array. Defaults to an empty array." /> -{#if showEncrypt} - -
- - - + +
+ + + - - - - Protect attribute against data leaks for best privacy compliance. - Encrypted attributes cannot be queried. - - + + + + Protect attribute against data leaks for best privacy compliance. Encrypted + attributes cannot be queried. + + - - - Available on Pro plan. Upgrade - to enable encrypted attributes. - - - - -
-
-{/if} + + + Available on Pro plan. Upgrade + to enable encrypted attributes. + + +
+
+
+