Skip to content

Commit

Permalink
Merge pull request #41 from Sicnecher/sicnecher-branch
Browse files Browse the repository at this point in the history
fix: some fixes
  • Loading branch information
Sicnecher authored Jan 20, 2025
2 parents 632f9f6 + 096d613 commit e689430
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 44 deletions.
4 changes: 3 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HashRouter as Router, Routes, Route } from "react-router-dom";
import { HashRouter as Router, Routes, Route, Navigate } from "react-router-dom";

import "./styles/mainStyles.scss";
import { UserMsg } from "./cmps/Usermsg";
Expand All @@ -9,6 +9,7 @@ import { MondayIndex } from "./pages/MondayIndex";
import { useSelector } from "react-redux";
import { useEffect } from "react";
import { utilService } from "./services/util.service";
import { useNavigate } from "react-router-dom";

function App() {
const loggedInUser = useSelector((state) => state.userModule.user);
Expand All @@ -27,6 +28,7 @@ function App() {
</Routes>
) : (
<Routes>
<Route path="/" element={<Navigate to={`/${utilService.getNameFromEmail(loggedInUser.email)}s-team.sunday.com`} />} />
<Route path={`/${utilService.getNameFromEmail(loggedInUser.email)}s-team.sunday.com`} element={<MondayIndex />} />
<Route path={`/${utilService.getNameFromEmail(loggedInUser.email)}s-team.sunday.com/boards/:boardId`} element={<MondayIndex isBoard={true} />} />
<Route path={`/${utilService.getNameFromEmail(loggedInUser.email)}s-team.sunday.com/board`} element={<MondayIndex isBoard={true} />} />
Expand Down
14 changes: 8 additions & 6 deletions src/cmps/AppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ import PersonAddAltIcon from "@mui/icons-material/PersonAddAlt";
import InboxIcon from "@mui/icons-material/Inbox";
import NotificationsNoneIcon from "@mui/icons-material/NotificationsNone";
import { logout } from "../store/actions/user.actions";
import { useSelector } from "react-redux";

export function AppHeader({ userData = null }) {
const iconStyle = {width: 22, height: 22};
export function AppHeader() {
const user = useSelector((state) => state.userModule.user);
const iconStyle = { width: 22, height: 22 };
const navigate = useNavigate();

function onLogOut() {
navigate("/");
logout();
}

return userData ? (
return user ? (
<div className="header-flex">
<section className="header-sentance">
<section onClick={() => navigate("/")} className="header-sentance">
<svg
viewBox="0 0 33 33"
fill="currentColor"
Expand Down Expand Up @@ -135,11 +137,11 @@ export function AppHeader({ userData = null }) {
<QuestionMarkIcon style={iconStyle} />
<div className="account-logo" onClick={onLogOut}>
<img
sizes="10px"
sizes="10px"
className="account-logo-img"
src="https://cdn.monday.com/images/logos/monday_logo_icon.png"
></img>
<h4>{userData.email[0].toUpperCase()}</h4>
<h4>{user.email[0].toUpperCase()}</h4>
</div>
</section>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_Board-details-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ header.board-details-header {
position: sticky;
top: 0;
background-color: #fff;
z-index: 4;
z-index: 11;
}

.board-header-actions{
Expand Down
22 changes: 7 additions & 15 deletions src/styles/_Board-details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
flex-direction: column;
background-color: white;
border-top-left-radius: 12px;
padding-left: 3rem;
padding-left: 2rem;
}
/* Grid Items */
.grid-item {
Expand Down Expand Up @@ -145,7 +145,7 @@ div {
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 7;
z-index: 9;
}

.modal {
Expand All @@ -158,7 +158,7 @@ div {
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 250px;
z-index: 8;
z-index: 10;
}

.color-list {
Expand Down Expand Up @@ -226,9 +226,6 @@ div {
border: 1px solid #e1dede;
}

.add-column {
}

.add-task {
opacity: 0.5;
border-top: 1px solid #e0dede;
Expand All @@ -242,21 +239,16 @@ div {
}
section.labels-grid {
position: sticky;
top: 190px;
z-index: 3;
top: 200px;
z-index: 10;
background-color: #fff;
border: 1px solid #e0dddd;
}

div.group-title-flex {
position: sticky;
padding: 1rem;
top: 140px;
top: 145px;
background-color: #fff;
z-index: 2;
}

section.task-title {
position: sticky;
left: 0;
z-index: 8;
}
8 changes: 7 additions & 1 deletion src/styles/_Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
justify-content: space-between;
align-items: center;
padding:8px;
padding:4px;
padding-left: 20px;
padding-right: 22px;

Expand Down Expand Up @@ -51,6 +51,12 @@
align-items: center;
gap: 6px;
font-size: 22px;
border-radius: 5px;
padding: 5px;
cursor: pointer;
&:hover{
background-color: rgba(103, 104, 121, 0.1);
}
& .lighter{
font-weight: 450;
}
Expand Down
18 changes: 15 additions & 3 deletions src/styles/dynamicCmps/modals/_ChatModal.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@

.chat-modal {
z-index: 100;
.chat-modal{
z-index: 10; // this z-index bs has to be solved..
position: fixed; // unfortunately since absolute sticks with group-list element
top: 36px; // probably will change later
right: 0px;
height: 100vh;
background-color: white;
.expand-line{
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top:0px;
height: 100vh;
Expand Down Expand Up @@ -61,7 +73,6 @@
}



.create-comment {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -181,3 +192,4 @@



}
2 changes: 1 addition & 1 deletion src/styles/dynamicCmps/modals/_DateModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: relative;

.date-modal {
z-index: 100;
z-index: 10;
position: absolute;
top: 75px; // temporary
left: -200px; // temporary
Expand Down
2 changes: 1 addition & 1 deletion src/styles/dynamicCmps/modals/_MembersModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
position: relative;

.members-modal {
z-index: 100;
z-index: 10;
position: absolute;
top: 75px; // temporary
left: 0px; // temporary
Expand Down
33 changes: 18 additions & 15 deletions src/styles/dynamicCmps/modals/_SelectedTasksModal.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
.selected-tasks-modal {
position: fixed;
border-radius: 10px;;
bottom: 20px; /* Adjust this value to move it slightly above the bottom */
left: 50%;
border-radius: 4px;;
bottom: 40px; /* Adjust this value to move it slightly above the bottom */
left: 52.5%;
transform: translateX(-50%); /* Center horizontally */
background-color: #ffffff;
box-shadow: 0px 0px 2px 4px rgba(0, 0, 0, 0.6);
box-shadow: 0px 15px 50px rgba(0, 0, 0, 0.3);
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 20px;
gap: 30px;
padding-right: 10px;
z-index: 7;

&-header {
display: flex;
align-items: center;

&-blur {
background: rgba(255, 255, 255, 0.8);
background-color: #0073ea;
backdrop-filter: blur(10px);
padding: 5px 10px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
padding: 8px;
padding-left: 25px;
padding-right: 25px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
// box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
color: white;
}

h2 {
Expand All @@ -30,9 +32,10 @@
}

h4 {
margin: 0 0 0 10px;
font-size: 1rem;
color: #666;
margin: 5px 0px 0px 20px;
font-size: 1.5rem;
color: #353535;
font-weight: 400;
}
}

Expand Down

0 comments on commit e689430

Please sign in to comment.