fix(settings): hide messengers integrations section
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { SettingsPageLayout } from '@/components/sections/shared/SettingsPageLayout';
|
import { SettingsPageLayout } from '@/components/sections/shared/SettingsPageLayout';
|
||||||
import { useI18n } from '@/lib/i18n';
|
import { useI18n } from '@/lib/i18n';
|
||||||
import { ComingSoonMessengersSection } from './ComingSoonMessengersSection';
|
|
||||||
import { ThirdPartyIntegrationsSection } from './ThirdPartyIntegrationsSection';
|
import { ThirdPartyIntegrationsSection } from './ThirdPartyIntegrationsSection';
|
||||||
|
|
||||||
interface IntegrationsPageProps {
|
interface IntegrationsPageProps {
|
||||||
@@ -21,8 +20,8 @@ export const IntegrationsPage: React.FC<IntegrationsPageProps> = ({
|
|||||||
description={t('settings.page.integrations.description')}
|
description={t('settings.page.integrations.description')}
|
||||||
showSaveStatus={false}
|
showSaveStatus={false}
|
||||||
>
|
>
|
||||||
<ComingSoonMessengersSection />
|
|
||||||
<ThirdPartyIntegrationsSection
|
<ThirdPartyIntegrationsSection
|
||||||
|
divider={false}
|
||||||
onOpenProviderSetup={onOpenProviderSetup}
|
onOpenProviderSetup={onOpenProviderSetup}
|
||||||
onOpenPluginManager={onOpenPluginManager}
|
onOpenPluginManager={onOpenPluginManager}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ type PendingAction = 'install' | 'update' | 'setup' | 'remove';
|
|||||||
type RemoveTarget = ThirdPartyPluginDefinition | null;
|
type RemoveTarget = ThirdPartyPluginDefinition | null;
|
||||||
|
|
||||||
interface ThirdPartyIntegrationsSectionProps {
|
interface ThirdPartyIntegrationsSectionProps {
|
||||||
|
divider?: boolean;
|
||||||
onOpenProviderSetup: (providerId: string) => Promise<boolean>;
|
onOpenProviderSetup: (providerId: string) => Promise<boolean>;
|
||||||
onOpenPluginManager: () => void;
|
onOpenPluginManager: () => void;
|
||||||
}
|
}
|
||||||
@@ -46,6 +47,7 @@ const requiresRestart = (result: PluginMutationResult): boolean =>
|
|||||||
|| result.reloadFailed === true;
|
|| result.reloadFailed === true;
|
||||||
|
|
||||||
export const ThirdPartyIntegrationsSection: React.FC<ThirdPartyIntegrationsSectionProps> = ({
|
export const ThirdPartyIntegrationsSection: React.FC<ThirdPartyIntegrationsSectionProps> = ({
|
||||||
|
divider = true,
|
||||||
onOpenProviderSetup,
|
onOpenProviderSetup,
|
||||||
onOpenPluginManager,
|
onOpenPluginManager,
|
||||||
}) => {
|
}) => {
|
||||||
@@ -413,6 +415,7 @@ export const ThirdPartyIntegrationsSection: React.FC<ThirdPartyIntegrationsSecti
|
|||||||
<SettingsSection
|
<SettingsSection
|
||||||
title={t('settings.integrations.thirdParty.title')}
|
title={t('settings.integrations.thirdParty.title')}
|
||||||
info={t('settings.integrations.thirdParty.info')}
|
info={t('settings.integrations.thirdParty.info')}
|
||||||
|
divider={divider}
|
||||||
settingsItem="integrations.third-party"
|
settingsItem="integrations.third-party"
|
||||||
contentClassName="space-y-3"
|
contentClassName="space-y-3"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -38,15 +38,4 @@ describe('settings search', () => {
|
|||||||
|
|
||||||
expect(results.some((result) => result.id === 'integrations.third-party.opencode-cursor-oauth')).toBe(true);
|
expect(results.some((result) => result.id === 'integrations.third-party.opencode-cursor-oauth')).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('finds coming-soon messenger placeholders', () => {
|
|
||||||
const results = buildSettingsSearchResults({
|
|
||||||
query: 'discord',
|
|
||||||
runtimeCtx,
|
|
||||||
t,
|
|
||||||
getPageTitle: (page) => page,
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(results.some((result) => result.id === 'integrations.messengers.discord')).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -945,26 +945,6 @@ const SETTINGS_SEARCH_ITEMS: readonly SettingsSearchItem[] = [
|
|||||||
isAvailable: (ctx) => ctx.isWeb && !ctx.isDesktop && !ctx.isVSCode,
|
isAvailable: (ctx) => ctx.isWeb && !ctx.isDesktop && !ctx.isVSCode,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
id: 'integrations.messengers',
|
|
||||||
page: 'integrations',
|
|
||||||
titleKey: 'settings.integrations.messengers.title',
|
|
||||||
keywords: ['messenger', 'discord', 'telegram', 'bot', 'coming soon'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'integrations.messengers.discord',
|
|
||||||
page: 'integrations',
|
|
||||||
titleKey: 'settings.integrations.messengers.discord.name',
|
|
||||||
descriptionKey: 'settings.integrations.messengers.discord.description',
|
|
||||||
keywords: ['discord', 'bot', 'messenger', 'coming soon'],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'integrations.messengers.telegram',
|
|
||||||
page: 'integrations',
|
|
||||||
titleKey: 'settings.integrations.messengers.telegram.name',
|
|
||||||
descriptionKey: 'settings.integrations.messengers.telegram.description',
|
|
||||||
keywords: ['telegram', 'bot', 'messenger', 'coming soon'],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'integrations.third-party',
|
id: 'integrations.third-party',
|
||||||
page: 'integrations',
|
page: 'integrations',
|
||||||
|
|||||||
Reference in New Issue
Block a user