Skip to content
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
30 changes: 11 additions & 19 deletions client/src/pages/Audience/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,18 @@ const Audience = () => {
{!loading && !error && audiences.length === 0 && (
<Grid item xs={12}>
<Box sx={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
py: 6
textAlign: 'center',
py: 4,
backgroundColor: '#fafafa',
borderRadius: 2,
border: '1px dashed #ccc'
}}>
<Alert
severity="info"
variant="outlined"
sx={{
borderRadius: '8px',
borderWidth: '1px',
maxWidth: '500px',
textAlign: 'center',
'& .MuiAlert-icon': {
fontSize: '1.25rem'
}
}}
>
No audiences have been created yet. Click "Create Audience" to get started.
</Alert>
<Typography variant="h6" color="text.secondary" sx={{ mb: 1 }}>
No audiences found
</Typography>
<Typography variant="body2" color="text.secondary">
You haven't created any audiences yet. Create your first audience to get started.
</Typography>
</Box>
</Grid>
)}
Expand Down
12 changes: 6 additions & 6 deletions client/src/pages/Campaign/CampaignDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ const CampaignDetail = () => {
<Container maxWidth="lg" sx={{ flexGrow: 1, mt: '96px', mb: 2 }}>

{/* Main Campaign Details Content */}
<Grid container spacing={2} sx={{ mb: 4 }} alignItems="center">
<Grid item xs={12} md={8} sx={{ pl: 2, pb: 2 }}>
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 4 }}>
<Box sx={{ pl: 2, pb: 2 }}>
<Typography
sx={{
mb: 1,
Expand All @@ -179,10 +179,10 @@ const CampaignDetail = () => {
<Typography sx={{ fontSize: 13 }} color="text.secondary">
View and manage your campaign details, track progress, and analyze results.
</Typography>
</Grid>
</Box>

{/* More Button */}
<Grid item xs={2} sx={{ textAlign: 'right' }}>
<Box sx={{ display: 'flex', justifyContent: 'flex-end' }}>
<IconButton
aria-label="more options"
aria-controls="campaign-options-menu"
Expand Down Expand Up @@ -226,8 +226,8 @@ const CampaignDetail = () => {
Delete Campaign
</MenuItem>
</Menu>
</Grid>
</Grid>
</Box>
</Box>

{archiveError && <Alert sx={{ mb: 2 }} severity="error">{archiveError}</Alert>}
{archiveSuccess && <Alert sx={{ mb: 2 }} severity="success">Campaign archived successfully!</Alert>}
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Campaign/CampaignDetailsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CampaignDetailsCard = ({ campaign }) => {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
fontWeight: 500
fontWeight: 500,
}}
variant="h6">
{campaign?.name}
Expand Down
55 changes: 42 additions & 13 deletions client/src/pages/Campaign/StartCampaign.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,40 +73,69 @@ const StartCampaign = () => {
<Box sx={{ flexGrow: 1, display: 'flex', flexDirection: 'column' }}>
{campaignPrepared ? ( // Show "Your campaign is ready" view if campaign is prepared
<Container maxWidth="lg" sx={{ flexGrow: 1, mt: '110px', mb: 2, textAlign: 'center' }}>
<Typography variant="h5" color="primary" sx={{ mb: 2 }}>
<Typography variant="h5" color="primary" sx={{ mb: 2, fontWeight: 700 }}>
Campaign Preparation Complete
</Typography>
<Typography variant="body1" color="text.secondary" sx={{ mb: 3, px: 4 }}>
Congratulations! Your campaign has been successfully prepared and is now ready.
You can proceed launch your phishing campaign.
</Typography>
<Grid container justifyContent="center">
<Grid item xs={12} md={6}>
<Typography variant="body1" color="text.secondary" sx={{ mb: 3 }}>
Congratulations! Your campaign has been successfully prepared and is now ready.
You can proceed launch your phishing campaign.
</Typography>
</Grid>
</Grid>


{/* Success Icon */}
<Box
sx={{
width: '84px',
height: '84px',
margin: '0 auto',
display: 'block'
margin: '0 auto 32px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
>
<SuccessIcon style={{ width: '100%', height: '100%' }} />
<SuccessIcon style={{
width: '60px',
height: '60px',
color: '#4caf50'
}} />
</Box>

{/* Button */}
<Button
variant="contained"
color="primary"
size="large"
sx={{ mt: 4 }}
sx={{
mt: 4,
px: 4,
py: 1.5,
borderRadius: 2,
boxShadow: '0 4px 12px rgba(25, 118, 210, 0.2)',
'&:hover': {
boxShadow: '0 6px 16px rgba(25, 118, 210, 0.3)',
transform: 'translateY(-1px)'
},
transition: 'all 0.2s ease-in-out'
}}
onClick={handleLaunch}
>
{startLoading ? <CircularProgress size={24} /> : "Launch Campaign"}
</Button>

{startError && (
<Box sx={{ mt: 2 }}>
<Alert severity="error">{startError || "An error occurred while starting the campaign."}</Alert>
<Box sx={{ mt: 3 }}>
<Alert
severity="error"
sx={{
borderRadius: 2,
maxWidth: '500px',
margin: '0 auto'
}}
>
{startError || "An error occurred while starting the campaign."}
</Alert>
</Box>
)}
</Container>
Expand Down
17 changes: 14 additions & 3 deletions client/src/pages/Campaign/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,20 @@ const Campaign = () => {
) : error ? (
<Alert severity="error">{error}</Alert>
) : campaigns.length === 0 ? (
<Alert severity="info">
No campaigns found. Click "Start Campaign" to create your first campaign.
</Alert>
<Box sx={{
textAlign: 'center',
py: 4,
backgroundColor: '#fafafa',
borderRadius: 2,
border: '1px dashed #ccc'
}}>
<Typography variant="h6" color="text.secondary" sx={{ mb: 1 }}>
No campaigns found
</Typography>
<Typography variant="body2" color="text.secondary">
You haven't created any campaigns yet. Create your first campaign to get started.
</Typography>
</Box>
) : (
<Grid sx={{
maxWidth: '100%',
Expand Down
Loading