Skip to content

The open alternative to Salesforce, designed for AI.

Show app banner and logo on built-in account app preferences (#29225)

nitinbea39ad219f7
diff --git a/packages/twenty-front/src/pages/settings/accounts/SettingsBuiltInAccountApp.tsx b/packages/twenty-front/src/pages/settings/accounts/SettingsBuiltInAccountApp.tsx
index 7612c06b542..e6ac583e5b0 100644
--- a/packages/twenty-front/src/pages/settings/accounts/SettingsBuiltInAccountApp.tsx
+++ b/packages/twenty-front/src/pages/settings/accounts/SettingsBuiltInAccountApp.tsx
@@ -1,4 +1,5 @@
import { type ConnectedAccount } from '@/accounts/types/ConnectedAccount';
+import { AppChip } from '@/applications/components/AppChip';
import { SettingsAccountGroupsSection } from '@/settings/app-preferences/components/SettingsAccountGroupsSection';
import { SettingsAccountsBlocklistSection } from '@/settings/accounts/components/SettingsAccountsBlocklistSection';
import { SettingsAccountsCalendarChannelDetails } from '@/settings/accounts/components/SettingsAccountsCalendarChannelDetails';
@@ -9,6 +10,8 @@ import { useEnabledBuiltInAccountApps } from '@/settings/app-preferences/hooks/u
import { useMyAccountGroups } from '@/settings/app-preferences/hooks/useMyAccountGroups';
import { getConnectedAccountSettingsChannels } from '@/settings/app-preferences/utils/getConnectedAccountSettingsChannels';
import { getBuiltInAccountAppChannelTabsVisibility } from '@/settings/app-preferences/utils/getBuiltInAccountAppChannelTabsVisibility';
+import { getBuiltInAccountAppLogoUrl } from '@/settings/app-preferences/utils/getBuiltInAccountAppLogoUrl';
+import { SettingsApplicationOverviewCard } from '@/settings/applications/components/SettingsApplicationOverviewCard';
import { SettingsAccountsMessageChannelsSSEEffect } from '@/settings/accounts/components/SettingsAccountsMessageChannelsSSEEffect';
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
import { SettingsSectionSkeletonLoader } from '@/settings/components/SettingsSectionSkeletonLoader';
@@ -22,13 +25,12 @@ import { useState } from 'react';
import { Navigate, useParams } from 'react-router-dom';
import { SettingsPath } from 'twenty-shared/types';
import { getSettingsPath, isDefined } from 'twenty-shared/utils';
+import { Section } from 'twenty-ui/components/layout';
import { IconCalendarEvent, IconMail, IconSettings } from 'twenty-ui/icon';
-import { useTheme } from 'twenty-ui/theme';
import { FeatureFlagKey } from '~/generated-metadata/graphql';
export const SettingsBuiltInAccountApp = () => {
const { t } = useLingui();
- const theme = useTheme();
const isAppPreferencesEnabled = useIsFeatureEnabled(
FeatureFlagKey.IS_APP_PREFERENCES_ENABLED,
);
@@ -83,6 +85,7 @@ export const SettingsBuiltInAccountApp = () => {
}
const appName = t(app.name);
+ const logoUrl = getBuiltInAccountAppLogoUrl(app);
const getSelectedAccount = (
accounts: ConnectedAccount[],
@@ -154,6 +157,14 @@ export const SettingsBuiltInAccountApp = () => {
return (
<>
+ <Section.Root>
+ <SettingsApplicationOverviewCard
+ logoUrl={logoUrl}
+ displayName={appName}
+ description={t(app.description)}
+ coverImageUrl={app.coverImage}
+ />
+ </Section.Root>
<SettingsAccountGroupsSection builtInAccountApp={app} />
<SettingsAccountsBlocklistSection />
</>
@@ -163,7 +174,14 @@ export const SettingsBuiltInAccountApp = () => {
return (
<SettingsPageLayout
title={appName}
- icon={<app.Icon size={theme.icon.size.md} />}
+ icon={
+ <AppChip
+ logoUrl={logoUrl}
+ fallbackApplicationData={{ name: appName }}
+ size="md"
+ chipOnly
+ />
+ }
links={[
{
children: t`User`,
diff --git a/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx b/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx
index 4a3fc2670d8..90c35c413df 100644
--- a/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx
+++ b/packages/twenty-front/src/pages/settings/accounts/__stories__/SettingsBuiltInAccountApp.stories.tsx
@@ -55,6 +55,11 @@ export const GoogleGeneralShowsAccountsAndBlocklist: Story = {
await canvas.findByTestId('tab-general', undefined, { timeout: 3000 }),
);
+ expect(
+ await canvas.findByText(
+ 'Sync emails and calendar events from your Google accounts.',
+ ),
+ ).toBeVisible();
expect(await canvas.findByText('Blocklist')).toBeVisible();
expect(await canvas.findByText('[email protected]')).toBeVisible();
expect(canvas.getByText('[email protected]')).toBeVisible();