Skip to content

Commit

Permalink
Merge pull request #919 from amitamrutiya/fix-getting-started
Browse files Browse the repository at this point in the history
fix: Corrected progress percentage calculation in the Getting Started card
  • Loading branch information
amitamrutiya authored Feb 17, 2025
2 parents fac3b59 + ea4279c commit cdbcd62
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,15 @@ const DescriptionTypography = styled(Typography)<{ maxWidth?: string }>(({ theme
marginLeft: theme.spacing(1),
marginBottom: theme.spacing(1),
minHeight: '4.5rem',
[theme.breakpoints.between('sm', 'lg')]: {
maxWidth: '100%',
[theme.breakpoints.up('xs')]: {
maxWidth: '100%'
},
[theme.breakpoints.up('sm')]: {
maxWidth: maxWidth || '100%'
},
[theme.breakpoints.up('lg')]: {
maxWidth: '100%'
}
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ interface GetStartedModalProps {
handleOpen: () => void;
stepsData: StepData[];
profileData: ProfileData;
useUpdateUserPrefMutation: () => [(arg: { mapObject: any }) => void, any];
useUpdateUserPrefMutation: any;
useGetOrgsQuery: any;
currentOrgId: string;
useGetUserOrgRolesQuery: any;
Expand All @@ -74,6 +74,7 @@ interface GetStartedModalProps {
isAssignUserRolesAllowed: boolean;
useLazyGetTeamsQuery: any;
embedDesignPath: string;
isFromMeshery: boolean;
}

const Loading: React.FC<LoadingProps> = ({ showModal, handleClose, style }) => {
Expand Down Expand Up @@ -164,7 +165,8 @@ const GetStartedModal: React.FC<GetStartedModalProps> = ({
useNotificationHandlers,
isAssignUserRolesAllowed,
useLazyGetTeamsQuery,
embedDesignPath
embedDesignPath,
isFromMeshery
}) => {
const [openModal, setOpenModal] = useState<boolean>(false);
const [clicked, setClicked] = useState<number | undefined>(undefined);
Expand All @@ -191,9 +193,14 @@ const GetStartedModal: React.FC<GetStartedModalProps> = ({
: [...completedSteps, id]
}
};
updatePref({
mapObject: completeWelcome
});
// different api use for the cloud and meshery
if (isFromMeshery) {
updatePref(completeWelcome);
} else {
updatePref({
mapObject: completeWelcome
});
}
if (id === 3) {
setInviteModal(true);
} else {
Expand Down
7 changes: 6 additions & 1 deletion src/custom/ShareModal/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ const AccessList: React.FC<AccessListProps> = ({
<ListItemText
primary={`${actorData.first_name || ''} ${actorData.last_name || ''}`}
secondary={actorData.email}
secondaryTypographyProps={{
sx: {
color: theme.palette.background.neutral?.pressed
}
}}
/>
<ListItemSecondaryAction>
{ownerData.id === actorData.id ? (
Expand Down Expand Up @@ -293,7 +298,7 @@ const ShareModal: React.FC<ShareModalProps> = ({
</CustomSelect>
<Typography
sx={{
color: theme.palette.text.secondary
color: theme.palette.background.neutral?.pressed
}}
component="span"
variant="body2"
Expand Down

0 comments on commit cdbcd62

Please sign in to comment.