Skip to content

Commit 15d33a9

Browse files
committed
#3873 fixed admin tools, fixed featured projects, link types unrequired for guest view, changed button
1 parent fd24120 commit 15d33a9

4 files changed

Lines changed: 40 additions & 40 deletions

File tree

src/frontend/src/pages/AdminToolsPage/EditGuestView/GuestViewConfig.tsx

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -151,37 +151,33 @@ const GuestViewConfig: React.FC = () => {
151151
</Box>
152152
)}
153153
</Box>
154+
<Box
155+
sx={{
156+
backgroundColor: (theme) => theme.palette.background.paper,
157+
borderRadius: '10px',
158+
padding: '16px'
159+
}}
160+
>
161+
<Typography
162+
variant="h6"
163+
sx={{
164+
color: 'white',
165+
fontWeight: 'bold',
166+
marginBottom: '12px'
167+
}}
168+
>
169+
Guest Page Links
170+
</Typography>
171+
<UsefulLinksTable isOnGuestHomePage={true} />
172+
</Box>
154173
</Stack>
155174
</Grid>
156-
<Grid item>
175+
<Grid item xs={12}>
157176
<Typography variant="h5" gutterBottom borderBottom={1} color="#ef4345" borderColor={'white'}>
158177
Links Config
159178
</Typography>
160179
<LinkTypeTable isOnGuestHomePage={true} />
161180
</Grid>
162-
<Grid item>
163-
<Box
164-
sx={{
165-
backgroundColor: (theme) => theme.palette.background.paper,
166-
height: '100%',
167-
borderRadius: '10px',
168-
padding: '16px',
169-
width: '100%'
170-
}}
171-
>
172-
<Typography
173-
variant="h6"
174-
sx={{
175-
color: 'white',
176-
fontWeight: 'bold',
177-
marginBottom: '12px'
178-
}}
179-
>
180-
Guest Page Links
181-
</Typography>
182-
<UsefulLinksTable isOnGuestHomePage={true} />
183-
</Box>
184-
</Grid>
185181
</Grid>
186182
);
187183
};

src/frontend/src/pages/AdminToolsPage/ProjectsConfig/LinkTypes/LinkTypeFormModal.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,19 @@ const LinkTypeFormModal = ({
9898
<FormHelperText error>{errors.name?.message}</FormHelperText>
9999
</FormControl>
100100
</Grid>
101-
<Grid item xs={6}>
102-
<FormControl fullWidth>
103-
<FormLabel sx={{ '&.Mui-focused': { color: theme.palette.text.secondary } }}>Required</FormLabel>
104-
<Controller
105-
name="required"
106-
control={control}
107-
render={({ field }) => <Switch {...field} checked={field.value} />}
108-
/>
109-
<FormHelperText error>{errors.required?.message}</FormHelperText>
110-
</FormControl>
111-
</Grid>
101+
{!isOnGuestHomePage && (
102+
<Grid item xs={6}>
103+
<FormControl fullWidth>
104+
<FormLabel sx={{ '&.Mui-focused': { color: theme.palette.text.secondary } }}>Required</FormLabel>
105+
<Controller
106+
name="required"
107+
control={control}
108+
render={({ field }) => <Switch {...field} checked={field.value} />}
109+
/>
110+
<FormHelperText error>{errors.required?.message}</FormHelperText>
111+
</FormControl>
112+
</Grid>
113+
)}
112114
<Grid item xs={6}>
113115
<FormControl fullWidth>
114116
<Box style={{ display: 'flex', verticalAlign: 'middle', alignItems: 'center' }}>

src/frontend/src/pages/HomePage/IntroGuestHomePage.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ const IntroGuestHomePage = () => {
121121
>
122122
<CardContent sx={{ py: 2, '&:last-child': { pb: 2 } }}>
123123
<RouterLink to={routes.HOME_PNM} style={{ textDecoration: 'none' }}>
124-
<NERButton variant="outlined" size="small">
125-
Interested in becoming a member? Learn more about joining {organization.name} here
124+
<Typography variant="body1" color="text.primary" sx={{ mb: 2 }}>
125+
Interested in becoming a member?
126+
</Typography>
127+
<NERButton variant="contained" size="medium">
128+
Join {organization.name}
126129
</NERButton>
127130
</RouterLink>
128131
</CardContent>
129132
</Card>
130-
131-
<Box sx={{ width: '100%', mt: 3 }}>
133+
<Box display="flex" justifyContent="center" alignItems="center" sx={{ width: '100%', mt: 3 }}>
132134
<FeaturedProjects />
133135
</Box>
134136
</Box>

src/frontend/src/pages/HomePage/components/FeaturedProjectsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const FeaturedProjectsCard: React.FC<ProjectCardProps> = ({ project }) => {
1717
minWidth: 'fit-content',
1818
minHeight: 'fit-content',
1919
width: isMobilePortrait ? '100%' : 'auto',
20-
background: theme.palette.background.paper,
20+
background: theme.palette.mode === 'dark' ? '#000000' : 'rgb(255, 255, 255)',
2121
borderRadius: 2
2222
}}
2323
>

0 commit comments

Comments
 (0)