Skip to content

Commit 524cc1e

Browse files
committed
dev merge
Merge branch 'dev' into graphContainer/refactor
2 parents d1ae658 + 3833b31 commit 524cc1e

55 files changed

Lines changed: 1098 additions & 697 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import Splash from './components/Splash';
2+
import Splash from './components/Splash/Splash';
33
import DashboardContainer from './containers/DashboardContainer';
44
import './stylesheets/scrollBar.scss';
55

app/components/About.tsx

Lines changed: 0 additions & 61 deletions
This file was deleted.

app/components/About/About.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import './styles.scss';
3+
import TeamMembers from './TeamMembers';
4+
import PastContributors from './PastContributors';
5+
import { useStylingContext } from './StylingContext';
6+
7+
8+
const About: React.FC = React.memo(() => {
9+
const currentMode = useStylingContext();
10+
11+
return (
12+
<div className="about">
13+
<div className="blurb" data-testid="aboutPage">
14+
<h3 style={currentMode} className="mainTitle">About</h3>
15+
<p style={currentMode} className="text">
16+
The Chronos Team has a passion for building tools that are powerful, beautifully
17+
designed, and easy to use. Chronos was conceived as an Open Source endeavor that directly benefits the developer
18+
community. It can also monitor applications deployed using AWS, EC2, and ECS from Amazon.
19+
</p>
20+
<br></br>
21+
<TeamMembers />
22+
<PastContributors />
23+
</div>
24+
</div>
25+
);
26+
});
27+
28+
export default About;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import { useStylingContext } from './StylingContext';
3+
4+
const contributors = [
5+
'Snow', 'Taylor', 'Tim', 'Roberto', 'Nachiket', 'Tiffany', 'Bruno', 'Danny', 'Vince',
6+
'Matt', 'Derek', 'Kit', 'Grace', 'Jen', 'Patty', 'Stella', 'Michael', 'Ronelle', 'Todd',
7+
'Greg', 'Brianna', 'Brian', 'Alon', 'Alan', 'Ousman', 'Ben', 'Chris', 'Jenae', 'Tim',
8+
'Kirk', 'Jess', 'William', 'Alexander', 'Elisa', 'Josh', 'Troy', 'Gahl', 'Brisa', 'Kelsi',
9+
'Lucie', 'Jeffrey', 'Justin'
10+
];
11+
12+
const PastContributors: React.FC = () => {
13+
const currentMode = useStylingContext();
14+
15+
return (
16+
<div>
17+
<h3 style={currentMode} className="title">
18+
Past Contributors
19+
</h3>
20+
<p style={currentMode} className="text">
21+
{contributors.join(', ')}
22+
</p>
23+
<br />
24+
</div>
25+
);
26+
};
27+
28+
export default PastContributors;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { useContext } from 'react';
2+
import { DashboardContext } from '../../context/DashboardContext';
3+
import lightAndDark from '../Styling';
4+
5+
export const useStylingContext = () => {
6+
const { mode } = useContext(DashboardContext);
7+
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
8+
return currentMode;
9+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import { useStylingContext } from './StylingContext';
3+
4+
const names = ['Haoyu', 'Eisha', 'Edwin', 'Tyler'];
5+
6+
const TeamMembers: React.FC = () => {
7+
const currentMode = useStylingContext();
8+
9+
const nameList = names.map(name => (
10+
<span key={name} style={currentMode} className="text">
11+
<p>{name}</p>
12+
</span>
13+
));
14+
15+
return (
16+
<div>
17+
<h3 style={currentMode} className="title">
18+
Current Version Authors
19+
</h3>
20+
<div id='OSPNames'>
21+
{nameList}
22+
<br />
23+
</div>
24+
</div>
25+
);
26+
};
27+
28+
export default TeamMembers;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import './constants.scss';
1+
@import '../../stylesheets/constants.scss';
22

33
.about {
44
min-width: 421px;
@@ -72,4 +72,4 @@
7272

7373
p {
7474
padding-left: 10px;
75-
}
75+
}

app/components/Contact.tsx

Lines changed: 0 additions & 75 deletions
This file was deleted.

app/components/Contact/Contact.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React, { useContext } from 'react';
2+
import './styles.scss';
3+
import { DashboardContext } from '../../context/DashboardContext';
4+
import lightAndDark from '../Styling';
5+
import ContactForm from './ContactForm';
6+
7+
const Contact: React.FC = React.memo(() => {
8+
const { mode } = useContext(DashboardContext);
9+
10+
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
11+
12+
return (
13+
<div className="contact" style={currentMode}>
14+
<div className="contact-border" data-testid="contactPage">
15+
<div className="contact-container">
16+
<div className="contact-blurb">
17+
<h1>Contact Us</h1>
18+
<br />
19+
<p>Please feel free to provide any feedback, concerns, or comments.</p>
20+
<p>You can find issues the team is currently working on
21+
<a id="issueLink" href="https://github.com/open-source-labs/Chronos/issues" target="_blank" rel="noreferrer">
22+
here
23+
</a>.
24+
</p>
25+
</div>
26+
</div>
27+
<ContactForm currentMode={currentMode}/>
28+
</div>
29+
</div>
30+
);
31+
});
32+
33+
export default Contact;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from 'react';
2+
3+
interface FormInputProps {
4+
label: string;
5+
name: string;
6+
placeholder?: string;
7+
type?: string;
8+
isTextarea?: boolean;
9+
accept?: string;
10+
}
11+
12+
const ContactForm = ({ currentMode }) => {
13+
return (
14+
<div className="email-container">
15+
<form>
16+
<FormInput label="First Name" name="firstname" placeholder="Your name.." />
17+
<FormInput label="Last Name" name="lastname" placeholder="Your last name.." />
18+
<FormInput label="E-mail" name="email" placeholder="Your e-mail address.." />
19+
<FormInput label="Subject" name="subject" placeholder="Subject" />
20+
<FormInput label="Message" name="message" placeholder="Write something.." isTextarea={true} />
21+
<FormInput label="Select a file" name="myfile" type="file" accept="image/*" />
22+
<input id="contact-submit" type="submit" value="Submit" />
23+
</form>
24+
</div>
25+
);
26+
};
27+
28+
const FormInput: React.FC<FormInputProps> = ({ label, name, placeholder, type = "text", isTextarea = false, accept }) => (
29+
<label htmlFor={name}>
30+
{label}:
31+
{isTextarea ? (
32+
<textarea id={name} name={name} placeholder={placeholder} />
33+
) : (
34+
<input type={type} id={name} name={name} placeholder={placeholder} accept={accept} />
35+
)}
36+
</label>
37+
);
38+
39+
export default ContactForm;

0 commit comments

Comments
 (0)