Skip to content

Commit e767f6c

Browse files
committed
Merge branch 'main' into 'csv-imports-errors'.
2 parents c15cde9 + 64c0699 commit e767f6c

File tree

22 files changed

+900
-754
lines changed

22 files changed

+900
-754
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=sites,csv-import,attribute-encrypt
2+
PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths
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,attribute-encrypt"
82+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths"
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,attribute-encrypt"
121+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths"
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,attribute-encrypt"
159+
"PUBLIC_CONSOLE_FEATURE_FLAGS=sites,csv-import,attribute-encrypt,index-lengths"
160160
"PUBLIC_STRIPE_KEY=${{ secrets.PUBLIC_STRIPE_KEY_STAGE }}"
161161
"PUBLIC_GROWTH_ENDPOINT=${{ secrets.PUBLIC_GROWTH_ENDPOINT }}"

src/lib/components/git/repositories.svelte

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import { page } from '$app/state';
2424
import Card from '../card.svelte';
2525
import SkeletonRepoList from './skeletonRepoList.svelte';
26-
import { untrack } from 'svelte';
26+
import { onMount, untrack } from 'svelte';
2727
2828
let {
2929
action = $bindable('select'),
@@ -46,6 +46,11 @@
4646
let search = $state('');
4747
let selectedInstallation = $state(null);
4848
let isLoadingRepositories = $state(null);
49+
let installationsMap = $state(null);
50+
51+
onMount(() => {
52+
loadInstallations();
53+
});
4954
5055
async function loadInstallations() {
5156
if (installationList) {
@@ -59,7 +64,7 @@
5964
)
6065
);
6166
}
62-
return installationList.installations;
67+
installationsMap = installationList.installations;
6368
} else {
6469
const { installations } = await sdk
6570
.forProject(page.params.region, page.params.project)
@@ -70,7 +75,7 @@
7075
}
7176
installation.set(installations.find((entry) => entry.$id === selectedInstallation));
7277
}
73-
return installations;
78+
installationsMap = installations;
7479
}
7580
}
7681
@@ -123,7 +128,7 @@
123128
{#if hasInstallations}
124129
<Layout.Stack>
125130
<Layout.Stack gap="s">
126-
{#await loadInstallations()}
131+
{#if !installationsMap}
127132
<Layout.Stack direction="row">
128133
<InputSelect
129134
disabled
@@ -137,12 +142,12 @@
137142
value={null} />
138143
<InputSearch placeholder="Search repositories" disabled />
139144
</Layout.Stack>
140-
{:then installations}
145+
{:else}
141146
<Layout.Stack direction={$isSmallViewport ? 'column' : 'row'}>
142147
<InputSelect
143148
id="installation"
144149
options={[
145-
...installations.map((entry) => {
150+
...installationsMap.map((entry) => {
146151
return {
147152
label: entry.organization,
148153
value: entry.$id
@@ -160,7 +165,7 @@
160165
}
161166
search = '';
162167
installation.set(
163-
installations.find((entry) => entry.$id === selectedInstallation)
168+
installationsMap.find((entry) => entry.$id === selectedInstallation)
164169
);
165170

166171
isLoadingRepositories = true;
@@ -174,7 +179,7 @@
174179
bind:value={search}
175180
disabled={!search && !$repositories?.repositories?.length} />
176181
</Layout.Stack>
177-
{/await}
182+
{/if}
178183
</Layout.Stack>
179184
{#if selectedInstallation}
180185
<!-- manual installation change -->

src/lib/flags.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ function isFlagEnabled(name: string) {
2121
export const flags = {
2222
showSites: isFlagEnabled('sites'),
2323
showCsvImport: isFlagEnabled('csv-import'),
24-
showAttributeEncrypt: isFlagEnabled('attribute-encrypt')
24+
showAttributeEncrypt: isFlagEnabled('attribute-encrypt'),
25+
showIndexLengths: isFlagEnabled('index-lengths')
2526
};

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
const databaseId = page.params.database;
2121
const collectionId = page.params.collection;
2222
const documentId = page.params.document;
23-
const editing = true;
2423
2524
function initWork() {
2625
const prohibitedKeys = [
@@ -124,7 +123,7 @@
124123
<svelte:fragment slot="title">{label}</svelte:fragment>
125124

126125
<svelte:fragment slot="aside">
127-
<AttributeItem {attribute} bind:formValues={$work} {label} {editing} />
126+
<AttributeItem {attribute} bind:formValues={$work} {label} editing />
128127
</svelte:fragment>
129128

130129
<svelte:fragment slot="actions">

0 commit comments

Comments
 (0)