Skip to content

Commit 18a88c9

Browse files
authored
task: implement enter key search functionality (#143)
1 parent f8e8b4a commit 18a88c9

File tree

10 files changed

+427
-323
lines changed

10 files changed

+427
-323
lines changed

UI/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
BASE_PATH: '',
99
GA_ID: ''
1010
};
11-
})(this);
11+
})(this);

UI/public/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
BASE_PATH: '',
99
GA_ID: ''
1010
};
11-
})(this);
11+
})(this);

UI/src/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ export const environment = {
1616
apiUrl: window.env.API_URL,
1717
clientId: window.env.CLIENT_ID,
1818
gaId: window.env.GA_ID,
19-
};
19+
};

UI/src/features/authentication/authentication.tsx

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ export const Authentication: FC<Props> = (props: Props) => {
5252
};
5353

5454
return (
55-
<Box
56-
sx={{
55+
<Box
56+
sx={{
5757
width: '100vw',
5858
height: '100vh',
5959
display: 'flex',
60+
flexDirection: { xs: 'column', sm: 'row' },
6061
position: 'fixed',
6162
top: 0,
6263
left: 0,
@@ -65,13 +66,16 @@ export const Authentication: FC<Props> = (props: Props) => {
6566
{/* Left Column - Login Form */}
6667
<Box
6768
sx={{
68-
width: '40%',
69+
width: { xs: '100%', sm: '50%', md: '40%' },
70+
height: { xs: '90vh', sm: '100%' },
6971
backgroundColor: 'white',
7072
display: 'flex',
7173
flexDirection: 'column',
7274
justifyContent: 'center',
7375
alignItems: 'center',
74-
padding: '40px',
76+
padding: { xs: 2.5, sm: '40px' },
77+
boxSizing: 'border-box',
78+
overflowY: { xs: 'auto', sm: 'visible' },
7579
}}
7680
>
7781
{props.isLoading ? (
@@ -85,16 +89,16 @@ export const Authentication: FC<Props> = (props: Props) => {
8589
height: '100%',
8690
}}
8791
>
88-
<CircularProgress
89-
size={60}
90-
sx={{
92+
<CircularProgress
93+
size={60}
94+
sx={{
9195
color: '#1976d2',
9296
marginBottom: '20px',
93-
}}
97+
}}
9498
/>
95-
<Typography
96-
variant="h6"
97-
sx={{
99+
<Typography
100+
variant="h6"
101+
sx={{
98102
color: 'grey.600',
99103
textAlign: 'center',
100104
}}
@@ -107,14 +111,15 @@ export const Authentication: FC<Props> = (props: Props) => {
107111
<Box
108112
sx={{
109113
width: '100%',
110-
maxWidth: '400px',
114+
maxWidth: { xs: '100%', sm: '400px' },
115+
boxSizing: 'border-box',
111116
}}
112117
>
113118
{/* Title */}
114-
<Typography
115-
variant="h3"
116-
component="h1"
117-
sx={{
119+
<Typography
120+
variant="h3"
121+
component="h1"
122+
sx={{
118123
fontWeight: 'bold',
119124
color: 'black',
120125
marginBottom: '40px',
@@ -125,7 +130,7 @@ export const Authentication: FC<Props> = (props: Props) => {
125130
</Typography>
126131

127132
{/* Username Field */}
128-
<Box sx={{ marginBottom: '20px' }}>
133+
<Box sx={{ marginBottom: '20px' }}>
129134
<TextField
130135
fullWidth
131136
value={username}
@@ -219,9 +224,9 @@ export const Authentication: FC<Props> = (props: Props) => {
219224

220225
{/* Error Text */}
221226
{props.errorText && (
222-
<Typography
223-
variant="body2"
224-
sx={{
227+
<Typography
228+
variant="body2"
229+
sx={{
225230
color: 'error.main',
226231
fontSize: '0.8rem',
227232
marginBottom: '20px',
@@ -258,9 +263,9 @@ export const Authentication: FC<Props> = (props: Props) => {
258263
{/* Divider */}
259264
<Box sx={{ display: 'flex', alignItems: 'center', marginBottom: '20px' }}>
260265
<Divider sx={{ flex: 1, backgroundColor: 'grey.300' }} />
261-
<Typography
262-
variant="body2"
263-
sx={{
266+
<Typography
267+
variant="body2"
268+
sx={{
264269
color: 'grey.600',
265270
margin: '0 15px',
266271
fontSize: '0.875rem',
@@ -296,11 +301,7 @@ export const Authentication: FC<Props> = (props: Props) => {
296301
}}
297302
>
298303
Sign in with Google &nbsp;
299-
<img
300-
src="/static/images/google.svg"
301-
alt="Google Logo"
302-
style={{ marginRight: '10px', height: '20px' }}
303-
/>
304+
<img src="/static/images/google.svg" alt="Google Logo" style={{ marginRight: '10px', height: '20px' }} />
304305
</Button>
305306

306307
<Button
@@ -339,17 +340,19 @@ export const Authentication: FC<Props> = (props: Props) => {
339340
{/* Right Column - Visual Element */}
340341
<Box
341342
sx={{
342-
width: '60%',
343+
width: { xs: '100%', sm: '50%', md: '60%' },
344+
height: { xs: '10vh', sm: '100%' },
343345
backgroundColor: '#2c2c2c',
344346
display: 'flex',
345347
alignItems: 'center',
346348
justifyContent: 'center',
349+
order: { xs: -1, sm: 0 },
347350
}}
348351
>
349352
<Box
350353
sx={{
351-
width: '300px',
352-
height: '300px',
354+
width: { xs: '12vh', sm: '300px' },
355+
height: { xs: '12vh', sm: '300px' },
353356
display: 'flex',
354357
alignItems: 'center',
355358
justifyContent: 'center',

UI/src/features/pages/regular/home/home.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const Home: FC = () => {
5252
flexDirection: 'column',
5353
alignItems: 'center',
5454
justifyContent: 'center',
55+
pt: { xs: '40px', sm: 0 },
5556
backdropFilter: 'blur(2px)',
5657
overflow: 'hidden',
5758
}}

UI/src/features/pages/regular/home/homepage-subtitle.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,25 @@ export const HomepageSubtitle: FC<HomepageSubtitleProps> = ({
1818
width: '100%',
1919
display: 'flex',
2020
alignItems: 'center',
21-
flexDirection: isCompact ? 'column' : (isLeft ? 'row' : 'row-reverse'),
21+
flexDirection: isCompact ? 'column' : { xs: 'column', sm: 'column', md: isLeft ? 'row' : 'row-reverse' },
2222
gap: isCompact ? 2 : 3,
2323
pt: { xs: 1, md: 2 },
2424
pb: { xs: 1, md: 2 },
2525
}}
2626
>
2727
<Box sx={{
28-
width: '50%',
28+
width: isCompact ? '100%' : { xs: '100%', sm: '100%', md: '50%' },
2929
display: 'flex',
30-
justifyContent: isCompact ? 'center' : (isLeft ? 'flex-end' : 'flex-start')
30+
justifyContent: isCompact ? 'center' : { xs: 'center', sm: 'center', md: isLeft ? 'flex-end' : 'flex-start' }
3131
}}>
3232
<Typography variant={isCompact ? 'h4' : 'h2'} sx={{
3333
color: 'primary.contrastText',
3434
textTransform: "uppercase",
3535
whiteSpace: 'nowrap',
36+
textAlign: isCompact ? 'center' : { xs: 'center', sm: 'center', md: isLeft ? 'right' : 'left' },
3637
}}>{title}</Typography>
3738
</Box>
38-
<Box sx={{ width: '50%' }}></Box>
39+
<Box sx={{ width: isCompact ? '0%' : { xs: '0%', sm: '0%', md: '50%' } }}></Box>
3940
</Box>
4041
)
4142
}

0 commit comments

Comments
 (0)