From fd1bf1c10f5d111fba9415a14bd7783c1bc85978 Mon Sep 17 00:00:00 2001
From: MisbehavedNinjaRadiator
<120029998+MisbehavedNinjaRadiator@users.noreply.github.com>
Date: Tue, 24 Jun 2025 22:31:01 +0200
Subject: [PATCH] Bild wird resetted
---
.../src/components/ChangeAvatarDialog.tsx | 4 +-
.../frontend/src/pages/LoginAndSignUpPage.tsx | 7 +-
code/frontend/src/pages/Profile.tsx | 3 +-
.../frontend/src/pages/loginAndSignUpPage.css | 97 ++++++-------------
4 files changed, 41 insertions(+), 70 deletions(-)
diff --git a/code/frontend/src/components/ChangeAvatarDialog.tsx b/code/frontend/src/components/ChangeAvatarDialog.tsx
index f683717..3b40c72 100644
--- a/code/frontend/src/components/ChangeAvatarDialog.tsx
+++ b/code/frontend/src/components/ChangeAvatarDialog.tsx
@@ -35,7 +35,7 @@ export default function AvatarDialog({
ownAccount: boolean;
username: string;
}) {
- const { openFilePicker, filesContent, loading } = useFilePicker({
+ const { openFilePicker, filesContent, loading, clear } = useFilePicker({
accept: ".png, .jpg, .jpeg",
multiple: false,
readAs: "DataURL",
@@ -56,7 +56,7 @@ export default function AvatarDialog({
setOpen(true);
};
const handleClose = () => {
- setImageURL({ newImage: false }); // Reset the selected image when closing
+ clear(); // Reset the selected image when closing
setOpen(false);
};
const handleSaveChanges = () => {
diff --git a/code/frontend/src/pages/LoginAndSignUpPage.tsx b/code/frontend/src/pages/LoginAndSignUpPage.tsx
index 54e6d06..a7dc324 100644
--- a/code/frontend/src/pages/LoginAndSignUpPage.tsx
+++ b/code/frontend/src/pages/LoginAndSignUpPage.tsx
@@ -87,6 +87,7 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
value={formData.username}
onChange={handleChange}
required
+ autoFocus
/>
{signup ? (
@@ -135,7 +136,11 @@ function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
)}
-
+
{signup
? "Already have an account? "
diff --git a/code/frontend/src/pages/Profile.tsx b/code/frontend/src/pages/Profile.tsx
index 940f844..b1e6f3a 100644
--- a/code/frontend/src/pages/Profile.tsx
+++ b/code/frontend/src/pages/Profile.tsx
@@ -15,7 +15,6 @@ import ChangeAvatarDialog from "../components/ChangeAvatarDialog";
import Bio from "../components/Bio";
function Profile() {
-
const [anchorEl, setAnchorEl] = useState(null);
const openPopover = (event: React.MouseEvent) => {
@@ -59,7 +58,7 @@ function Profile() {
{username}
-
+
{/* TODO: Change data to data from Database */}
diff --git a/code/frontend/src/pages/loginAndSignUpPage.css b/code/frontend/src/pages/loginAndSignUpPage.css
index d99075a..eb5fbd7 100644
--- a/code/frontend/src/pages/loginAndSignUpPage.css
+++ b/code/frontend/src/pages/loginAndSignUpPage.css
@@ -1,53 +1,23 @@
-:root {
- --Rotkehlchen-gray: #e7ecf2;
- --Rotkehlchen-brown-light: #a28d7a;
- --Rotkehlchen-orange-default: #e79a0e;
- --Rotkehlchen-gray-default: #e7ecf2;
- --Rotkehlchen-brown-middle: #7f6d6d;
- --Rotkehlchen-yellow-default: #fed640;
- --Rotkehlchen-yellow-hover: #eac22a;
- --Rotkehlchen-brown-dark: #4c4141;
-}
-
-.login-display {
+.background {
display: flex;
flex-direction: column;
height: 100vh; /* Full viewport height */
width: 100vw; /* Full viewport width */
- position: absolute;
- background: var(
- --gradient-blue-backround-mobile,
- linear-gradient(
- 270deg,
- rgba(20, 15, 86, 0.27) 0%,
- rgba(20, 15, 86, 0.58) 24%,
- rgba(20, 15, 86, 0.74) 43%,
- rgba(17, 13, 71, 0.82) 56%,
- rgba(13, 10, 56, 0.9) 68%
- ),
- url("../public/assets/images/BirdsSky.jpg") lightgray 50% / cover no-repeat
- );
+ background: var(--gradient-blue-backround-mobile);
align-items: center;
justify-content: center;
- z-index: -1;
+ background-attachment: fixed;
}
.login-text {
display: flex;
- padding: 8px 40px 40px 40px;
+ padding: 40px;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 18px;
- color: var(--Rotkehlchen-gray-default);
+ color: var(--Rotkehlchen-gray);
text-align: center;
-
- /* Body-L */
- font-family: Inter;
- font-size: 24px;
- font-style: normal;
- font-weight: 700;
- line-height: 40px; /* 166.667% */
}
.login-icon {
@@ -83,53 +53,38 @@
border: none;
color: var(--Rotkehlchen-brown-middle);
outline: 0 !important;
-
- /* M3/body/large */
- font-family: var(--Static-Body-Large-Font, Roboto);
- font-size: var(--Static-Body-Large-Size, 16px);
- font-style: normal;
- font-weight: 400;
- line-height: var(--Static-Body-Large-Line-Height, 24px); /* 150% */
- letter-spacing: var(--Static-Body-Large-Tracking, 0.5px);
}
.login-here {
- color: var(--Rotkehlchen-orange-default, #e79a0e);
+ color: var(--Rotkehlchen-orange-default);
background-color: transparent;
border: none;
text-decoration: underline;
cursor: pointer;
- /* Body-M */
- font-family: Inter;
- font-size: 16px;
- font-style: normal;
- font-weight: 600;
- line-height: 17px;
- letter-spacing: 0.8px;
}
.login-signup {
color: #fff;
text-align: center;
cursor: pointer;
-
- /* Body-M */
- font-family: Inter;
- font-size: 1rem;
- font-style: normal;
- font-weight: 600;
- line-height: 17px; /* 106.25% */
- letter-spacing: 0.8px;
}
.login-part {
display: flex;
padding: 8px 40px 40px 40px;
flex-direction: column;
- justify-content: center;
+ justify-content: space-between;
align-items: center;
gap: 24px;
}
+.input-fields {
+ display: flex;
+ width: 100%;
+ flex-direction: column;
+ justify-content: space-between;
+ gap: 16px;
+}
+
/* Desktop view*/
@media only screen and (min-width: 768px) {
.login-display {
@@ -148,6 +103,7 @@
height: 60vh;
min-height: 400px;
min-width: 500px;
+ backdrop-filter: blur(8px);
}
.login-image {
@@ -160,8 +116,8 @@
align-items: center;
border-radius: 8px;
- border: 5px solid var(--Rotkehlchen-gray-default);
- background-image: url("../public/assets/images/IceBirdLogin.jpg");
+ border: 5px solid var(--Rotkehlchen-gray);
+ background-image: url("../../public/assets/images/IceBirdLogin.jpg");
background-size: cover;
background-position: 75%;
}
@@ -176,8 +132,8 @@
align-items: center;
border-radius: 8px;
- border: 5px solid var(--Rotkehlchen-gray-default);
- background-image: url("../public/assets/images/SummerOwlSignup.jpg");
+ border: 5px solid var(--Rotkehlchen-gray);
+ background-image: url("../../public/assets/images/SummerOwlSignup.jpg");
background-size: cover;
/*background-position: 75%;*/
}
@@ -188,8 +144,19 @@
padding: 3%;
display: flex;
flex-direction: column;
- justify-content: center;
+ justify-content: space-between;
align-items: center;
gap: 24px;
}
+
+ .input-fields {
+ display: flex;
+ width: 100%;
+ flex-direction: column;
+ justify-content: center;
+ gap: 16px;
+ }
+}
+.error-messages {
+ color: red;
}