From 6791abbe4dfbf33f5b3db4968f0878f82fd74aa6 Mon Sep 17 00:00:00 2001
From: Henri Courdent <122811744+hcourdent@users.noreply.github.com>
Date: Tue, 5 Sep 2023 10:06:32 +0200
Subject: [PATCH] Higlighted native languages integrations (#2231)
* Higlighted native languages integrations
* Excluded native integrations from the rest of integrations
* Fix bug filter
---
frontend/src/lib/components/AppConnect.svelte | 86 +++++++++++++------
.../src/lib/components/icons/AzureIcon.svelte | 6 ++
.../lib/components/icons/NocoDbIcon.svelte | 32 +++++++
frontend/src/lib/components/icons/index.ts | 16 +++-
4 files changed, 113 insertions(+), 27 deletions(-)
create mode 100644 frontend/src/lib/components/icons/AzureIcon.svelte
create mode 100644 frontend/src/lib/components/icons/NocoDbIcon.svelte
diff --git a/frontend/src/lib/components/AppConnect.svelte b/frontend/src/lib/components/AppConnect.svelte
index 9b6178321d..79fdb9d9cb 100644
--- a/frontend/src/lib/components/AppConnect.svelte
+++ b/frontend/src/lib/components/AppConnect.svelte
@@ -74,6 +74,8 @@
export let newPageOAuth = false
+ const nativeLanguagesCategory = ['postgresql', 'mysql', 'bigquery', 'snowflake', 'graphql'];
+
let filter = ''
let manual = false
let value: string = ''
@@ -193,6 +195,14 @@
linkedSecret: undefined
}
])
+ const filteredNativeLanguages = filteredConnectsManual?.filter(([key, _]) =>
+ nativeLanguagesCategory.includes(key)
+ );
+
+ filteredConnectsManual = [
+ ...(filteredNativeLanguages ?? []),
+ ...(filteredConnectsManual ?? []).filter(([key, _]) => !nativeLanguagesCategory.includes(key))
+ ];
}
async function next() {
@@ -423,31 +433,57 @@
{/if}
{/if}
-
Non OAuth APIs & Resources
-
- {#if filteredConnectsManual}
- {#each filteredConnectsManual as [key, _]}
-
- {/each}
- {:else}
- {#each new Array(9) as _}
-
- {/each}
- {/if}
-
+ Others
+
+ {#if filteredConnectsManual}
+ {#each filteredConnectsManual as [key, _]}
+ {#if nativeLanguagesCategory.includes(key)}
+
+ {/if}
+ {/each}
+ {/if}
+
+
+
+
+ {#if filteredConnectsManual}
+ {#each filteredConnectsManual as [key, _]}
+ {#if !nativeLanguagesCategory.includes(key)}
+
+ {/if}
+ {/each}
+ {:else}
+ {#each new Array(9) as _}
+
+ {/each}
+ {/if}
+
{:else if step == 2 && manual}
+ export let height = '24px'
+ export let width = '24px'
+
+
+
\ No newline at end of file
diff --git a/frontend/src/lib/components/icons/NocoDbIcon.svelte b/frontend/src/lib/components/icons/NocoDbIcon.svelte
new file mode 100644
index 0000000000..1d35f0fda0
--- /dev/null
+++ b/frontend/src/lib/components/icons/NocoDbIcon.svelte
@@ -0,0 +1,32 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/lib/components/icons/index.ts b/frontend/src/lib/components/icons/index.ts
index 99f72e56f2..22a45bbda9 100644
--- a/frontend/src/lib/components/icons/index.ts
+++ b/frontend/src/lib/components/icons/index.ts
@@ -59,6 +59,10 @@ import PineconeIcon from './PineconeIcon.svelte'
import RssIcon from './RssIcon.svelte'
import ShopifyIcon from './ShopifyIcon.svelte'
import TypeformIcon from './TypeformIcon.svelte'
+import BigQueryIcon from './BigQueryIcon.svelte'
+import GraphqlIcon from './GraphqlIcon.svelte'
+import NocoDbIcon from './NocoDbIcon.svelte'
+import AzureIcon from './AzureIcon.svelte'
export const APP_TO_ICON_COMPONENT = {
postgresql: PostgresIcon,
@@ -124,7 +128,11 @@ export const APP_TO_ICON_COMPONENT = {
pinecone: PineconeIcon,
rss: RssIcon,
shopify: ShopifyIcon,
- typeform: TypeformIcon
+ typeform: TypeformIcon,
+ bigquery: BigQueryIcon,
+ graphql: GraphqlIcon,
+ nocodb: NocoDbIcon,
+ azure: AzureIcon,
} as const
export {
@@ -184,5 +192,9 @@ export {
PineconeIcon,
RssIcon,
ShopifyIcon,
- TypeformIcon
+ TypeformIcon,
+ BigQueryIcon,
+ GraphqlIcon,
+ NocoDbIcon,
+ AzureIcon,
}