diff --git a/frontend/src/lib/components/SuperadminSettings.svelte b/frontend/src/lib/components/SuperadminSettings.svelte index 05c5a2d764..20d646e56a 100644 --- a/frontend/src/lib/components/SuperadminSettings.svelte +++ b/frontend/src/lib/components/SuperadminSettings.svelte @@ -2,7 +2,7 @@ import { UserService, GlobalUserInfo } from '$lib/gen' import TableCustom from '$lib/components/TableCustom.svelte' import InviteGlobalUser from '$lib/components/InviteGlobalUser.svelte' - import { Badge, Drawer, DrawerContent, Tab, Tabs } from '$lib/components/common' + import { Drawer, DrawerContent, Tab, Tabs } from '$lib/components/common' import { sendUserToast } from '$lib/toast' import SearchItems from './SearchItems.svelte' import { page } from '$app/stores' diff --git a/frontend/src/lib/components/apps/components/display/table/AppTable.svelte b/frontend/src/lib/components/apps/components/display/table/AppTable.svelte index 22e9f1cf3d..354e2ede7c 100644 --- a/frontend/src/lib/components/apps/components/display/table/AppTable.svelte +++ b/frontend/src/lib/components/apps/components/display/table/AppTable.svelte @@ -28,12 +28,15 @@ import { components, type ButtonComponent } from '../../../editor/component' import { initCss } from '../../../utils' import { twMerge } from 'tailwind-merge' - import { initConfig, initOutput } from '$lib/components/apps/editor/appUtils' + import { connectOutput, initConfig, initOutput } from '$lib/components/apps/editor/appUtils' import ResolveConfig from '../../helpers/ResolveConfig.svelte' import AppCheckbox from '../../inputs/AppCheckbox.svelte' import AppSelect from '../../inputs/AppSelect.svelte' import RowWrapper from '../../layout/RowWrapper.svelte' import ResolveStyle from '../../helpers/ResolveStyle.svelte' + import { Popup } from '$lib/components/common' + import ComponentOutputViewer from '$lib/components/apps/editor/contextPanel/ComponentOutputViewer.svelte' + import { Plug2 } from 'lucide-svelte' export let id: string export let componentInput: AppInput | undefined @@ -50,8 +53,15 @@ let result: Record[] | undefined = undefined - const { app, worldStore, componentControl, selectedComponent, hoverStore, mode } = - getContext('AppViewerContext') + const { + app, + worldStore, + componentControl, + selectedComponent, + hoverStore, + mode, + connectingInput + } = getContext('AppViewerContext') let searchValue = '' @@ -378,6 +388,7 @@ >
{#each actionButtons as actionButton, actionIndex (actionButton?.id)} + {#if $mode !== 'preview'} + {actionButton.id} + + {#if $connectingInput.opened} +
+ + + + + + connectOutput( + connectingInput, + 'buttoncomponent', + actionButton.id, + detail + )} + componentId={actionButton.id} + /> + +
+ {/if} {/if} {#if rowIndex == 0} {@const controls = { diff --git a/frontend/src/lib/components/apps/editor/ComponentHeader.svelte b/frontend/src/lib/components/apps/editor/ComponentHeader.svelte index 521954179f..fe561c68ee 100644 --- a/frontend/src/lib/components/apps/editor/ComponentHeader.svelte +++ b/frontend/src/lib/components/apps/editor/ComponentHeader.svelte @@ -1,15 +1,16 @@ +{#if connecting} +
+ + + + + + connectOutput(connectingInput, component.type, component.id, detail)} + componentId={component.id} + /> + +
+{/if} + {#if selected || hover} + { dispatch('mouseover') diff --git a/frontend/src/lib/components/apps/editor/ConnectionInstructions.svelte b/frontend/src/lib/components/apps/editor/ConnectionInstructions.svelte index b28b9482a6..c7c9384f20 100644 --- a/frontend/src/lib/components/apps/editor/ConnectionInstructions.svelte +++ b/frontend/src/lib/components/apps/editor/ConnectionInstructions.svelte @@ -3,6 +3,7 @@ import { getContext } from 'svelte' import type { AppViewerContext } from '../types' import { secondaryMenuRight } from './settingsPanel/secondaryMenu' + import { Plug2 } from 'lucide-svelte' const { connectingInput } = getContext('AppViewerContext') @@ -17,13 +18,13 @@
- Click on the output of the component you want to connect to on the left panel. -
-
    -
  1. App is in a frozen state.
  2. -
  3. Clicking on a component will open the component's output on the left.
  4. -
  5. Hover on a component to see its output
  6. -
+
+ Click on the output of the component you want to connect to on the left panel 'Outputs' or + in the popup by clicking the