From b72d497982b3413bbeb51604b7fe49a19cfe9db8 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Sun, 14 Jul 2024 16:53:53 +0530 Subject: [PATCH 001/155] update: add helper texts. --- .../attributes/relationship.svelte | 66 +++++++++++-------- .../attributes/string.svelte | 24 +++++-- .../createAttribute.svelte | 4 +- 3 files changed, 57 insertions(+), 37 deletions(-) diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte index 59150c3a7..c5ccc780a 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/relationship.svelte @@ -154,30 +154,40 @@ - ({ value: n.$id, label: n.$id, data: [n.name] })) ?? []} - on:select={updateKeyName} - let:option={o}> - - {o.label} - - - - - {o.label} - - - - +
+ ({ value: n.$id, label: n.$id, data: [n.name] })) ?? []} + on:select={updateKeyName} + let:option={o}> + + {o.label} + + + + + {o.label} + + + + + +
+
+
{#if data?.relatedCollection}
@@ -190,12 +200,12 @@ readonly={editing} required /> -
+
@@ -209,12 +219,12 @@ required readonly={editing} /> -
+
diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte index 37d1e2e2f..9d8c00f75 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte @@ -69,13 +69,23 @@ $: handleDefaultState($required || $array); - +
+ + +
+
+
{#if data.size >= 50} -
+
From b6207f2d4c3fd4ae9d7cf3a23ae5b4920cecb908 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Sun, 14 Jul 2024 16:54:51 +0530 Subject: [PATCH 002/155] update: float, integer side by side. --- .../attributes/float.svelte | 44 +++++++++++++------ .../attributes/integer.svelte | 41 ++++++++++++----- 2 files changed, 59 insertions(+), 26 deletions(-) diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte index d92ce2d69..c221257bd 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/float.svelte @@ -75,20 +75,36 @@ $: handleDefaultState($required || $array); - - +
+
    +
  • + +
  • +
  • + +
  • +
+ +
+
+
- - +
+
    +
  • + +
  • + +
  • + +
  • +
+ +
+
+
Date: Sun, 14 Jul 2024 16:55:13 +0530 Subject: [PATCH 003/155] fix: typo. --- .../collection-[collection]/attributes/enum.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte index ceaf4488e..3f1b2b2e0 100644 --- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte +++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/enum.svelte @@ -86,7 +86,7 @@ label="Elements" bind:tags={data.elements} placeholder="Add elements here" - tooltip="Enum elements have a maxiumum length of 255 characters. This limit can not be exceeded." + tooltip="Enum elements have a maximum length of 255 characters. This limit can not be exceeded." required> From 0e30d5d5a73bab7e16da4698b3e839d21939e45d Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Sun, 28 Jul 2024 17:14:36 +0530 Subject: [PATCH 004/155] fix: use a simpler view for usage cards. --- .../settings/usage/[[invoice]]/+page.svelte | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte index a4d52bdf4..099deb804 100644 --- a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte +++ b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte @@ -223,24 +223,20 @@ {#if data.usage.executionsBreakdown.length > 0} - Function + Function Usage - {#each data.usage.executionsBreakdown as func} - + {func.name ?? func.resourceId} - + {formatNum(func.value)} executions - - View function - {/each} @@ -281,25 +277,21 @@ {#if data.usage.bucketsBreakdown.length > 0}
- Bucket + Bucket Usage - {#each data.usage.bucketsBreakdown.sort((a, b) => b.value - a.value) as bucket} {@const humanized = humanFileSize(bucket.value)} - - {bucket.name ?? bucket.resourceId} - - - {humanized.value}{humanized.unit} - - View bucket + {bucket.name ?? bucket.resourceId} + + {humanized.value}{humanized.unit} + {/each} From 90a35d053f5364cb5c9a6afcdff4d6ad6a39cc74 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Tue, 30 Jul 2024 14:13:11 +0530 Subject: [PATCH 005/155] improve: use chevron, make whole tile clickable. --- src/lib/elements/table/row.svelte | 16 ++++++++-- .../settings/usage/[[invoice]]/+page.svelte | 31 +++++++++++-------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/lib/elements/table/row.svelte b/src/lib/elements/table/row.svelte index 3a9808d96..c0cba2f5e 100644 --- a/src/lib/elements/table/row.svelte +++ b/src/lib/elements/table/row.svelte @@ -1,3 +1,13 @@ -
- -
+ + +{#if link} + + + +{:else} +
+ +
+{/if} \ No newline at end of file diff --git a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte index 099deb804..efe4f15df 100644 --- a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte +++ b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte @@ -221,22 +221,24 @@ } ]} /> {#if data.usage.executionsBreakdown.length > 0} -
+
- Function + Function Usage + {#each data.usage.executionsBreakdown as func} - - + + {func.name ?? func.resourceId} - + {formatNum(func.value)} executions + + + {/each} @@ -275,23 +277,26 @@ {#if data.usage.bucketsBreakdown.length > 0} -
+
- Bucket + Bucket Usage + {#each data.usage.bucketsBreakdown.sort((a, b) => b.value - a.value) as bucket} {@const humanized = humanFileSize(bucket.value)} - - + {bucket.name ?? bucket.resourceId} - + {humanized.value}{humanized.unit} + + + {/each} From d3c96369d15417b17b9c47281038e15e7e6a8dfe Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Tue, 30 Jul 2024 14:48:34 +0530 Subject: [PATCH 006/155] fix: consistent divider colors. --- src/lib/wizards/functions/cover.svelte | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lib/wizards/functions/cover.svelte b/src/lib/wizards/functions/cover.svelte index 08a18f119..4a1245d4a 100644 --- a/src/lib/wizards/functions/cover.svelte +++ b/src/lib/wizards/functions/cover.svelte @@ -287,4 +287,20 @@ hsl(var(--p-card-bg-color) / 0.5) 95.8% ); } + + .u-sep-block-start { + border-block-start: solid .0625rem hsl(var(--color-neutral)) !important; + } + + .clickable-list-item:not(:last-child) { + border-block-end: solid .0625rem hsl(var(--color-neutral)) !important; + } + + :global(.theme-light) { + --color-neutral: var(--color-neutral-10); + } + + :global(.theme-dark) { + --color-neutral: var(--color-neutral-85); + } From 06a02c7939437ebcab08388eaf108f3f737bc128 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Tue, 30 Jul 2024 14:55:07 +0530 Subject: [PATCH 007/155] fix: add 16px padding around link items. --- src/lib/wizards/functions/cover.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/wizards/functions/cover.svelte b/src/lib/wizards/functions/cover.svelte index 4a1245d4a..10e28b72b 100644 --- a/src/lib/wizards/functions/cover.svelte +++ b/src/lib/wizards/functions/cover.svelte @@ -219,7 +219,7 @@
    {#each templates as template} -
  • +
  • {/if} + + \ No newline at end of file From b59dd1d5dcd0ef3def02b8a9c6e4d7ac299c0da9 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Tue, 30 Jul 2024 15:35:29 +0530 Subject: [PATCH 009/155] update: center progress bar. --- src/lib/wizards/functions/components/repositories.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/wizards/functions/components/repositories.svelte b/src/lib/wizards/functions/components/repositories.svelte index 30297eb31..9b1bd657c 100644 --- a/src/lib/wizards/functions/components/repositories.svelte +++ b/src/lib/wizards/functions/components/repositories.svelte @@ -125,7 +125,7 @@

    {#if selectedInstallation} {#await loadRepositories(selectedInstallation, search)} -
    +
    {:then response} From 3bd01431eb0fcda2219ec19c47a4a2cf8024f847 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Tue, 30 Jul 2024 15:44:28 +0530 Subject: [PATCH 010/155] fix: branch message to use plural. --- src/lib/wizards/functions/steps/gitConfiguration.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/wizards/functions/steps/gitConfiguration.svelte b/src/lib/wizards/functions/steps/gitConfiguration.svelte index 9980e765d..1aaaf93ba 100644 --- a/src/lib/wizards/functions/steps/gitConfiguration.svelte +++ b/src/lib/wizards/functions/steps/gitConfiguration.svelte @@ -67,7 +67,7 @@ $choices.branch = event.detail.value; }} interactiveOutput - name="branch" + name="branches" {options} /> Date: Tue, 30 Jul 2024 18:16:34 +0530 Subject: [PATCH 011/155] fix: icon sizes as per designs. --- src/lib/components/dropListLink.svelte | 4 +++- .../functions/function-[function]/deploymentSource.svelte | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/components/dropListLink.svelte b/src/lib/components/dropListLink.svelte index 0267a21d0..5f60543ec 100644 --- a/src/lib/components/dropListLink.svelte +++ b/src/lib/components/dropListLink.svelte @@ -6,6 +6,7 @@ export let disabled = false; export let external = false; export let event: string = null; + export let iconStyle: string = ''; function track() { if (!event) { @@ -29,7 +30,8 @@ rel={external ? 'noopener noreferrer' : ''}> {#if icon} -
  • + diff --git a/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte b/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte index 0c5b765de..83e4f4e7e 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte @@ -15,14 +15,14 @@
@@ -286,7 +284,7 @@ {#each data.usage.bucketsBreakdown.sort((a, b) => b.value - a.value) as bucket} {@const humanized = humanFileSize(bucket.value)} - + {bucket.name ?? bucket.resourceId} @@ -297,7 +295,7 @@ - + {/each} From b0ec7f9fe76500c9e6167da1dc2a3658a6da4bd6 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Thu, 1 Aug 2024 12:29:23 +0530 Subject: [PATCH 017/155] update: organization usage. --- .../usage/[[invoice]]/ProjectBreakdown.svelte | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte b/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte index 456559272..83042fc74 100644 --- a/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte +++ b/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte @@ -3,12 +3,10 @@ import { Collapsible, CollapsibleItem } from '$lib/components'; import { TableBody, - TableCellLink, TableCellHead, TableHeader, - TableRow, TableScroll, - TableCellText + TableRowLink, TableCell } from '$lib/elements/table'; import { abbreviateNumber } from '$lib/helpers/numbers'; import { humanFileSize } from '$lib/helpers/sizeConvertion'; @@ -55,27 +53,31 @@ Project breakdown - + - Project - Usage - + Project + Usage + {#each groupByProject(metric).sort((a, b) => b.usage - a.usage) as project} - - + + {getProjectName(project.projectId)} - - {format(project.usage)} - - View project usage - - + + {format(project.usage)} + + + + {/each} + + \ No newline at end of file From 49cbe477b9c1f6b5c0454158b59399e891dff45b Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Thu, 1 Aug 2024 12:32:04 +0530 Subject: [PATCH 018/155] ran: `npm run format`. --- src/lib/elements/table/row.svelte | 2 +- src/lib/helpers/load.ts | 2 +- src/lib/layout/unauthenticated.svelte | 2 +- src/lib/stores/feedback.ts | 4 ++-- .../usage/[[invoice]]/ProjectBreakdown.svelte | 10 ++++++---- .../settings/usage/[[invoice]]/+page.svelte | 13 +++++++------ 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/lib/elements/table/row.svelte b/src/lib/elements/table/row.svelte index 7cdf2e053..3a9808d96 100644 --- a/src/lib/elements/table/row.svelte +++ b/src/lib/elements/table/row.svelte @@ -1,3 +1,3 @@
-
\ No newline at end of file +
diff --git a/src/lib/helpers/load.ts b/src/lib/helpers/load.ts index 05e043ddc..21e2f1ee6 100644 --- a/src/lib/helpers/load.ts +++ b/src/lib/helpers/load.ts @@ -21,7 +21,7 @@ export enum View { export function getView(url: URL, route: Page['route'], fallback: View): View { return (url.searchParams.get('view') ?? preferences.get(route).view) === View.Grid ? View.Grid - : View.Table ?? fallback; + : (View.Table ?? fallback); } export function getColumns(route: Page['route'], fallback: string[]): string[] { diff --git a/src/lib/layout/unauthenticated.svelte b/src/lib/layout/unauthenticated.svelte index b7e250b54..4d859d492 100644 --- a/src/lib/layout/unauthenticated.svelte +++ b/src/lib/layout/unauthenticated.svelte @@ -16,7 +16,7 @@ export let coupon: Coupon = null; $: selectedCampaign = campaigns.get(coupon?.campaign ?? campaign); - $: variation = (coupon?.campaign ?? campaign ? selectedCampaign?.template : 'default') as + $: variation = ((coupon?.campaign ?? campaign) ? selectedCampaign?.template : 'default') as | 'default' | CampaignData['template']; diff --git a/src/lib/stores/feedback.ts b/src/lib/stores/feedback.ts index 7f9b6b200..7eaefca2d 100644 --- a/src/lib/stores/feedback.ts +++ b/src/lib/stores/feedback.ts @@ -71,8 +71,8 @@ export const feedbackData = createFeedbackDataStore(); function createFeedbackStore() { const { subscribe, update } = writable({ - elapsed: browser ? parseInt(localStorage.getItem('feedbackElapsed')) ?? 0 : 0, - visualized: browser ? parseInt(localStorage.getItem('feedbackVisualized')) ?? 0 : 0, + elapsed: browser ? (parseInt(localStorage.getItem('feedbackElapsed')) ?? 0) : 0, + visualized: browser ? (parseInt(localStorage.getItem('feedbackVisualized')) ?? 0) : 0, notification: false, type: 'general', show: false diff --git a/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte b/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte index 83042fc74..9ebccad73 100644 --- a/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte +++ b/src/routes/console/organization-[organization]/usage/[[invoice]]/ProjectBreakdown.svelte @@ -6,7 +6,8 @@ TableCellHead, TableHeader, TableScroll, - TableRowLink, TableCell + TableRowLink, + TableCell } from '$lib/elements/table'; import { abbreviateNumber } from '$lib/helpers/numbers'; import { humanFileSize } from '$lib/helpers/sizeConvertion'; @@ -57,7 +58,7 @@ Project Usage - + {#each groupByProject(metric).sort((a, b) => b.usage - a.usage) as project} @@ -67,7 +68,8 @@ {format(project.usage)} - + {/each} @@ -80,4 +82,4 @@ .ignore-icon-rotate { rotate: unset !important; } - \ No newline at end of file + diff --git a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte index 1485a4267..ad8e71972 100644 --- a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte +++ b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.svelte @@ -6,7 +6,8 @@ TableCell, TableCellHead, TableHeader, - Table, TableRowLink + Table, + TableRowLink } from '$lib/elements/table'; import { showUsageRatesModal, tierToPlan, upgradeURL } from '$lib/stores/billing'; import { organization } from '$lib/stores/organization'; @@ -227,7 +228,8 @@ {#each data.usage.executionsBreakdown as func} - + {func.name ?? func.resourceId} @@ -235,7 +237,7 @@ {formatNum(func.value)} executions - + {/each} @@ -285,15 +287,14 @@ {#each data.usage.bucketsBreakdown.sort((a, b) => b.value - a.value) as bucket} {@const humanized = humanFileSize(bucket.value)} - + {bucket.name ?? bucket.resourceId} {humanized.value}{humanized.unit} - + {/each} From bc56e7d4e1ea82d39b3b97314b706196d413f0ae Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Thu, 1 Aug 2024 14:15:30 +0530 Subject: [PATCH 019/155] update: stack content vertically on mobile. --- .../deployment-[deployment]/+page.svelte | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte index 8d33c939e..334283d77 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte @@ -64,7 +64,7 @@ {@const status = $deployment.status} {@const fileSize = humanFileSize($deployment.size)} -
+

Build time: @@ -98,7 +98,7 @@

{/if}
-
+
+ + \ No newline at end of file From f53897f7791201b271d4f5b3afe04cde7de08b6a Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Thu, 1 Aug 2024 14:55:22 +0530 Subject: [PATCH 020/155] fix: component borders for CLI modal. --- src/lib/components/code.svelte | 5 ++++- .../function-[function]/createCli.svelte | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/lib/components/code.svelte b/src/lib/components/code.svelte index 5a358d548..47c134f20 100644 --- a/src/lib/components/code.svelte +++ b/src/lib/components/code.svelte @@ -32,6 +32,9 @@ export let noBoxPadding = false; export let allowScroll = false; + let classes = ''; + export { classes as class }; + Prism.plugins.customClass.prefix('prism-'); afterUpdate(async () => { @@ -39,7 +42,7 @@ }); -
+
{#if label} diff --git a/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte b/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte index efc7a48c7..b43c2d9bd 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte @@ -98,7 +98,7 @@ >. -
+
{#each ['Unix', 'CMD', 'PowerShell'] as cat} {/if} @@ -127,3 +128,17 @@ + + \ No newline at end of file From 1242c454e78f2deac739638e294ee85f965d7e75 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Fri, 2 Aug 2024 14:18:01 +0530 Subject: [PATCH 021/155] fix: cli commands bg. --- .../functions/function-[function]/createCli.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte b/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte index b43c2d9bd..d8e3e3b2b 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte @@ -132,6 +132,7 @@ \ No newline at end of file From 14e83740d7cf04994f21ef60945d30c36d603ea4 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Fri, 2 Aug 2024 15:01:33 +0530 Subject: [PATCH 022/155] fix: item gap. --- src/lib/wizards/functions/cover.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/wizards/functions/cover.svelte b/src/lib/wizards/functions/cover.svelte index 10e28b72b..a5afc9cf8 100644 --- a/src/lib/wizards/functions/cover.svelte +++ b/src/lib/wizards/functions/cover.svelte @@ -219,7 +219,7 @@
    {#each templates as template} -
  • +
{/if} + + From c554aab4b9dae846d8d29af12b86e26388c08a56 Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Fri, 2 Aug 2024 17:05:02 +0530 Subject: [PATCH 027/155] ran: `npm run format`. --- src/lib/components/code.svelte | 5 +- src/lib/components/dropListLink.svelte | 1 - src/lib/helpers/load.ts | 2 +- src/lib/layout/unauthenticated.svelte | 2 +- src/lib/stores/feedback.ts | 4 +- .../functions/components/repositories.svelte | 2 +- src/lib/wizards/functions/cover.svelte | 4 +- .../functions/steps/templateVariables.svelte | 74 ++++++++++--------- .../function-[function]/createCli.svelte | 6 +- .../deployment-[deployment]/+page.svelte | 5 +- .../deploymentSource.svelte | 18 ++++- 11 files changed, 70 insertions(+), 53 deletions(-) diff --git a/src/lib/components/code.svelte b/src/lib/components/code.svelte index 47c134f20..5b818a7b8 100644 --- a/src/lib/components/code.svelte +++ b/src/lib/components/code.svelte @@ -42,7 +42,10 @@ }); -
+
{#if label} diff --git a/src/lib/components/dropListLink.svelte b/src/lib/components/dropListLink.svelte index 5f60543ec..a2ef47b99 100644 --- a/src/lib/components/dropListLink.svelte +++ b/src/lib/components/dropListLink.svelte @@ -34,4 +34,3 @@ {/if} - diff --git a/src/lib/helpers/load.ts b/src/lib/helpers/load.ts index 05e043ddc..21e2f1ee6 100644 --- a/src/lib/helpers/load.ts +++ b/src/lib/helpers/load.ts @@ -21,7 +21,7 @@ export enum View { export function getView(url: URL, route: Page['route'], fallback: View): View { return (url.searchParams.get('view') ?? preferences.get(route).view) === View.Grid ? View.Grid - : View.Table ?? fallback; + : (View.Table ?? fallback); } export function getColumns(route: Page['route'], fallback: string[]): string[] { diff --git a/src/lib/layout/unauthenticated.svelte b/src/lib/layout/unauthenticated.svelte index b7e250b54..4d859d492 100644 --- a/src/lib/layout/unauthenticated.svelte +++ b/src/lib/layout/unauthenticated.svelte @@ -16,7 +16,7 @@ export let coupon: Coupon = null; $: selectedCampaign = campaigns.get(coupon?.campaign ?? campaign); - $: variation = (coupon?.campaign ?? campaign ? selectedCampaign?.template : 'default') as + $: variation = ((coupon?.campaign ?? campaign) ? selectedCampaign?.template : 'default') as | 'default' | CampaignData['template']; diff --git a/src/lib/stores/feedback.ts b/src/lib/stores/feedback.ts index 7f9b6b200..7eaefca2d 100644 --- a/src/lib/stores/feedback.ts +++ b/src/lib/stores/feedback.ts @@ -71,8 +71,8 @@ export const feedbackData = createFeedbackDataStore(); function createFeedbackStore() { const { subscribe, update } = writable({ - elapsed: browser ? parseInt(localStorage.getItem('feedbackElapsed')) ?? 0 : 0, - visualized: browser ? parseInt(localStorage.getItem('feedbackVisualized')) ?? 0 : 0, + elapsed: browser ? (parseInt(localStorage.getItem('feedbackElapsed')) ?? 0) : 0, + visualized: browser ? (parseInt(localStorage.getItem('feedbackVisualized')) ?? 0) : 0, notification: false, type: 'general', show: false diff --git a/src/lib/wizards/functions/components/repositories.svelte b/src/lib/wizards/functions/components/repositories.svelte index 9b1bd657c..2c6bcc90d 100644 --- a/src/lib/wizards/functions/components/repositories.svelte +++ b/src/lib/wizards/functions/components/repositories.svelte @@ -230,4 +230,4 @@ .icon-lock-closed { color: hsl(var(--color-neutral-50)); } - \ No newline at end of file + diff --git a/src/lib/wizards/functions/cover.svelte b/src/lib/wizards/functions/cover.svelte index a5afc9cf8..e539f6f05 100644 --- a/src/lib/wizards/functions/cover.svelte +++ b/src/lib/wizards/functions/cover.svelte @@ -289,11 +289,11 @@ } .u-sep-block-start { - border-block-start: solid .0625rem hsl(var(--color-neutral)) !important; + border-block-start: solid 0.0625rem hsl(var(--color-neutral)) !important; } .clickable-list-item:not(:last-child) { - border-block-end: solid .0625rem hsl(var(--color-neutral)) !important; + border-block-end: solid 0.0625rem hsl(var(--color-neutral)) !important; } :global(.theme-light) { diff --git a/src/lib/wizards/functions/steps/templateVariables.svelte b/src/lib/wizards/functions/steps/templateVariables.svelte index d7a44179e..4d4f49dad 100644 --- a/src/lib/wizards/functions/steps/templateVariables.svelte +++ b/src/lib/wizards/functions/steps/templateVariables.svelte @@ -76,6 +76,42 @@
+ {#each requiredVariables as variable} + {#if variable.name === 'APPWRITE_API_KEY'} + + {:else} +
+ + + {@html variable.description} + +
+ {/if} + {/each} +
+
+
+
+ {:else if requiredVariables?.length > 1} + + + Required variables + + {requiredVariables.length} + + + {#each requiredVariables as variable} {#if variable.name === 'APPWRITE_API_KEY'} @@ -98,41 +134,7 @@ {/if} {/each} -
-
- - {:else if requiredVariables?.length > 1} - - - Required variables - - {requiredVariables.length} - - - - {#each requiredVariables as variable} - {#if variable.name === 'APPWRITE_API_KEY'} - - {:else} -
- - - {@html variable.description} - -
- {/if} - {/each} -
-
+
{/if} {/if} @@ -182,4 +184,4 @@ .collapsible-button div { padding: 3px 0; } - \ No newline at end of file + diff --git a/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte b/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte index d8e3e3b2b..22bf832f9 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/createCli.svelte @@ -139,12 +139,12 @@ .editor-border :global(.cli-commands-code-box-no-outline) { margin: 1rem 0; border: unset !important; - border-radius: unset!important; + border-radius: unset !important; background-color: unset !important; - padding: 0 var(--box-padding, 1.5rem ) 0 var(--box-padding, 1.5rem ); + padding: 0 var(--box-padding, 1.5rem) 0 var(--box-padding, 1.5rem); } :global(.editor-border .cli-commands-code-box-no-outline pre) { background-color: unset !important; } - \ No newline at end of file + diff --git a/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte index 3f929eef6..e09f79cd4 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte @@ -144,7 +144,8 @@ \ No newline at end of file + diff --git a/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte b/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte index 2d64f7a03..b07d96d97 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/deploymentSource.svelte @@ -15,18 +15,30 @@