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

Redirected the url to the Jfrog sign up page. #109

Merged
merged 2 commits into from
Aug 25, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ Using the JFrog Extension doesn't require a paid JFrog subscription.
Follow these directions to proceed, based on your use case:

- If you already have a JFrog environment which includes Xray, all you need to do is set the connection details through the UI.
- If you don't have a JFrog environment, JFrog supports setting up an environment for free. The extension will then connect to this environment automatically. Please note that this new JFrog environment will be available for you as long as you need it.
- If you don't have a JFrog environment, you can try it out with JFrog's free trial.

##
37 changes: 0 additions & 37 deletions client/src/api/setup-env.ts

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/components/CredentialsForm/CredentialsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const CredentialsForm = (
alignItems: 'center',
}}
>
Create one for FREE
Create a FREE TRIAL
<OpenInIcon sx={{ marginLeft: '3px', fontSize: '18px' }} />
</Link>
</Box>
Expand Down
46 changes: 7 additions & 39 deletions client/src/pages/SetupEnv.tsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,34 @@
import { styled, Box, Button, Link, Stack } from '@mui/material';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { setupEnv } from '../api/setup-env';
import { ddToast } from '../api/utils';
import { ddClient } from '../api/utils';
import { JfrogHeadline } from '../components/JfrogHeadline';

export const enum SetupStage {
Idle,
WaitingForUser,
PreparingEnv,
Done,
Error,
}
const FREE_TRIAL_LINK : string = "https://jfrog.com/start-free/";

export const SetupEnvPage = () => {
const navigate = useNavigate();
const [setupStage, setSetupStage] = useState<SetupStage>(SetupStage.Idle);

const setupEnvHandler = () => {
setSetupStage(SetupStage.WaitingForUser);
setupEnv(() => setSetupStage(SetupStage.PreparingEnv))
.then(() => {
setSetupStage(SetupStage.Done);
ddToast.success('Please verify your email address within the next 72 hours.');
navigate('/scan');
})
.catch(() => {
setSetupStage(SetupStage.Error);
console.error;
});
};

return (
<>
<JfrogHeadline headline="Create a FREE JFrog Environment" />
<JfrogHeadline headline="Create a FREE TRIAL JFrog Environment" />
<Stack direction="column" justifyContent="flex-start" alignItems="flex-start" spacing={0} margin={'50px'}>
<Box>You can set up a FREE JFrog Environment in the cloud.</Box>
<Box>You can set up a FREE TRIAL JFrog Environment.</Box>
<Box>
{'We invite you to '}
<Link
underline="hover"
fontWeight="700"
fontSize="16px"
onClick={setupEnvHandler}
onClick={() => ddClient?.host?.openExternal(FREE_TRIAL_LINK)}
sx={{
textDecoration: 'underline',
}}
>
sign in here
sign up here
</Link>
{' to create your environment.'}
</Box>
<Box> Docker Desktop will automatically connect to your environment once the setup is complete.</Box>

{(setupStage == SetupStage.WaitingForUser || setupStage == SetupStage.PreparingEnv) && (
<Box> Upon Completion, you will be able to sign in with your new environment and credentials </Box>
<Box width={1} marginTop="50px" display="flex" position="relative">
<video width={'100%'} muted autoPlay loop style={{ objectFit: 'cover', transform: 'scaleX(-1)' }}>
<source src={'https://media.jfrog.com/wp-content/uploads/2021/12/29120758/drop-1.mp4'} type="video/mp4" />
Expand All @@ -69,10 +44,8 @@ export const SetupEnvPage = () => {
fontWeight="600"
zIndex="1000"
>
{setupStage == SetupStage.WaitingForUser ? 'Waiting for you to sign in...' : 'Completing the setup...'}
</Box>
</Box>
)}
</Stack>
<DoneButton>
<Button type="submit" onClick={() => navigate(-1)} variant="outlined">
Expand All @@ -83,11 +56,6 @@ export const SetupEnvPage = () => {
);
};

const Title = styled(Box)`
display: flex;
align-items: flex-start;
`;

const DoneButton = styled(Box)`
position: absolute;
padding: 20px;
Expand Down
Loading