From d440bffcdf6a39c31ed531546c2ac919ae341c92 Mon Sep 17 00:00:00 2001 From: rachel-yos Date: Tue, 25 Feb 2025 17:07:38 +0200 Subject: [PATCH 1/7] add create new discussion button --- src/components/ActiveControl.jsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/components/ActiveControl.jsx diff --git a/src/components/ActiveControl.jsx b/src/components/ActiveControl.jsx new file mode 100644 index 0000000..e4143a4 --- /dev/null +++ b/src/components/ActiveControl.jsx @@ -0,0 +1,24 @@ +import { useTheme } from '@mui/material/styles'; +import { Button } from '@mui/material'; + +export const ActiveControl = ({ props, onOpen}) => { + const theme = useTheme(); + + return ( + + ); +}; From bb5dfe4842318b17db1a1c02b58f4afae88c1bab Mon Sep 17 00:00:00 2001 From: rachel-yos Date: Wed, 26 Feb 2025 17:17:31 +0200 Subject: [PATCH 2/7] add Discussion.jsx component --- src/components/Discussion.jsx | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/components/Discussion.jsx diff --git a/src/components/Discussion.jsx b/src/components/Discussion.jsx new file mode 100644 index 0000000..b7e65bc --- /dev/null +++ b/src/components/Discussion.jsx @@ -0,0 +1,57 @@ +import React from 'react'; +import { Button, Typography, useTheme } from '@mui/material'; +import { useNavigate } from 'react-router'; + +const typographyStyle = { + fontFamily: 'Open Sans', + marginLeft: 4, + marginRight: 4, + fontWeight: 700, + letterSpacing: 1.3, + fontSize: '1.42em', + +}; + +export const Discussion = ({ props }) => { + + const theme = useTheme(); + + const navigate = useNavigate(); + + const hundleOnClick = () => { + navigate(`?id=${props.id}`); + }; + + + return ( + + + ); +}; \ No newline at end of file From 641ff0720872fd2f36c60ff31f8bf7a71072970c Mon Sep 17 00:00:00 2001 From: rachel-yos Date: Mon, 3 Mar 2025 14:38:42 +0200 Subject: [PATCH 3/7] add DiscussionBoard.jsx and the newDiscussion.jsx --- src/components/Discussion.jsx | 5 +- src/components/DiscussionBoard.jsx | 136 +++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 src/components/DiscussionBoard.jsx diff --git a/src/components/Discussion.jsx b/src/components/Discussion.jsx index b7e65bc..bc204d2 100644 --- a/src/components/Discussion.jsx +++ b/src/components/Discussion.jsx @@ -31,7 +31,7 @@ export const Discussion = ({ props }) => { justifyContent: 'space-between', width: 947, height: 74, - marginTop: 1, + marginTop: 3, padding: 1.5, color: theme.palette.text.primary, background: `linear-gradient( @@ -39,8 +39,7 @@ export const Discussion = ({ props }) => { ${theme.palette.background.default} 50%, ${theme.palette.primary.dark})`, borderRadius: '23px', - border: `solid 1.5px ${theme.palette.grey[300]}` - + border: `solid 1.5px ${theme.palette.grey[100]}` }}> {props.comments[props.comments.length - 1].date.toLocaleDateString()} :תגובה אחרונה diff --git a/src/components/DiscussionBoard.jsx b/src/components/DiscussionBoard.jsx new file mode 100644 index 0000000..4c53f18 --- /dev/null +++ b/src/components/DiscussionBoard.jsx @@ -0,0 +1,136 @@ +import { useState, useRef } from 'react'; +// import sendRequest from '../utils/api/api'; +import { Box, useTheme } from '@mui/material'; +import { PageTitle } from './PageTitle.jsx'; +import { Discussion } from './Discussion.jsx'; +import { ActiveControl } from './ActiveControl.jsx'; +import { NewDiscussion } from './NewDiscussion.jsx'; + +export const DiscussionBoard = () => { + const theme = useTheme(); + + const [openDialog, setOpenDialog] = useState(false); + const newDiscussionRef = useRef(null); + + const Open = () => { + setOpenDialog(true); + if (newDiscussionRef.current) { + newDiscussionRef.current.scrollIntoView({ behavior: 'smooth' }); + } + }; + const onclose = ()=>{ + setOpenDialog(false); + }; + + // const allDiscussions = await sendRequest('/subject' , 'GET'); + // setSubjects(allDiscussions); + const allDiscussions = [ + { id: '123', name: 'ressume', comments: [{ date: new Date() }] }, + { id: '123', name: 'salary', comments: [{ date: new Date() }] }, + { id: '123', name: 'activity', comments: [{ date: new Date() }] }, + { id: '123', name: 'ressume', comments: [{ date: new Date() }] }, + { id: '123', name: 'salary', comments: [{ date: new Date() }] }, + { id: '123', name: 'activity', comments: [{ date: new Date() }] }, + { id: '123', name: 'salary', comments: [{ date: new Date() }] }, + { id: '123', name: 'activity', comments: [{ date: new Date() }] }, + ]; + + // return ( + // <> + // + // + // + // + // + // + // {allDiscussions.map((discussion) => ( + // + // ))} + // + + // + // + // + // ); + return ( + + + + + + + + + + + {allDiscussions.map((discussion, index) => ( + + ))} + + + setOpenDialog(false) || onclose} /> + + + ); + +}; \ No newline at end of file From a7b4950b1d755c01c82e5d8a33a1a7556e16c2a2 Mon Sep 17 00:00:00 2001 From: rachel-yos Date: Mon, 3 Mar 2025 14:41:14 +0200 Subject: [PATCH 4/7] change routing and themeColors --- src/components/Routing.jsx | 4 +++- src/utils/style/ThemeColors.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Routing.jsx b/src/components/Routing.jsx index cbf8065..3210362 100644 --- a/src/components/Routing.jsx +++ b/src/components/Routing.jsx @@ -3,6 +3,7 @@ import { AboutUs } from './AboutUs.jsx'; import { Home } from './Home.jsx'; import { NotFound } from './NotFound.jsx'; import { SubjectBoard } from './SubjectBoard.jsx'; +import { DiscussionBoard } from './DiscussionBoard.jsx'; export const Routing = () => { return <> @@ -10,7 +11,8 @@ export const Routing = () => { }> }> }> - }> + }> + }> ; }; \ No newline at end of file diff --git a/src/utils/style/ThemeColors.js b/src/utils/style/ThemeColors.js index d664ea3..5dbb31c 100644 --- a/src/utils/style/ThemeColors.js +++ b/src/utils/style/ThemeColors.js @@ -15,11 +15,11 @@ const theme = createTheme({ grey: { 900: '#212121', 500: '#555555', - 100: '#E0DDDD', + 100: '#696969', }, text: { primary: '#FFFFFF', - link:'#3598DB', + link: '#3598DB', }, background: { default: '#181818', From 68191be147fe9edaed5f9911cda13205d81f5dfd Mon Sep 17 00:00:00 2001 From: rachel-yos Date: Mon, 21 Apr 2025 10:26:54 +0300 Subject: [PATCH 5/7] add close icon button --- src/components/NewDiscussion.jsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/NewDiscussion.jsx b/src/components/NewDiscussion.jsx index 67ea319..ac34f50 100644 --- a/src/components/NewDiscussion.jsx +++ b/src/components/NewDiscussion.jsx @@ -1,7 +1,9 @@ import { Box, TextField, Typography, useTheme } from '@mui/material'; +import { IconButton } from '@mui/material'; +import CloseIcon from '@mui/icons-material/Close'; import { ActiveControl } from './ActiveControl'; -export const NewDiscussion = () => { +export const NewDiscussion = ({ onClose }) => { const theme = useTheme(); const typhographyStyle = { @@ -30,13 +32,25 @@ export const NewDiscussion = () => { }} > + + + יצירת דיון חדש From 58b57bfed275e700324daa4e42fe00e316fa9524 Mon Sep 17 00:00:00 2001 From: rachel-yos Date: Thu, 24 Apr 2025 10:40:37 +0300 Subject: [PATCH 6/7] remove scrolling --- src/components/AboutUs.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/AboutUs.jsx b/src/components/AboutUs.jsx index de8f670..a937a8a 100644 --- a/src/components/AboutUs.jsx +++ b/src/components/AboutUs.jsx @@ -9,6 +9,8 @@ export const AboutUs = () => { Date: Thu, 24 Apr 2025 10:41:15 +0300 Subject: [PATCH 7/7] change position to be fixed --- src/components/Nav.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Nav.jsx b/src/components/Nav.jsx index 9493a36..16f51c7 100644 --- a/src/components/Nav.jsx +++ b/src/components/Nav.jsx @@ -14,7 +14,7 @@ const pages = [ export const Nav = () => { return ( <> - + {pages.map((page) => (