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

CB-5775 refactor: make default group text aligned with other tabs #3064

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from
Open
Changes from 2 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 @@ -8,7 +8,7 @@
import { observer } from 'mobx-react-lite';

import { UsersResource, UsersResourceFilterKey } from '@cloudbeaver/core-authentication';
import { Container, Group, InfoItem, Loader, s, TextPlaceholder, useAutoLoad, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks';
import { Container, Group, InfoItem, Loader, s, useAutoLoad, useResource, useS, useTranslate } from '@cloudbeaver/core-blocks';
import { CachedResourceOffsetPageListKey } from '@cloudbeaver/core-resource';
import { ServerConfigResource } from '@cloudbeaver/core-root';
import { type TabContainerPanelComponent, useTab } from '@cloudbeaver/core-ui';
Expand Down Expand Up @@ -55,22 +55,18 @@ export const GrantedUsers: TabContainerPanelComponent<ITeamFormProps> = observer

if (isDefaultTeam) {
return (
<Container className={s(styles, { box: true })} parent gap vertical>
<Group className={s(styles, { placeholderBox: true })} keepSize large>
<TextPlaceholder>{translate('plugin_authentication_administration_team_default_users_tooltip')}</TextPlaceholder>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its probably better to keep TextPlaceholder component as if we would like to make changes to all placeholders in the app, we cant do it if we use Group

</Group>
<Container>
<Group large>{translate('plugin_authentication_administration_team_default_users_tooltip')}</Group>
</Container>
);
}

return (
<Loader className={s(styles, { loader: true })} state={[state.state]}>
{() => (
<Container className={s(styles, { box: true })} parent gap vertical>
<Container className={s(styles, { box: true })} parent={!!users.resource.values.length} gap vertical>
{!users.resource.values.length ? (
<Group className={s(styles, { placeholderBox: true })} keepSize large>
<TextPlaceholder>{translate('administration_teams_team_granted_users_empty')}</TextPlaceholder>
</Group>
<Group large>{translate('administration_teams_team_granted_users_empty')}</Group>
) : (
<>
{formState.mode === 'edit' && state.changed && <InfoItem info="ui_save_reminder" />}
Expand Down
Loading