diff --git a/src/assets/logo.svg b/src/assets/logo.svg
new file mode 100644
index 0000000..0ef4d69
--- /dev/null
+++ b/src/assets/logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/assets/logoVisual.svg b/src/assets/logoVisual.svg
new file mode 100644
index 0000000..cea5c24
--- /dev/null
+++ b/src/assets/logoVisual.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/ui/toaster.jsx b/src/components/ui/toaster.jsx
index f9aec7c..e68f1c7 100644
--- a/src/components/ui/toaster.jsx
+++ b/src/components/ui/toaster.jsx
@@ -12,6 +12,7 @@ import {
export const toaster = createToaster({
placement: 'bottom-end',
pauseOnPageIdle: true,
+ overlap: true
})
const toastColors = {
diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx
index ed6e5e1..4a397d2 100644
--- a/src/pages/Login.jsx
+++ b/src/pages/Login.jsx
@@ -1,7 +1,8 @@
-import { Button, Field, Fieldset, Flex, For, Image, Input, NativeSelect, Spacer, Stack, Text, VStack } from '@chakra-ui/react'
+import { Box, Button, Field, Fieldset, Flex, For, Image, Input, NativeSelect, Spacer, Stack, Text, useMediaQuery, VStack } from '@chakra-ui/react'
import { PasswordInput } from "../components/ui/password-input"
import { useState } from 'react'
import sccciBuildingImage from '../assets/sccciBuildingOpening1964.png'
+import logoVisual from '../assets/logoVisual.svg'
import server, { JSONResponse } from '../networking'
import ToastWizard from '../components/toastWizard'
import { useDispatch } from 'react-redux'
@@ -11,11 +12,14 @@ import { fetchSession } from '../slices/AuthState'
function Login() {
const dispatch = useDispatch();
const navigate = useNavigate();
+ const [isSmallerThan800] = useMediaQuery("(max-width: 800px)");
const [usernameOrEmail, setUsernameOrEmail] = useState('');
const [password, setPassword] = useState('');
const [loginLoading, setLoginLoading] = useState(false);
+ const loginDisabled = usernameOrEmail == "" || password == "";
+
const handleLogin = async () => {
if (!usernameOrEmail || usernameOrEmail == "" || !password || password == "") {
ToastWizard.standard("error", "All fields are required.")
@@ -73,42 +77,48 @@ function Login() {
return (
-
-
- 47 Hill Street - the opening of the Singapore Chinese Chamber of Commerce and Industry building in 1964.
-
-
-
-
-
- Welcome back to ArchAIve!
- {/* Please login to continue. */}
-
-
-
- Please login to continue
-
- Access to ArchAIve is restricted to SCCCI staff. Unauthorised access is prohibited.
-
-
-
-
-
- Username or Email
- setUsernameOrEmail(e.target.value)} name="name" placeholder='e.g johndoe' />
-
-
-
- Password
- setPassword(e.target.value)} placeholder="Enter password" />
-
-
-
-
-
-
+ {!isSmallerThan800 && <>
+
+
+
+ 47 Hill Street - the opening of the Singapore Chinese Chamber of Commerce and Industry building in 1964.
+
+
+
+ >}
+
+
+
+
+
+ Welcome back to ArchAIve!
+
+
+
+ Please login to continue
+
+ Access to ArchAIve is restricted to SCCCI staff. Unauthorised access is prohibited.
+
+
+
+
+
+ Username or Email
+ setUsernameOrEmail(e.target.value)} name="name" placeholder='e.g johndoe' />
+
+
+
+ Password
+ setPassword(e.target.value)} placeholder="Enter password" />
+
+
+
+
+
+
+