From 1751928d1883d21b6024c72aa690a40d74d57411 Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Tue, 21 Mar 2023 13:41:38 +0000 Subject: [PATCH 01/13] refactor: improve table overflow detection --- src/lib/elements/table/tableScroll.svelte | 25 ++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/lib/elements/table/tableScroll.svelte b/src/lib/elements/table/tableScroll.svelte index 814fe00e5..6d30f8aff 100644 --- a/src/lib/elements/table/tableScroll.svelte +++ b/src/lib/elements/table/tableScroll.svelte @@ -2,11 +2,28 @@ import type { Action } from 'svelte/action'; export let isSticky = false; + let isOverflowing = false; - const hasOverflow: Action void> = (node, callback) => { + const hasOverflow: Action = (node) => { const observer = new ResizeObserver((entries) => { for (const entry of entries) { - callback(entry.contentRect.width < entry.target.scrollWidth); + let overflowing = false; + if (entry.contentRect.width < entry.target.scrollWidth) { + overflowing = true; + } + + const cols = entry.target.querySelectorAll('.table-thead-col'); + for (let i = 0; i < cols.length; i++) { + const col = cols[i]; + const cs = getComputedStyle(col); + const innerWidth = + col.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight); + if (innerWidth < 32) { + overflowing = true; + } + } + + isOverflowing = overflowing; } }); @@ -18,12 +35,10 @@ } }; }; - - let isOverflowing = false;
-
(isOverflowing = v)}> +
From 9fb6de180c3974652cb6010e42a8668e285d9fa1 Mon Sep 17 00:00:00 2001 From: Rohan kumar <51409281+rohan220217@users.noreply.github.com> Date: Fri, 31 Mar 2023 20:46:17 +0530 Subject: [PATCH 02/13] fix: session modal was not closed after successfull deletion --- .../project-[project]/auth/user-[user]/deleteSession.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/console/project-[project]/auth/user-[user]/deleteSession.svelte b/src/routes/console/project-[project]/auth/user-[user]/deleteSession.svelte index 306feb2d4..f934958b2 100644 --- a/src/routes/console/project-[project]/auth/user-[user]/deleteSession.svelte +++ b/src/routes/console/project-[project]/auth/user-[user]/deleteSession.svelte @@ -15,6 +15,7 @@ try { await sdk.forProject.users.deleteSession($page.params.user, selectedSessionId); await invalidate(Dependencies.SESSIONS); + showDelete = false; addNotification({ type: 'success', message: 'Session has been deleted' From 371a6e1f721fee712809e4e269efc4991a977551 Mon Sep 17 00:00:00 2001 From: yatharth Date: Tue, 25 Apr 2023 10:00:39 +0530 Subject: [PATCH 03/13] fix issue in gitlab oauth modal validation --- src/routes/console/project-[project]/auth/gitlabOAuth.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/gitlabOAuth.svelte b/src/routes/console/project-[project]/auth/gitlabOAuth.svelte index 2b5aea8a6..934d73801 100644 --- a/src/routes/console/project-[project]/auth/gitlabOAuth.svelte +++ b/src/routes/console/project-[project]/auth/gitlabOAuth.svelte @@ -81,7 +81,7 @@ disabled={(secret === provider.secret && enabled === provider.enabled && appId === provider.appId) || - !(appId && clientSecret && endpoint)} + !(appId && clientSecret)} submit>Update From 834841018c522c82efce1304cadf8b651073f85c Mon Sep 17 00:00:00 2001 From: fliitor <117680686+fliitor@users.noreply.github.com> Date: Tue, 2 May 2023 15:11:15 +0300 Subject: [PATCH 04/13] fix inversed message on (un)verified user --- .../project-[project]/auth/user-[user]/updateStatus.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/auth/user-[user]/updateStatus.svelte b/src/routes/console/project-[project]/auth/user-[user]/updateStatus.svelte index 34f4c81b0..60a2189d1 100644 --- a/src/routes/console/project-[project]/auth/user-[user]/updateStatus.svelte +++ b/src/routes/console/project-[project]/auth/user-[user]/updateStatus.svelte @@ -19,7 +19,7 @@ await invalidate(Dependencies.USER); addNotification({ message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ - $user.emailVerification ? 'unverified' : 'verified' + !$user.emailVerification ? 'unverified' : 'verified' }`, type: 'success' }); From 28c7293a2c70fbdd585a098d81539c8c6661f506 Mon Sep 17 00:00:00 2001 From: Suven-p Date: Fri, 5 May 2023 10:05:20 +0545 Subject: [PATCH 05/13] Remove trailing space in bash code snippet --- CONTRIBUTING.md | 3 +++ .../functions/function-[function]/create.svelte | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 607bb07f6..ad67fbd68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,12 +40,15 @@ git clone https://github.com/appwrite/console.git appwrite-console ``` ### 2. Install dependencies with npm + Navigate to the Appwrite Console repository and install dependencies. + ```bash cd appwrite-console && npm install ``` ### 3. Install and run Appwrite locally + When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally. Follow the [install instructions](https://appwrite.io/docs/installation) in the Appwrite docs. diff --git a/src/routes/console/project-[project]/functions/function-[function]/create.svelte b/src/routes/console/project-[project]/functions/function-[function]/create.svelte index 806ff23ca..4d65e044b 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/create.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/create.svelte @@ -62,10 +62,10 @@ function setCodeSnippets(lang: string) { return { Unix: { - code: `appwrite functions createDeployment \\ - --functionId=${functionId} \\ - --entrypoint='index.${lang}' \\ - --code="." \\ + code: `appwrite functions createDeployment \\ + --functionId=${functionId} \\ + --entrypoint='index.${lang}' \\ + --code="." \\ --activate=true`, language: 'bash' }, From 8ba4a196e40d085dc39690660b05b8869a77751d Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Sat, 6 May 2023 20:51:28 +0000 Subject: [PATCH 06/13] Update description of disabled services. --- CONTRIBUTING.md | 3 +++ src/routes/console/project-[project]/settings/+page.svelte | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 607bb07f6..ad67fbd68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,12 +40,15 @@ git clone https://github.com/appwrite/console.git appwrite-console ``` ### 2. Install dependencies with npm + Navigate to the Appwrite Console repository and install dependencies. + ```bash cd appwrite-console && npm install ``` ### 3. Install and run Appwrite locally + When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally. Follow the [install instructions](https://appwrite.io/docs/installation) in the Appwrite docs. diff --git a/src/routes/console/project-[project]/settings/+page.svelte b/src/routes/console/project-[project]/settings/+page.svelte index ccce2b50b..cf8659329 100644 --- a/src/routes/console/project-[project]/settings/+page.svelte +++ b/src/routes/console/project-[project]/settings/+page.svelte @@ -115,7 +115,10 @@ Services -

Choose services you wish to enable or disable.

+

+ Choose services you wish to enable or disable for the client API. When disabled, the + services are not accessible to client SDKs but remain accessible to server SDKs. +

From f8b3929762a252eb049abfb23169e2f44ebd4afb Mon Sep 17 00:00:00 2001 From: Arman Date: Tue, 9 May 2023 15:00:01 +0200 Subject: [PATCH 07/13] fix: id component copy on click --- CONTRIBUTING.md | 3 +++ src/lib/components/id.svelte | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 607bb07f6..ad67fbd68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,12 +40,15 @@ git clone https://github.com/appwrite/console.git appwrite-console ``` ### 2. Install dependencies with npm + Navigate to the Appwrite Console repository and install dependencies. + ```bash cd appwrite-console && npm install ``` ### 3. Install and run Appwrite locally + When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally. Follow the [install instructions](https://appwrite.io/docs/installation) in the Appwrite docs. diff --git a/src/lib/components/id.svelte b/src/lib/components/id.svelte index c64dcb1f2..1b618f3d2 100644 --- a/src/lib/components/id.svelte +++ b/src/lib/components/id.svelte @@ -46,22 +46,22 @@ } -
- - - -
- + +
+ + + +
- +
-
+ From 8fccea5fe142e4ca172ce13c96c704c0b04a567b Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 11 May 2023 12:35:33 +0200 Subject: [PATCH 08/13] chore: update contribution repo structure --- CONTRIBUTING.md | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 607bb07f6..60baa93de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,25 +10,30 @@ If you are worried about or don’t know where to start, check out the next sect ``` ├── src -│ ├── lib // All non-route components, accessible over "import ... from '$lib'" -│ │ ├── components // Re-usable components -│ │ ├── elements // Re-usable elements -│ │ ├── layout // Global components for the layout (Nav/Content/Container) -│ │ └── stores // Global stores (state management) -│ └─── routes -│ ├── console // Routes that need authentication -│ │ ├──[project] -│ │ │ ├── database // Database Service -│ │ │ │ ├── [collection] // Nested Route for the collection "/console/[PROJECT_ID]/database/[COLLECTION_ID]" -│ │ │ │ ├── _create.svelte // Component to Create collections -│ │ │ │ └── index.svelte // Entrypoint for "/console/[PROJECT_ID]/database" -│ │ │ ├── storage // Storage Service "/console/[PROJECT]/storage" -│ │ │ └── auth // Users Service "/console/[PROJECT]/auth" -│ │ └──... -│ ├── login.svelte // Component for Login "/console/login" -│ └── register.svelte // Component for Register "/console/register" -├── build // Compiled application -└── static // Static assets +│ ├── lib // Reusable logic (accessible with '$lib') +│ │ ├── actions // Svelte actions +│ │ ├── charts // Chart components +│ │ ├── components // Re-usable components +│ │ ├── elements // Re-usable elements +│ │ ├── helpers // Small functions used through out the console +│ │ ├── images // Images used in the console +│ │ ├── layout // Global components for the layout (Nav/Content/Container) +│ │ ├── mock // Mock components used for testing +│ │ └── stores // Global stores (state management) +│ └── routes +│ └── console // Routes that need authentication +│ │ └── project-[project] +│ │ │ └── database // Database Service +│ │ │ │ ├── +layout.svelte // Layout head and other logic like realtime events is set here +│ │ │ │ ├── +layout.ts // Layout data is set here (Header, Breadcrumbs, ...) +│ │ │ │ ├── +page.svelte // Page displayed on "/console/project-[PROJECT_ID]/database" +│ │ │ │ ├── +page.ts // Necessary data for the page is fetched here +│ │ │ │ └── create.svelte // Component to create databases +│ │ │ └── ... // Other services +│ │ └── ... +│ └── ... // Routes that don't need authentication +├── build // Compiled application +└── static // Static assets ``` ## Development @@ -40,12 +45,15 @@ git clone https://github.com/appwrite/console.git appwrite-console ``` ### 2. Install dependencies with npm + Navigate to the Appwrite Console repository and install dependencies. + ```bash cd appwrite-console && npm install ``` ### 3. Install and run Appwrite locally + When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally. Follow the [install instructions](https://appwrite.io/docs/installation) in the Appwrite docs. From 895f77a21374a25e12efc863c303f8e6d3220b9a Mon Sep 17 00:00:00 2001 From: tglide <26071571+TGlide@users.noreply.github.com> Date: Mon, 15 May 2023 16:11:23 +0100 Subject: [PATCH 09/13] refactor: change id naming --- .../functions/function-[function]/header.svelte | 4 +++- .../project-[project]/storage/bucket-[bucket]/header.svelte | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/routes/console/project-[project]/functions/function-[function]/header.svelte b/src/routes/console/project-[project]/functions/function-[function]/header.svelte index c878a4b00..f48bc5324 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/header.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/header.svelte @@ -40,7 +40,9 @@ {$func?.name} - Function ID + {#if $func?.$id} + {$func.$id} + {/if} diff --git a/src/routes/console/project-[project]/storage/bucket-[bucket]/header.svelte b/src/routes/console/project-[project]/storage/bucket-[bucket]/header.svelte index 0422235be..ce37faa4d 100644 --- a/src/routes/console/project-[project]/storage/bucket-[bucket]/header.svelte +++ b/src/routes/console/project-[project]/storage/bucket-[bucket]/header.svelte @@ -34,7 +34,9 @@ {$bucket?.name} - Bucket ID + {#if $bucket?.$id} + {$bucket.$id} + {/if} From 8e0df5445660135d9260c03a7ff3f90e8e4001a5 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Wed, 17 May 2023 12:06:49 -0700 Subject: [PATCH 10/13] Update CI to build last The other checks are faster and would result in a faster feedback loop. --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1f4ef8396..aaac70173 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,11 +22,11 @@ jobs: # run: npm audit --audit-level low - name: Install dependencies run: npm ci - - name: Build Console - run: npm run build - name: Svelte Diagnostics run: npm run check - name: Linter run: npm run lint - name: Unit Tests run: npm test + - name: Build Console + run: npm run build From 51a59ce4ec7e7888fbae8cb165fd52507f41aa78 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Fri, 19 May 2023 17:54:40 +0000 Subject: [PATCH 11/13] Maybe this link should go to the package, certainly better than the main page --- .../overview/platforms/wizard/web/step2.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/web/step2.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/web/step2.svelte index 9699669ff..bff1c05dc 100644 --- a/src/routes/console/project-[project]/overview/platforms/wizard/web/step2.svelte +++ b/src/routes/console/project-[project]/overview/platforms/wizard/web/step2.svelte @@ -35,8 +35,12 @@ {#if method === Method.NPM}

- Use NPM (node package manager) from your command line to add Appwrite SDK to your project. + Use NPM (node package manager) from your command line to add Appwrite SDK + to your project.

From 4492059a2bac9a4e6b3da2228f88b1670bbfd018 Mon Sep 17 00:00:00 2001 From: Arman Date: Mon, 22 May 2023 16:57:17 +0200 Subject: [PATCH 12/13] refactor: function settings --- .../function-[function]/settings/+page.svelte | 527 +----------------- .../settings/dangerZone.svelte | 33 ++ .../{delete.svelte => deleteModal.svelte} | 0 .../settings/executeFunction.svelte | 36 ++ .../settings/updateName.svelte | 66 +++ .../settings/updatePermissions.svelte | 78 +++ .../settings/updateSchedule.svelte | 71 +++ .../settings/updateTimeout.svelte | 66 +++ .../settings/updateVariables.svelte | 233 ++++++++ ...les.svelte => uploadVariablesModal.svelte} | 0 10 files changed, 599 insertions(+), 511 deletions(-) create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/dangerZone.svelte rename src/routes/console/project-[project]/functions/function-[function]/settings/{delete.svelte => deleteModal.svelte} (100%) create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/updateName.svelte create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/updatePermissions.svelte create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/updateSchedule.svelte create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/updateTimeout.svelte create mode 100644 src/routes/console/project-[project]/functions/function-[function]/settings/updateVariables.svelte rename src/routes/console/project-[project]/functions/function-[function]/settings/{uploadVariables.svelte => uploadVariablesModal.svelte} (100%) diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte index 94aadbc6c..85f8265db 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/+page.svelte @@ -1,520 +1,25 @@ - -

-
- technology -
-
- {$func.name} - -

{$func.runtime}

-
-
- -
-
-

Function ID: {$func.$id}

-

Created at: {toLocaleDateTime($func.$createdAt)}

-

Updated at: {toLocaleDateTime($func.$updatedAt)}

-
-
-
- - - - - - - - - Name - - -
    - -
-
- - - - -
- - -
- - Execute Access -

- Choose who can execute this function using the client API. For more information, - check out the - Permissions Guide - . -

- - - - - - - -
-
- + + + - -
- - Schedule -

- Set a Cron schedule to trigger your function. Leave blank for no schedule. - More details on Cron syntax here. -

- - - - - - - - - -
-
- - - Variables -

Set the variables (or secret keys) that will be passed to your function at runtime.

- -
- - -
- {@const limit = 10} - {@const sum = data.variables.total} - {#if sum} -
- - - Key - Value - - - - {#each data.variables.variables.slice(offset, offset + limit) as variable, i} - - - - {variable.key} - - - - - - - - - - - { - selectedVar = variable; - showVariablesDropdown[i] = false; - showVariablesModal = true; - }}> - Edit - - { - handleVariableDeleted(variable); - showVariablesDropdown[i] = false; - }}> - Delete - - - - - - {/each} - -
- -
-

Total variables: {sum}

- -
-
- {:else} - (showVariablesModal = !showVariablesModal)}> - Create a variable to get started - - {/if} -
-
- -
- - Timeout -

- Limit the execution time of your function. Maximum value is 900 seconds (15 - minutes). -

- - - - - - - - - -
-
- - - Delete Function -

- The function will be permanently deleted, including all deployments associated with it. - This action is irreversible. -

- - - -
{$func.name}
-
-

Last Updated: {toLocaleDateTime($func.$updatedAt)}

-
-
- - - - -
+ + + + - - -{#if showVariablesModal} - -{/if} -{#if showVariablesUpload} - -{/if} diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/dangerZone.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/dangerZone.svelte new file mode 100644 index 000000000..d5ec9fbf4 --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/dangerZone.svelte @@ -0,0 +1,33 @@ + + + + Delete Function +

+ The function will be permanently deleted, including all deployments associated with it. This + action is irreversible. +

+ + + +
{$func.name}
+
+

Last Updated: {toLocaleDateTime($func.$updatedAt)}

+
+
+ + + + +
+ + diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/delete.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/deleteModal.svelte similarity index 100% rename from src/routes/console/project-[project]/functions/function-[function]/settings/delete.svelte rename to src/routes/console/project-[project]/functions/function-[function]/settings/deleteModal.svelte diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte new file mode 100644 index 000000000..194b18bed --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/executeFunction.svelte @@ -0,0 +1,36 @@ + + + +
+
+ technology +
+
+ {$func.name} + +

{$func.runtime}

+
+
+ +
+
+

Function ID: {$func.$id}

+

Created at: {toLocaleDateTime($func.$createdAt)}

+

Updated at: {toLocaleDateTime($func.$updatedAt)}

+
+
+
+ + + + +
diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updateName.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updateName.svelte new file mode 100644 index 000000000..431d12e5f --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updateName.svelte @@ -0,0 +1,66 @@ + + +
+ + Name + + +
    + +
+
+ + + + +
+
diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updatePermissions.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updatePermissions.svelte new file mode 100644 index 000000000..369f936a9 --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updatePermissions.svelte @@ -0,0 +1,78 @@ + + +
+ + Execute Access +

+ Choose who can execute this function using the client API. For more information, check + out the + Permissions Guide + . +

+ + + + + + + +
+
diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updateSchedule.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updateSchedule.svelte new file mode 100644 index 000000000..e60ba6e99 --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updateSchedule.svelte @@ -0,0 +1,71 @@ + + +
+ + Schedule +

+ Set a Cron schedule to trigger your function. Leave blank for no schedule. + More details on Cron syntax here. +

+ + + + + + + + + +
+
diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updateTimeout.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updateTimeout.svelte new file mode 100644 index 000000000..94489f929 --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updateTimeout.svelte @@ -0,0 +1,66 @@ + + +
+ + Timeout +

Limit the execution time of your function. Maximum value is 900 seconds (15 minutes).

+ + + + + + + + + +
+
diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/updateVariables.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/updateVariables.svelte new file mode 100644 index 000000000..c3915babc --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/settings/updateVariables.svelte @@ -0,0 +1,233 @@ + + + + Variables +

Set the variables (or secret keys) that will be passed to your function at runtime.

+ +
+ + +
+ {@const limit = 10} + {@const sum = variableList.total} + {#if sum} +
+ + + Key + Value + + + + {#each variableList.variables.slice(offset, offset + limit) as variable, i} + + + + {variable.key} + + + + + + + + + + + { + selectedVar = variable; + showVariablesDropdown[i] = false; + showVariablesModal = true; + }}> + Edit + + { + handleVariableDeleted(variable); + showVariablesDropdown[i] = false; + }}> + Delete + + + + + + {/each} + +
+ +
+

Total variables: {sum}

+ +
+
+ {:else} + (showVariablesModal = !showVariablesModal)}> + Create a variable to get started + + {/if} +
+
+ +{#if showVariablesModal} + +{/if} +{#if showVariablesUpload} + +{/if} diff --git a/src/routes/console/project-[project]/functions/function-[function]/settings/uploadVariables.svelte b/src/routes/console/project-[project]/functions/function-[function]/settings/uploadVariablesModal.svelte similarity index 100% rename from src/routes/console/project-[project]/functions/function-[function]/settings/uploadVariables.svelte rename to src/routes/console/project-[project]/functions/function-[function]/settings/uploadVariablesModal.svelte From 71ccb987b6f2817e69802554dfdf4f8a3621e5c6 Mon Sep 17 00:00:00 2001 From: Arman Date: Fri, 26 May 2023 14:14:09 +0200 Subject: [PATCH 13/13] fix: add scroll to tables in mobile --- .../databases/database-[database]/table.svelte | 8 ++++---- .../project-[project]/databases/table.svelte | 8 ++++---- .../settings/webhooks/+page.svelte | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/routes/console/project-[project]/databases/database-[database]/table.svelte b/src/routes/console/project-[project]/databases/database-[database]/table.svelte index 317956ae7..458baaa62 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/table.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/table.svelte @@ -3,13 +3,13 @@ import { page } from '$app/stores'; import { Id } from '$lib/components'; import { - Table, TableBody, TableCell, TableCellHead, TableCellText, TableHeader, - TableRowLink + TableRowLink, + TableScroll } from '$lib/elements/table'; import { toLocaleDateTime } from '$lib/helpers/date'; import type { PageData } from './$types'; @@ -20,7 +20,7 @@ const databaseId = $page.params.database; - + {#each $columns as column} {#if column.show} @@ -54,4 +54,4 @@ {/each} -
+ diff --git a/src/routes/console/project-[project]/databases/table.svelte b/src/routes/console/project-[project]/databases/table.svelte index 401364401..ac63aa184 100644 --- a/src/routes/console/project-[project]/databases/table.svelte +++ b/src/routes/console/project-[project]/databases/table.svelte @@ -3,13 +3,13 @@ import { page } from '$app/stores'; import { Id } from '$lib/components'; import { - Table, TableBody, TableCell, TableCellHead, TableCellText, TableHeader, - TableRowLink + TableRowLink, + TableScroll } from '$lib/elements/table'; import { toLocaleDateTime } from '$lib/helpers/date'; import type { PageData } from './$types'; @@ -19,7 +19,7 @@ const projectId = $page.params.project; - + {#each $columns as column} {#if column.show} @@ -55,4 +55,4 @@ {/each} -
+ diff --git a/src/routes/console/project-[project]/settings/webhooks/+page.svelte b/src/routes/console/project-[project]/settings/webhooks/+page.svelte index fde1c291e..1e22b243a 100644 --- a/src/routes/console/project-[project]/settings/webhooks/+page.svelte +++ b/src/routes/console/project-[project]/settings/webhooks/+page.svelte @@ -6,13 +6,13 @@ import { Button } from '$lib/elements/forms'; import { Pill } from '$lib/elements'; import { - Table, TableBody, TableRowLink, TableCellHead, TableCell, TableCellText, - TableHeader + TableHeader, + TableScroll } from '$lib/elements/table'; import { Container } from '$lib/layout'; import { wizard } from '$lib/stores/wizard'; @@ -46,10 +46,10 @@
{#if data.webhooks.total} - + - Name - POST URL + Name + POST URL Events @@ -57,7 +57,7 @@ -
+
{webhook.name} {#if webhook.security === false} SLL/TLS disabled @@ -69,7 +69,7 @@ {/each} -
+ {:else}