From 17d9e8b996393ba64dd7f5c7c25f2ec10d4dcfd4 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Thu, 15 Oct 2026 19:19:14 +0200 Subject: [PATCH] fix: pick the shared account with an inline select, and keep Nextcloud's own-account path in its wording Co-Authored-By: Claude Opus 5.5 --- .../WorkspaceIntegrations.svelte | 77 +++++++------------ 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/frontend/src/lib/components/workspaceSettings/WorkspaceIntegrations.svelte b/frontend/src/lib/components/workspaceSettings/WorkspaceIntegrations.svelte index 0ed0c706a9..e3b8a85d7d 100644 --- a/frontend/src/lib/components/workspaceSettings/WorkspaceIntegrations.svelte +++ b/frontend/src/lib/components/workspaceSettings/WorkspaceIntegrations.svelte @@ -95,8 +95,6 @@ let connections = $state>({}) let loading = $state(false) // The service whose OAuth app dialog is open. - // Services whose shared account picker is open. - let editingShared = $state>({}) let connectingShared = $state(null) let configOpen = $state>( Object.fromEntries(Object.keys(supportedServices).map((s) => [s, false])) @@ -203,7 +201,7 @@ try { const path = await connectNativeAccount($workspaceStore, serviceName as NativeServiceName) await loadConnections(serviceName) - if (await setWorkspaceConnection(serviceName, path)) editingShared[serviceName] = false + await setWorkspaceConnection(serviceName, path) } catch (err: any) { const displayName = supportedServices[serviceName]?.displayName ?? serviceName sendUserToast(`Could not connect ${displayName}: ${err.body ?? err.message}`, true) @@ -391,8 +389,8 @@ {#if serviceName === 'nextcloud' && !workspaceConnection}
- Nextcloud only accepts webhooks from an admin account. Connect one and share it so - members can create triggers. + Nextcloud only accepts webhooks from admin accounts, so members without one need a + shared account.
{/if}
-
- Shared account - {#if workspaceConnection} - {workspaceConnection} - {:else} - None - {/if} - {#if !editingShared[serviceName]} - - {/if} -
- {#if editingShared[serviceName]} -
- Members can create triggers as this account without seeing its token. +
+ Shared account +
+ + {#key workspaceConnection} + setWorkspaceConnection(serviceName, path)} + onConnectionsChange={() => loadConnections(serviceName)} + /> + {/key}
- - {#key workspaceConnection} - { - if (await setWorkspaceConnection(serviceName, path)) { - editingShared[serviceName] = false - } - }} - onConnectionsChange={() => loadConnections(serviceName)} - /> - {/key} - - {/if} +
+
+ Members can create triggers as this account without seeing its token. +
{/if}