Skip to content

Commit 1f10ee9

Browse files
authored
Merge pull request #2010 from appwrite/1.8.x
1.8.x
2 parents 2487e68 + cb096b4 commit 1f10ee9

File tree

22 files changed

+220
-98
lines changed

22 files changed

+220
-98
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PUBLIC_CONSOLE_MODE=self-hosted
2-
PUBLIC_CONSOLE_FEATURE_FLAGS=
2+
PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt
33
PUBLIC_APPWRITE_MULTI_REGION=false
44
PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1
55
PUBLIC_STRIPE_KEY=

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
labels: ${{ steps.meta.outputs.labels }}
8080
build-args: |
8181
"PUBLIC_CONSOLE_MODE=cloud"
82-
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import"
82+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt"
8383
"PUBLIC_APPWRITE_MULTI_REGION=true"
8484
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
8585
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
@@ -118,7 +118,7 @@ jobs:
118118
build-args: |
119119
"PUBLIC_CONSOLE_MODE=self-hosted"
120120
"PUBLIC_APPWRITE_MULTI_REGION=false"
121-
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import"
121+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt"
122122
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"
123123
124124
publish-cloud-no-regions:
@@ -156,6 +156,6 @@ jobs:
156156
build-args: |
157157
"PUBLIC_CONSOLE_MODE=cloud"
158158
"PUBLIC_APPWRITE_MULTI_REGION=false"
159-
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import"
159+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt"
160160
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
161161
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@ai-sdk/svelte": "^1.1.24",
25-
"@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@a5e5564",
25+
"@appwrite.io/console": "^1.9.0",
2626
"@appwrite.io/pink-icons": "0.25.0",
2727
"@appwrite.io/pink-icons-svelte": "^2.0.0-RC.1",
2828
"@appwrite.io/pink-legacy": "^1.0.3",

pnpm-lock.yaml

Lines changed: 9 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/flags.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ function isFlagEnabled(name: string) {
2020

2121
export const flags = {
2222
showSites: isFlagEnabled('sites'),
23-
showCsvImport: isFlagEnabled('csv-import')
23+
showCsvImport: isFlagEnabled('csv-import'),
24+
showAttributeEncrypt: isFlagEnabled('attribute-encrypt')
2425
};

src/lib/helpers/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type Column = PinkColumn & {
4444
format?: string;
4545
exclude?: boolean;
4646
elements?: string[] | { value: string | number; label: string }[];
47+
encrypt?: boolean;
4748
};
4849

4950
export function isValueOfStringEnum<T extends Record<string, string>>(

src/lib/sdk/billing.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ export type Plan = {
310310
users: number;
311311
teams: number;
312312
databases: number;
313+
databasesAllowEncrypt: boolean;
313314
buckets: number;
314315
fileSize: number;
315316
functions: number;

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
Link,
1414
Popover,
1515
Table,
16+
Tooltip,
1617
Typography
1718
} from '@appwrite.io/pink-svelte';
1819
import Create from '../createAttribute.svelte';
19-
import { isRelationship } from '../document-[document]/attributes/store';
20+
import { isRelationship, isString } from '../document-[document]/attributes/store';
2021
import FailedModal from '../failedModal.svelte';
2122
import CreateIndex from '../indexes/createIndex.svelte';
2223
import { attributes, type Attributes, isCsvImportInProgress } from '../store';
@@ -33,7 +34,8 @@
3334
IconPlus,
3435
IconSwitchHorizontal,
3536
IconTrash,
36-
IconViewList
37+
IconViewList,
38+
IconLockClosed
3739
} from '@appwrite.io/pink-icons-svelte';
3840
import type { ComponentProps } from 'svelte';
3941
import { Click, trackEvent } from '$lib/actions/analytics';
@@ -112,25 +114,38 @@
112114
{:else}
113115
<Icon icon={option.icon} size="s" />
114116
{/if}
115-
<span class="text u-trim-1" data-private>{attribute.key}</span>
116-
{#if attribute.status !== 'available'}
117-
<Badge
118-
size="s"
119-
variant="secondary"
120-
content={attribute.status}
121-
type={getAttributeStatusBadge(attribute.status)} />
122-
{#if attribute.error}
123-
<Link.Button
124-
variant="muted"
125-
on:click={(e) => {
126-
e.preventDefault();
127-
error = attribute.error;
128-
showFailed = true;
129-
}}>Details</Link.Button>
117+
<Layout.Stack direction="row" alignItems="center" gap="s">
118+
<Layout.Stack inline direction="row" alignItems="center" gap="xxs">
119+
<span class="text u-trim-1" data-private>{attribute.key}</span>
120+
{#if isString(attribute) && attribute.encrypt}
121+
<Tooltip>
122+
<Icon
123+
size="s"
124+
icon={IconLockClosed}
125+
color="--fgcolor-neutral-tertiary" />
126+
<div slot="tooltip">Encrypted</div>
127+
</Tooltip>
128+
{/if}
129+
</Layout.Stack>
130+
{#if attribute.status !== 'available'}
131+
<Badge
132+
size="s"
133+
variant="secondary"
134+
content={attribute.status}
135+
type={getAttributeStatusBadge(attribute.status)} />
136+
{#if attribute.error}
137+
<Link.Button
138+
variant="muted"
139+
on:click={(e) => {
140+
e.preventDefault();
141+
error = attribute.error;
142+
showFailed = true;
143+
}}>Details</Link.Button>
144+
{/if}
145+
{:else if attribute.required}
146+
<Badge size="xs" variant="secondary" content="required" />
130147
{/if}
131-
{:else if attribute.required}
132-
<Badge size="s" variant="secondary" content="required" />
133-
{/if}
148+
</Layout.Stack>
134149
</Layout.Stack>
135150
</Table.Cell>
136151
<Table.Cell column="type" {root}>

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/boolean.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,4 @@
100100
label="Array"
101101
bind:checked={data.array}
102102
disabled={data.required || editing}
103-
description="Indicate whether this attribute should act as an array, with the default value set as an empty
104-
array." />
103+
description="Indicate whether this attribute is an array. Defaults to an empty array." />

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/datetime.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,4 @@
9292
label="Array"
9393
bind:checked={data.array}
9494
disabled={data.required || editing}
95-
description="Indicate whether this attribute should act as an array, with the default value set as an empty
96-
array." />
95+
description="Indicate whether this attribute is an array. Defaults to an empty array." />

0 commit comments

Comments
 (0)