Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workplace Search] Connect button now displays correct copy #127291

Merged
merged 3 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
EuiToolTip,
} from '@elastic/eui';

import { i18n } from '@kbn/i18n';

import { EuiButtonEmptyTo } from '../../../../../shared/react_router_helpers';
import { SourceIcon } from '../../../../components/shared/source_icon';
import { getAddPath, getSourcesPath } from '../../../../routes';
Expand All @@ -29,7 +31,6 @@ import { hasMultipleConnectorOptions } from '../../../../utils';
import {
CONFIGURED_SOURCES_LIST_UNCONNECTED_TOOLTIP,
CONFIGURED_SOURCES_LIST_ACCOUNT_ONLY_TOOLTIP,
CONFIGURED_SOURCES_CONNECT_BUTTON,
CONFIGURED_SOURCES_EMPTY_STATE,
CONFIGURED_SOURCES_TITLE,
CONFIGURED_SOURCES_EMPTY_BODY,
Expand Down Expand Up @@ -112,7 +113,19 @@ export const ConfiguredSourcesList: React.FC<ConfiguredSourcesProps> = ({
hasMultipleConnectorOptions(sourceData) ? '' : 'connect'
}`}
>
{CONFIGURED_SOURCES_CONNECT_BUTTON}
{!connected
sphilipse marked this conversation as resolved.
Show resolved Hide resolved
? i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.connectButton',
{
defaultMessage: 'Connect',
}
)
: i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.connectAnotherButton',
{
defaultMessage: 'Connect another',
}
)}
</EuiButtonEmptyTo>
)) || (
<EuiButtonEmpty className="eui-fullWidth" isDisabled>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,6 @@ export const CONFIGURED_SOURCES_LIST_ACCOUNT_ONLY_TOOLTIP = i18n.translate(
}
);

export const CONFIGURED_SOURCES_CONNECT_BUTTON = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.connectButton',
sphilipse marked this conversation as resolved.
Show resolved Hide resolved
{
defaultMessage: 'Connect another',
}
);

export const CONFIGURED_SOURCES_EMPTY_STATE = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.contentSource.configuredSources.emptyState',
{
Expand Down