From 50d64de72acb9ee97a7735aeb65470d51195f522 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 3 Sep 2024 18:51:45 +0100 Subject: [PATCH] styling updates --- .../portal/settings/ai/AIConfigTile.svelte | 33 +++++++++++++++++-- .../builder/portal/settings/ai/constants.ts | 2 +- .../portal/settings/ai/logos/Budibase.svelte | 17 ++++++++++ .../settings/ai/logos/TogetherAI.svelte | 17 ++++++++++ 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 packages/builder/src/pages/builder/portal/settings/ai/logos/Budibase.svelte create mode 100644 packages/builder/src/pages/builder/portal/settings/ai/logos/TogetherAI.svelte diff --git a/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte b/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte index 4b9b4cc506..d02c2c62c3 100644 --- a/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte +++ b/packages/builder/src/pages/builder/portal/settings/ai/AIConfigTile.svelte @@ -2,6 +2,7 @@ import { Body, Label, Icon } from "@budibase/bbui" import OpenAILogo from "./logos/OpenAI.svelte" import AnthropicLogo from "./logos/Anthropic.svelte" + import TogetherAILogo from "./logos/TogetherAI.svelte" import { Providers } from "./constants" export let config @@ -19,6 +20,8 @@ {:else if config.provider === Providers.Anthropic.name} + {:else if config.provider === Providers.TogetherAI.name} + {/if}
@@ -28,17 +31,23 @@
-
Activated
+ {#if config.active} +
Activated
+ {:else if !config.active} +
Disabled
+ {/if}
@@ -46,7 +55,7 @@ .option { background-color: var(--background); border: 1px solid var(--grey-4); - padding: 10px 16px 14px; + padding: 16px; border-radius: 4px; cursor: pointer; display: grid; @@ -87,4 +96,24 @@ grid-gap: 10px; align-items: center; } + + .tag { + display: flex; + color: var(--spectrum-body-m-text-color); + padding: 4px 8px; + justify-content: center; + align-items: center; + gap: 8px; + font-size: 12px; + } + + .active { + border-radius: 5px; + background: var(--spectrum-global-color-green-600); + } + + .disabled { + border-radius: 5px; + background: var(--spectrum-global-color-red-600); + } diff --git a/packages/builder/src/pages/builder/portal/settings/ai/constants.ts b/packages/builder/src/pages/builder/portal/settings/ai/constants.ts index 07e0ea1cb7..9c82f714a4 100644 --- a/packages/builder/src/pages/builder/portal/settings/ai/constants.ts +++ b/packages/builder/src/pages/builder/portal/settings/ai/constants.ts @@ -22,7 +22,7 @@ export const Providers = { TogetherAI: { name: "Together AI", // TODO: too many - probably need to use an autocomplete for this - models: [""] + models: ["whatever"] }, Custom: { name: "Custom", diff --git a/packages/builder/src/pages/builder/portal/settings/ai/logos/Budibase.svelte b/packages/builder/src/pages/builder/portal/settings/ai/logos/Budibase.svelte new file mode 100644 index 0000000000..f69c7d8281 --- /dev/null +++ b/packages/builder/src/pages/builder/portal/settings/ai/logos/Budibase.svelte @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/packages/builder/src/pages/builder/portal/settings/ai/logos/TogetherAI.svelte b/packages/builder/src/pages/builder/portal/settings/ai/logos/TogetherAI.svelte new file mode 100644 index 0000000000..1afd5626b1 --- /dev/null +++ b/packages/builder/src/pages/builder/portal/settings/ai/logos/TogetherAI.svelte @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + \ No newline at end of file