diff --git a/app/client/src/ce/constants/workspaceConstants.ts b/app/client/src/ce/constants/workspaceConstants.ts index 9a7d864ce1..b210dcc65c 100644 --- a/app/client/src/ce/constants/workspaceConstants.ts +++ b/app/client/src/ce/constants/workspaceConstants.ts @@ -18,12 +18,12 @@ export type Workspace = { }; export type WorkspaceUserRoles = { - id: string; - name: string; - description: string; + id?: string; + name?: string; + description?: string; entityType: ENTITY_TYPE; - entityName: string; - entityId: string; + entityName?: string; + entityId?: string; autoCreated: boolean; }; diff --git a/app/client/src/ce/pages/workspace/Members.tsx b/app/client/src/ce/pages/workspace/Members.tsx index d49bdbba27..529fae69ef 100644 --- a/app/client/src/ce/pages/workspace/Members.tsx +++ b/app/client/src/ce/pages/workspace/Members.tsx @@ -244,12 +244,13 @@ export const NoResultsText = styled.div` export const RowWrapper = styled.div<{ isSubRow?: boolean }>` display: flex; - ${({ isSubRow }) => - isSubRow - ? `padding-left: 12px;` - : `> div { - margin-left: 8px; - }`} + ${({ isSubRow }) => (isSubRow ? `padding-left: 12px;` : ``)} + + .cs-icon { + margin: 0 4px 0 0; + position: relative; + left: -4px; + } `; export default function MemberSettings(props: PageProps) { diff --git a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx index 199ce6250c..68b855bc99 100644 --- a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx +++ b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx @@ -138,13 +138,19 @@ export const UserList = styled.div` } `; -export const User = styled.div` +export const User = styled.div<{ isApplicationInvite?: boolean }>` display: flex; align-items: center; min-height: 54px; padding: 5px 0 5px 15px; justify-content: space-between; color: ${(props) => props.theme.colors.modal.user.textColor}; + border-bottom: 1px solid ${(props) => props.theme.colors.menuBorder}; + + &:last-child { + ${({ isApplicationInvite }) => + isApplicationInvite && `border-bottom: none;`} + } `; export const UserInfo = styled.div` @@ -187,10 +193,6 @@ export const UserName = styled.div` } `; -export const RoleDivider = styled.div` - border-top: 1px solid ${(props) => props.theme.colors.menuBorder}; -`; - export const Loading = styled(Spinner)` padding-top: 10px; margin: auto; @@ -337,6 +339,7 @@ function WorkspaceInviteUsersForm(props: any) { fetchCurrentWorkspace, fetchUser, handleSubmit, + isApplicationInvite = false, isLoading, isMultiSelectDropdown = false, placeholder = "", @@ -536,7 +539,7 @@ function WorkspaceInviteUsersForm(props: any) { }) => { return ( - + - - ); }, @@ -584,7 +585,10 @@ function WorkspaceInviteUsersForm(props: any) { )} {canManage && !disableManageUsers && ( - + )} diff --git a/app/client/src/pages/workspace/AppInviteUsersForm.tsx b/app/client/src/pages/workspace/AppInviteUsersForm.tsx index 4b9d34efb6..3367be69bd 100644 --- a/app/client/src/pages/workspace/AppInviteUsersForm.tsx +++ b/app/client/src/pages/workspace/AppInviteUsersForm.tsx @@ -39,7 +39,6 @@ const ShareToggle = styled.div` const BottomContainer = styled.div<{ canInviteToApplication?: boolean }>` ${({ canInviteToApplication }) => canInviteToApplication ? `border-top: 1px solid ${Colors.GREY_200}` : ``}; - margin-top: 12px; `; function AppInviteUsersForm(props: any) { diff --git a/app/client/src/pages/workspace/ManageUsers.tsx b/app/client/src/pages/workspace/ManageUsers.tsx index b903c26283..8922ad2185 100644 --- a/app/client/src/pages/workspace/ManageUsers.tsx +++ b/app/client/src/pages/workspace/ManageUsers.tsx @@ -4,9 +4,15 @@ import history from "utils/history"; import { Classes, Icon, IconSize, Text, TextType } from "design-system-old"; import { useLocation } from "react-router-dom"; -const StyledManageUsers = styled("a")` - margin-top: 12px; - display: inline-flex; +const StyledManageUsers = styled("a")<{ isApplicationInvite?: boolean }>` + display: flex; + + ${(props) => + props.isApplicationInvite + ? `padding: 12px 0; border-top: 1px solid + ${props.theme.colors.menuBorder};` + : `padding: 12px 0 0;`} + &&&& { text-decoration: none; } @@ -36,13 +42,20 @@ const StyledManageUsers = styled("a")` } `; -function ManageUsers({ workspaceId }: { workspaceId: string }) { +function ManageUsers({ + isApplicationInvite, + workspaceId, +}: { + isApplicationInvite?: boolean; + workspaceId: string; +}) { const currentPath = useLocation().pathname; const pathRegex = /(?:\/workspace\/)\w+(?:\/settings)/; return !pathRegex.test(currentPath) ? ( { history.push(`/workspace/${workspaceId}/settings/members`); }}