Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(settings): link team GitHub prompt to integrations page (#7633)

Will Hutchinson1350f02e4f67
diff --git a/apps/web/src/features/settings/Team.tsx b/apps/web/src/features/settings/Team.tsx
index 93c9484eba..9da9043795 100644
--- a/apps/web/src/features/settings/Team.tsx
+++ b/apps/web/src/features/settings/Team.tsx
@@ -10,6 +10,7 @@ import {
} from '@core/component/TopBar/linkShare';
import { UserIcon } from '@core/component/UserIcon';
import { enableAiUsageBilling } from '@core/constant/featureFlags';
+import { useSettingsState } from '@core/constant/SettingsState';
import { SERVER_HOSTS } from '@core/constant/servers';
import { useUserId } from '@core/context/user';
import { getDisplayName, macroIdToEmail, tryMacroId } from '@core/user';
@@ -86,6 +87,7 @@ import {
Switch,
} from 'solid-js';
import { z } from 'zod';
+import { ConnectAction } from './integration-ui';
import {
IntegrationRow,
SettingsCard,
@@ -935,6 +937,7 @@ function TeamManagement(props: {
const teamQuery = useTeamQuery(() => props.teamId);
const invitesQuery = useTeamInvitesQuery(() => props.teamId);
const githubLink = useGithubLinkStatusQuery();
+ const { openSettings } = useSettingsState();
const deleteInviteMutation = useDeleteTeamInviteMutation();
const removeUserMutation = useRemoveUserFromTeamMutation();
@@ -1488,15 +1491,21 @@ function TeamManagement(props: {
>
{/* The install callback rejects users without a linked GitHub
account, so don't offer the flow until they've connected one
- in their personal settings. */}
+ on the Integrations page. */}
<Show
when={githubLink.data?.status === 'linked'}
fallback={
- <span class="text-xs text-ink-muted">
- {githubLink.isLoading
- ? 'Loading…'
- : 'Connect your GitHub account first'}
- </span>
+ <Show
+ when={!githubLink.isLoading}
+ fallback={
+ <span class="text-xs text-ink-muted">Loading…</span>
+ }
+ >
+ <ConnectAction
+ label="Connect your GitHub account first"
+ onClick={() => openSettings('Connected')}
+ />
+ </Show>
}
>
<a